Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 30 → Rev 31

/programs/panel/trunk/@PANEL.ASM
0,0 → 1,1945
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; MENUBAR for MenuetOS - Compile with fasm ;
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; required OS version
dd START ; program start
dd I_END ; program image size
dd 0xB000 ; reguired amount of memory - 64 Kb
dd 0xA000 ; esp
dd 0x0,0x0 ; param, icon
 
include 'lang.inc'
include 'macros.inc'
 
width dd 305
buttons dd 1 ; 0 no frames ; 1 frames
soften_up dd 1 ; 0 no ; 1 yes
soften_down dd 0 ; 0 no ; 1 yes
minimize_left dd 1
minimize_right dd 1
icons_position dd 95
menu_enable dd 1
setup_enable dd 0
graph_text dd 1
soften_middle dd 1 ; 0 no ; 1 yes
icons dd 1 ; 0 defaults ; 1 activate
 
dat db 'PANEL DAT'
 
 
;mainalive db 1
 
;correct_display:
; mov eax,15
; mov ebx,3
; int 0x40
; mcall 5, 300
; jmp correct_display
 
chlangproc:
; mcall 18, 7
; mov [my_process],eax
begin_2:
mcall 40,0b ; 0
begin:
.begin:
mcall 5, eax
begin_3:
mcall 18, 7
mov [active_process],eax
; cmp [mainalive], 0
; je .exit
 
mcall 66, 3
mov ah,al
and al,100000b
cmp al,100000b
je change_start_end
mov al,ah
and al,10000b
cmp al,10000b
je change_start_end
mov al,ah
and al,1000b
cmp al,1000b
je change_key_lang_1
mov al,ah
and al,100b
cmp al,100b
je change_key_lang_1
mov al,ah
and al,1111b
cmp al,11b
jne begin
mcall 19, file_sys, syslang
call syslang_music
; mcall 5, 25
begin_1:
mov ecx,[active_process]
mcall 18, 3
mcall 5, 25
jmp begin
change_key_lang_1:
mov al,ah
and al,11b
cmp al,01b
je change_key_lang
cmp al,10b
jne begin
change_key_lang:
mcall 19, file_sys, chlang
call chlang_music
; mcall 5, 25
jmp begin_1
change_start_end:
mov al,ah
and al,1100b
cmp al,1000b
je start_end
cmp al,100b
jne start_menu
start_end:
; mov ecx,[my_process]
; mcall 18, 3
mcall 18,12
cmp al,1
je scan_codes
cmp ah,255
jne begin
start_end_application:
mcall 19,file_end,0
mcall 5 ,50
jmp begin
scan_codes:
cmp ah,88
je start_end_application
jmp begin
start_menu:
mcall 18,12
mov [button_presssed_alt],eax
; mov ecx,eax
; mcall 47,0x40100, ,10 shl 16+5,0
; mov eax,ecx
cmp al,1
je scan_codes2
cmp ah,72 ;232
je start_menu_application
cmp ah,73 ;233
je start_menu_application
cmp ah,0x35 ;b6 ;53
je kill_active_application
cmp ah,0x9
jne begin
jmp begin
 
kill_active_application:
mcall 18, 7
mov ecx,eax
; mcall 9, area9
; mov eax,area9
; mov ecx,[eax+4]
mcall 18, 2
jmp begin
start_menu_application:
mcall 19,filename,0
call menu_music
mcall 5,50
jmp begin
scan_codes2:
cmp ah,91
je start_menu_application
cmp ah,92
je start_menu_application
cmp ah,83 ;62
je kill_active_application
jmp begin
 
button_presssed_alt dd 0
 
active_process dd 0
my_process dd 0
 
calendar_music:
mcall 55, eax, , , calendarmusic
ret
setup_music:
mcall 55,eax, , ,setupmusic
ret
sysmeter_music:
mcall 55,eax, , ,sysmetermusic
ret
button_music:
mcall 55,eax, , ,buttonmusic
ret
syslang_music:
mcall 55, eax, , , syslangmusic
ret
chlang_music:
mcall 55, eax, , , chlangmusic
ret
menu_music:
mcall 55,eax, , ,menumusic
ret
 
chlangmusic: db 0x82,0x60,0x83,0x65,0x82,0x60,0
 
syslangmusic: db 0x82,0x65,0x83,0x70,0x82,0x65,0
 
menumusic: db 0x82,0x50,0x84,0x48,0x82,0x50,0x84,0x53,0x82,0x51,0
 
activatemusic: db 0x83,0x30,0x85,0x60,0
 
buttonmusic: db 0x85,0x25,0x85,0x40,0
 
sysmetermusic: db 0x85,0x35,0x85,0x45,0
 
setupmusic: db 0x85,0x40,0x85,0x50,0
 
calendarmusic: db 0x85,0x37,0x85,0x48,0
 
; .exit: mcall -1
 
 
START:
mov eax, 6
mov ebx, dat
mov ecx, 0
mov edx, -1
mov esi, I_END
int 0x40
 
mov eax,40
mov ebx,0101b
int 0x40
 
mov edi,width
mov esi,I_END
mov eax,0
new_number:
cmp [esi],byte ';'
je number_ready
imul eax,10
movzx ebx,byte [esi]
sub ebx,'0'
add eax,ebx
inc esi
jmp new_number
number_ready:
mov [edi],eax
mov eax,0
add edi,4
inc esi
cmp [esi],byte 'x'
jne new_number
 
 
call set_variables
 
mcall 51, 1, chlangproc, 0xB000
; mcall 5, 5
; mcall 51, 1, correct_display, 0xA800
 
start_after_minimize:
 
call draw_window
call draw_info
call draw_running_applications
 
mov eax, 23
mov ebx, 30
int 0x40
 
still:
; mcall 13,<390,70>,<3,11>,0xffffff
; mov ecx,[button_presssed_alt]
; mcall 47,0x80100,ecx ,400 shl 16+5,0
 
call draw_info
call draw_running_applications
 
mov eax, 23
mov ebx, 20
int 0x40
 
cmp eax,1 ; redraw ?
jz red
cmp eax,3 ; button ?
jz button
 
jmp still
 
red: ; redraw window
call draw_window
call draw_info
jmp still
 
button: ; button
mov eax,17
int 0x40
 
cmp ah,50
jb no_activate
cmp ah,70
jg no_activate
 
movzx ecx,byte ah
sub ecx,52
shl ecx,2
 
mov eax,18
mov ebx,3
mov ecx,[app_list+ecx]
int 0x40
; cmp [music_type],0
; je still
mcall 55,eax, , ,activatemusic
jmp still
no_activate:
 
 
cmp ah,101 ; minimize to left
je left_button
 
cmp ah,102 ; minimize to right
je right_button
 
cmp ah,byte 1 ; start/terminate menu
jnz noselect
call menu_handler
; cmp [music_type],0
; je still
call menu_music
jmp still
noselect:
 
cmp ah,byte 2 ; start calendar
jnz noid15 ;noclock
mov eax, 19
mov ebx, file6
xor ecx, ecx
int 0x40
call calendar_music
jmp still
; noclock:
 
; cmp ah,byte 11 ; start file 1
; jnz nob1
; mov eax,19
; mov ebx,file1
; int 0x40
; jmp still
; nob1:
 
; cmp ah,byte 12 ; start file 2
; jnz nob2
; mov eax,19
; mov ebx,file2
; int 0x40
; jmp still
; nob2:
 
; cmp ah,byte 13 ; start file 3
; jnz nob3
; mov eax,19
; mov ebx,file3
; int 0x40
; jmp still
; nob3:
 
; cmp ah,14 ; start file 4
; jne noid14
; mov eax,19
; mov ebx,file4
; mov ecx,file4_par
; int 0x40
; jmp still
; noid14:
 
; cmp ah,15 ; start file 5
; jne noid15
; mov eax,19
; mov ebx,file5
; int 0x40
; jmp still
 
noid15:
cmp ah,16
jne noid16
mcall 19, file_sys, chlang
call chlang_music
mcall 5, 25
jmp still
 
noid16:
cmp ah,17
jne noid17
mcall 19, file_sys, syslang
call syslang_music
mcall 5, 25
jmp still
 
noid17:
cmp ah,18
jne noid18
mcall 19, sysmeter, 0
call sysmeter_music
jmp still
 
noid18:
cmp ah,19
jne noid19
; inc [music_type]
; and [music_type],1
mcall 18,8,2
; mcall 18,8
; mov [sound_flag],al
 
; mcall 15,4,2
mcall 15,3
jmp red
 
noid19:
cmp ah,20 ; start system setup
jnz noid20
mov eax, 19
mov ebx, file_sys
xor ecx, ecx
int 0x40
call setup_music
 
noid20:
 
jmp still
 
 
 
draw_running_applications:
 
pusha
 
cmp [icons],1
jne dr_ret
 
call calculate_applications
 
cmp edi,[running_applications]
jne noret
popa
ret
noret:
 
; cmp edi,[running_applications]
; jge no_application_decrease
call draw_window
; no_application_decrease:
 
mov [running_applications],edi
 
mov edi,0
mov ecx,2
mov [contrast],0
 
newpr:
 
mov eax,9
mov ebx,0x8000
int 0x40
 
push eax
push ecx
 
cmp eax,ecx
jb norpl2
 
cmp byte [0x8000+10], '@'
je norpl
cmp [0x8000+11],dword 'CON '
je norpl
cmp [0x8000+11],dword 'ENU '
je norpl
; cmp [0x8000+12],dword 'NEL '
; je norpl
cmp [0x8000+10],dword ' '
je norpl
 
mov eax,13
mov ebx,edi
inc ebx
shl ebx,16
imul ebx,6*10
add ebx,17 shl 16+54
mov ecx,3 shl 16+14
xor edx,edx
sub ebx,10 shl 16
int 0x40
 
sub ebx,1 shl 16
mov bx,1
mov ecx,4 shl 16+12
int 0x40
 
sub ebx,1 shl 16
mov ecx,5 shl 16+10
int 0x40
 
add ebx,56 shl 16
mov ecx,4 shl 16+12
int 0x40
 
add ebx,1 shl 16
mov ecx,5 shl 16+10
int 0x40
 
inc [contrast]
and [contrast],1
cmp [contrast],1
je contrast1
mov edx,0x88ff
jmp contrast2
contrast1:
mov edx,0x55ff
contrast2:
sub ebx,55 shl 16
mov bx,54
mov ecx,4 shl 16+12
; mov edx,0x66ff
int 0x40
 
sub ebx,1 shl 16
mov bx,1
mov ecx,5 shl 16+10
int 0x40
 
add ebx,55 shl 16
int 0x40
 
mov eax,4
mov ebx,edi
inc ebx
shl ebx,16
imul ebx,6*10 ;13
add ebx,20*65536+7
mov ecx,0xffffff ;[wcolor]
; add ecx,0x303030
mov edx,0x8000+10
mov esi,11
sub ebx,10 shl 16
int 0x40
 
norpl2:
 
inc edi
 
norpl:
 
pop ecx
pop eax
 
inc ecx
 
cmp edi,[max_applications]
jb newpr
 
nompr:
 
dr_ret:
 
popa
 
ret
 
 
calculate_applications:
 
mov edi,app_list
mov ecx,20
mov eax,0xff
cld
rep stosd
 
mov edi,0
mov ecx,2
 
cnewpr:
 
mov eax,9
mov ebx,0x8000
int 0x40
 
cmp byte [0x8000+10], '@'
je cnorpl
cmp [0x8000+11],dword 'CON '
je cnorpl
cmp [0x8000+11],dword 'ENU '
je cnorpl
; cmp [0x8000+12],dword 'NEL '
; je cnorpl
cmp [0x8000+10],dword ' '
je cnorpl
 
mov [app_list+edi*4],ecx
 
inc edi
 
cnorpl:
inc ecx
 
cmp eax,ecx
jge cnewpr
 
ret
 
 
draw_application_buttons:
 
pusha
 
cmp [icons],1
jne da_ret
 
mov eax,14
int 0x40
 
shr eax,16
 
cmp eax,639
jne now1
mov [max_applications],7 ;6
now1:
cmp eax,799
jne now2
mov [max_applications],10 ;8
now2:
cmp eax,1023
jne now3
mov [max_applications],13 ;8
now3:
cmp eax,1279
jne now4
mov [max_applications],18 ;8
now4:
mov edi,1
 
nb:
 
mov eax,8
mov ebx,edi
shl ebx,16
imul ebx,6*10 ;13
add ebx,15*65536+10*6-1 ;13
mov ecx,1*65536+17
mov edx,edi
add edx,51
cmp [buttons],1
je bufr
or edx,0x60000000
bufr:
mov esi,[wcolor]
sub ebx,11 shl 16
int 0x40
 
inc edi
cmp edi,[max_applications]
jbe nb
 
da_ret:
 
popa
 
ret
 
 
menu_handler:
mov eax, 19
mov ebx, filename
xor ecx, ecx
int 0x40
ret
 
draw_small_right:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
mov eax,0
mov edx,[wcolor]
mov esi,edx
mov edi,edx
or edx, 0x01000000
int 0x40
 
mov eax,8
mov ebx,0*65536+9
mov ecx,0*65536
mov cx,[b_size_y]
mov edx,1
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,2*65536+16
cmp [graph_text],1
jne nos3
mov ebx,2*65536+7
nos3:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext
mov esi,1
int 0x40
 
mov eax,12
mov ebx,2
int 0x40
 
popa
 
ret
 
 
 
draw_small_left:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
mov eax,0
mov edx,[wcolor]
mov esi,edx
mov edi,edx
or edx, 0x01000000
int 0x40
 
cmp [graph_text],1
je nos4
 
mov eax,8
mov ebx,0*65536+9
mov ecx,0*65536+18-6
mov edx,2
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,2*65536+4
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext+2
mov esi,1
int 0x40
 
nos4:
 
mov eax,8
mov ebx,0*65536+9
mov ecx,13*65536+25
cmp [graph_text],1
jne nos6
mov ecx,0*65536
mov cx,word [b_size_y]
nos6:
mov edx,1
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,3*65536+22
cmp [graph_text],1
jne nos7
mov ebx,3*65536+7
nos7:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext+1
mov esi,1
int 0x40
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
;-------------------------------------------------
 
right_button:
 
call button_music
 
mov [small_draw],dword draw_small_right
 
mcall 14
shr eax, 16
mov ebx, eax
mov ecx, -1
mov edx, 9
sub ebx, edx
mov esi, -1
mcall 67
 
call draw_small_right
 
mov eax, 23
mov ebx, 30
int 0x40
 
jmp small_wait
 
;-------------------------------------------------
 
left_button:
 
call button_music
 
mov [small_draw],dword draw_small_left
 
mov ebx, 0
mov edx, 9
mov ecx, -1
mov esi, -1
mcall 67
 
call draw_small_left
 
mov eax, 23
mov ebx, 30
int 0x40
 
;-------------------------------------------------
 
small_wait:
 
mov eax, 10
int 0x40
 
cmp eax,1
jne no_win
call [small_draw]
jmp small_wait
no_win:
 
mov eax,17
int 0x40
 
cmp ah,1
jne no_full
 
mov eax, 14 ; get screen max x & max y
int 0x40
mov edx, eax
shr edx, 16
mov ebx, -1
mov ecx, -1
mov esi, -1
mcall 67 ; x0 y0 xs ys
 
call button_music
 
jmp still
 
 
no_full:
 
call menu_handler
 
jmp small_wait
 
 
 
set_variables:
 
pusha
 
mov [b_size_y],dword 38
cmp [graph_text],1
jne noy2
mov [b_size_y],dword 18
noy2:
 
mov [button_frames],0x0
cmp [buttons],0
jne no_frames
mov [button_frames],0x40000000
no_frames:
 
 
mov eax,48 ; 3d button look
mov ebx,1
mov ecx,1
int 0x40
 
mov eax,0x40404040 ; dividers for processes
mov edi,pros
mov ecx,10
cld
rep stosd
 
popa
ret
 
 
 
; eax = number (1 or 2)
; ebx = language id
draw_flag:
pusha
 
; cmp [graph_text],0
; je mini_flag
 
; eax = 2 BIG
; eax = 1 small
 
mov edx,ebx
 
mov ebx,[maxx]
and eax,1
imul eax,17 ;17
sub ebx,eax
sub ebx,76 ;79 ;28
 
pushad
; dec ebx
sub ebx,2
shl ebx, 16
add ebx, 15 ;25
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub ebx,2
mov ecx, 5 shl 16+11
cmp [type_lang],1
je label_1
mov edx,0xff ;[wcolor]
jmp label_2
label_1:
mov edx,0x7700
label_2:
mov eax, 13
int 0x40
popad
 
shl ebx,16
add ebx,7 ;24
 
mov ecx,[bte] ; color
 
dec edx
shl edx,1
add edx,flag_text
mov esi,2
mov eax,4
int 0x40
 
mov ebx,[maxx]
sub ebx,48
shl ebx,16
mov bx,34
mov ecx,3 shl 16+14
xor edx,edx
mov eax,13
int 0x40
add ebx,1 shl 16
sub ebx,2
mov ecx,4 shl 16+12
mov edx,0x66cc
int 0x40
 
popa
ret
 
;mini_flag:
; popa
; ret
 
 
 
 
; ***************************************************
; ********* WINDOW DEFINITIONS AND DRAW *************
; ***************************************************
 
 
draw_window:
 
pusha
 
mov [running_applications],-1
mov [checks],-1
 
mov eax, 12 ; tell os about redraw
mov ebx, 1
int 0x40
 
mov eax, 48
mov ebx, 3
mov ecx, system_colours
mov edx, 10*4
int 0x40
 
mov eax, [system_colours+4*6]
mov [wcolor], eax
 
mov eax,14 ; get screen max x & max y
int 0x40
 
cmp [width],0
je no_def_width
and eax,0xffff
mov ebx,[width]
shl ebx,16
add eax,ebx
no_def_width:
 
mov ebx,eax
mov [screenxy],ebx
shr ebx,16
sub ax,38
shl eax,16
mov ecx,eax
add ecx,0*65536+38
cmp [graph_text],1
jne no_text_1
mov cx,18
add ecx,20*65536
no_text_1:
mov eax, 0 ; DEFINE AND DRAW WINDOW
mov edx, [wcolor]
or edx, 0x01000000 ; do not draw the window
mov esi, [wcolor]
or esi, 0x01000000 ; unmovable window
mov edi, [wcolor]
int 0x40
 
movzx ebx,word [screenxy+2]
mov ecx,0*65536+0
mov edx,[wcolor]
add edx,0x161616
newline:
sub edx,0x040404
mov eax,38
cmp [soften_up],1
jne no_su
int 0x40
no_su:
 
pusha
cmp [soften_down],1
jne no_sd
sub edx,0x141414
mov edi,[b_size_y]
shl edi,16
add edi,[b_size_y]
add ecx,edi
sub ecx,3*65536+3
int 0x40
no_sd:
popa
 
add ecx,1*65536+1
cmp cx,5
jb newline
 
cmp [soften_middle],1
jne no_sm
 
movzx ebx,word [screenxy+2]
mov ecx,5*65536+5
mov esi,stripe
mov edx,[wcolor]
newline3:
add edx,[esi]
add esi,4
 
mov eax,38
int 0x40
add ecx,1*65536+1
cmp cx,15
jb newline3
 
no_sm:
 
cmp [minimize_left],1
jne no_mleft
mov eax,8 ; ABS LEFT
mov ebx,0 *65536+9
mov ecx,1 *65536
add ecx,[b_size_y]
dec ecx
mov edx,101
add edx,[button_frames]
mov esi,[wcolor]
int 0x40
mov eax,4 ; HIDE TEXT
mov ebx,2*65536+17
cmp [graph_text],1
jne no_y1
mov bx,7
no_y1:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext
mov esi,1
int 0x40
no_mleft:
 
movzx eax,word [screenxy+2]
mov [maxx],eax
 
cmp [minimize_right],1
jne no_mright
mov eax,[maxx]
sub eax,77
shl eax,16
mov ebx,eax
add ebx,67
mov eax,8 ; ABS RIGHT
mov ecx,1 *65536
add ecx,[b_size_y]
dec ecx
add ebx,68*65536
mov bx,9
mov edx,102
add edx,[button_frames]
mov esi,[wcolor]
int 0x40
mov edx,hidetext+1
mov eax,4
mov ebx,[maxx]
sub ebx,6
shl ebx,16
mov bx,17
cmp [graph_text],1
jne no_y2
mov bx,7
no_y2:
mov ecx,[wcolor]
add ecx,0x303030
mov esi,1
int 0x40
no_mright:
 
call draw_menuet_icon
 
call draw_program_icons
 
mov [ptime],0
call draw_info
 
call draw_application_buttons
 
; mov ecx,[button_presssed_alt]
; mcall 47,0x80100,ecx ,400 shl 16+5,0
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
 
draw_menuet_icon:
 
pusha
 
cmp [menu_enable],1
jne no_menu
 
 
mov eax, 8 ; M BUTTON
mov ebx, 10*65536 + 47
cmp [minimize_left], 0
jne @f
sub ebx, 10*65536
@@:
mov ecx, 1*65536
add ecx, [b_size_y]
dec ecx
mov edx, 0x20000001
add edx, [button_frames]
mov esi, [wcolor]
int 0x40
 
cmp [graph_text], 1
jne no_mtext
 
push ebx
mov eax,13
mov ebx,12 shl 16+44 ;51
mov ecx,1 shl 16+17
xor edx,edx
int 0x40
; mov ebx,63 shl 16+1
mov ebx,56 shl 16+1
mov ecx,2 shl 16+15
int 0x40
mov ebx,57 shl 16+1
mov ecx,4 shl 16+11
int 0x40
mov ebx,58 shl 16+1
mov ecx,6 shl 16+7
int 0x40
; mov ebx,66 shl 16+1
; mov ecx,9 shl 16+1
; int 0x40
mov ebx,13 shl 16+43 ;50
mov ecx,2 shl 16+15
mov edx,0x7700
int 0x40
; mov ebx,62 shl 16+1
; mov ecx,3 shl 16+14
; int 0x40
mov ebx,56 shl 16+1
mov ecx,4 shl 16+11
int 0x40
mov ebx,57 shl 16+1
mov ecx,6 shl 16+7
int 0x40
pop ebx
 
mov eax, 4
mov bx, 7
add ebx, 8*65536
mov ecx, 0x10ffffff
mov edx, m_text
mov esi, 4
int 0x40
 
popa
ret
 
no_mtext:
 
 
 
mov eax,[wcolor]
mov [m_icon+4],eax
 
mov eax,6 ; load file
mov ebx,m_bmp
mov ecx,0
mov edx,200000
mov esi,image
mov edi,0
int 0x40
 
mov eax,40
mov ebx,0
mov edi,image+53
 
new_m_pix:
 
; movzx ecx,byte [edi]
; shr ecx,5
 
mov cl,[edi]
cmp cl,10
jb nopix
mov cl,[edi+1]
cmp cl,10
jb nopix
mov cl,[edi+2]
cmp cl,10
jb nopix
 
pusha
cmp [minimize_left],0
jne no_m_s2
sub ebx,10
no_m_s2:
; mov edx,[ecx*4+m_icon]
mov edx,[edi+1]
 
mov ecx,eax
mov eax,1
add ebx,12
int 0x40
popa
 
nopix:
 
add edi,3
add ebx,1
cmp ebx,40
jnz new_m_pix
 
mov ebx,0
dec eax
jnz new_m_pix
 
no_menu:
 
popa
ret
 
 
draw_program_icons:
 
pusha
 
cmp [icons],0
jne dp_ret
 
mov edi,1
push edi
 
new_icon_file:
 
pusha
mov edx,[esp+32]
add edx,10
push edx
mov esi,[wcolor]
mov ecx,1*65536
add ecx,[b_size_y]
dec ecx
mov eax,edi
dec eax
imul eax,40
mov ebx,eax
add ebx,[icons_position]
shl ebx,16
mov bx,39
pop edx
add edx,[button_frames]
or edx, 0x20000000
mov eax,8
int 0x40
popa
 
mov ecx,[esp]
add ecx,48
mov [iconf+6],cl
 
mov eax,6 ; load file
mov ebx,iconf
mov ecx,0
mov edx,200000
mov esi,image
int 0x40
 
mov eax,0
mov ebx,32
mov edi,image+51+32*33*3
 
np2: ; new pixel of file
 
mov edx,[edi]
and edx,0xffffff
 
cmp eax,3 ; Y draw limits
jb nopix2
cmp eax,36
jg nopix2
cmp ebx,38 ; X draw limits
jg nopix2
cmp ebx,2
jb nopix2
 
cmp edx,0
jz nopix2
 
cmp [graph_text],1
jne no_icon_text
 
pusha
 
mov ebx,[esp+32]
dec ebx
imul ebx,40
add ebx,8
add ebx,[icons_position]
shl ebx,16
mov bx,7
 
mov eax,4
mov ecx,0xffffff
mov edx,[esp+32]
dec edx
imul edx,4
add edx,mi_text
mov esi,4
int 0x40
 
popa
 
jmp nopix2
 
no_icon_text:
 
mov esi,[esp]
pusha
push edx
mov ecx,eax
add ecx,2
mov eax,esi
dec eax
imul eax,40
add ebx,eax
add ebx,3
add ebx,[icons_position]
pop edx
mov eax,1
int 0x40
popa
 
nopix2:
 
sub edi,3
dec ebx
jnz np2
 
mov ebx,32
add eax,1
cmp eax,32
jnz np2
 
add dword [esp],1
mov edi,[esp]
cmp dword [esp],4
jbe new_icon_file
add esp,4
 
mov eax,4
mov ebx,40
imul ebx,3
add ebx,[icons_position]
add ebx,10
shl ebx,16
mov bx,23
mov ecx,[wcolor]
mov edx,gpl
mov esi,3
int 0x40
 
dp_ret:
 
popa
ret
 
 
 
draw_info: ; draw cpu usage, time, date
 
pusha
 
cmp [setup_enable],1
jne no_setup
 
cmp [minimize_right],0
jne no_m_r
add [maxx],10
 
no_m_r:
 
mov eax,3
int 0x40
cmp eax,[ptime]
jz _ret
mov [ptime],eax
 
call draw_cpu_usage
 
mov eax,[maxx] ; blink sec
sub eax,33
shl eax,16
mov ebx,eax
add ebx,9
mov eax,3
int 0x40
cmp [graph_text],1
jne no_y4
sub bx,2
no_y4:
mov ecx,eax
shr ecx,16
and ecx,1
mov edx,[bte]
sub edx,[wcolor]
imul ecx,edx
add ecx,[wcolor]
mov edx,sec
mov eax,4
mov esi,1
int 0x40
 
 
mov eax,26 ; check for change in time or country
mov ebx,5
int 0x40
mov edx,eax
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
add edx,eax
mov eax,3
int 0x40
and eax,0xffff
add edx,eax
cmp edx,[checks]
je _ret
mov [checks],edx
 
mov ebx,[maxx]
sub ebx,48 ;;94 ;;74
shl ebx,16
add ebx,33 ;;84 ;;64
 
mov eax,8 ; time/date button
mov ecx,3 *65536
add ecx,[b_size_y]
; dec ecx
sub cx,5
mov edx,2+0x20000000
mov esi,[wcolor]
int 0x40
pusha
mov eax,13
add ebx,10*65536-16
add ecx,5*65536-8
mov edx,[wcolor]
int 0x40
popa
and edx,0xffff
add edx,[button_frames]
int 0x40
 
mov eax,8
mov ebx,[maxx]
sub ebx,77 ;80
shl ebx,16
add ebx,12
mov ecx,5 shl 16+10
mov edx,16+0x20000000 ;button 16
mov esi,[wcolor]
int 0x40
sub ebx,17 shl 16
inc edx ;button 17
int 0x40
add ebx,33 shl 16
mov bx,8
inc edx ;button 18
int 0x40
sub ebx,47 shl 16
mov bx,10
inc edx ;button 19
int 0x40
sub ebx,14 shl 16
inc edx ;button 20
int 0x40
; flags
 
mov eax,26
mov ebx,5
int 0x40
mov ebx,eax
 
mov eax,1
mov [type_lang],al
call draw_flag
 
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
mov ebx,eax
 
mov eax,2
mov [type_lang],al
call draw_flag
 
mcall 18,8,1
mov [sound_flag],al
 
mov ebx,[maxx]
sub ebx,109 ;112 ;28
shl ebx,16
mov bx,12
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub bx,2
mov ecx,5 shl 16+11
mov edx,0xcc
int 0x40
add ebx,1 shl 16
mov bx,5
mov ecx,8 shl 16+5
mov edx,0xdddd00
int 0x40
add ebx,5 shl 16
mov bx,1
mov ecx,7 shl 16+7
int 0x40
add ebx,1 shl 16
mov ecx,6 shl 16+9
int 0x40
add ebx,1 shl 16
mov ecx,5 shl 16+11
int 0x40
 
; cmp [music_type],0
; jne dalshe
cmp [sound_flag],0
je dalshe
 
sub ebx,8 shl 16
ror ebx,16
mov cx,bx
rol ebx,16
mov bx,cx
add bx,8
mov ecx,5 shl 16+15
mov edx,0xff0000
mov eax,38
int 0x40
add ebx,1 shl 16
inc bx
int 0x40
rol ecx,16
int 0x40
sub ebx,1 shl 16
dec bx
int 0x40
 
dalshe:
 
mov ebx,[maxx]
sub ebx,123
shl ebx,16
mov bx,12
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub bx,2
mov ecx,5 shl 16+11
mov edx,0xffcc00
int 0x40
mov eax,4
mov ebx,[maxx]
sub ebx,121
shl ebx,16
mov bx,7
mov ecx,0x10000000
mov edx,file_sys
mov esi,1
int 0x40
add ebx,1 shl 16
int 0x40
 
; sub ebx,14 shl 16
; mov bx,7
; mov edx,turn_text
; mov esi,1
 
; mov ecx,0x60a060 ;[wcolor]
; add ecx,0x303030
; mov eax,4
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; int 0x40
 
; add ebx,1 shl 16
; mov ecx,0x60a060 ;[wcolor]
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; sub ecx,0x303030
; int 0x40
 
; sub ebx,6 shl 16
; mov bx,1
; mov ecx,2 shl 16+15
; mov edx,0x60a060 ;[wcolor]
; add edx,0x303030
; mov eax,13
; int 0x40
; add ebx,1 shl 16
; mov bx,1
; mov edx,0x60a060 ;[wcolor]
; int 0x40
; add ebx,1 shl 16
; mov bx,1
; sub edx,0x303030
; int 0x40
; add ebx,1 shl 16
; mov edx,[wcolor]
; int 0x40
 
mov eax,3 ; get time
int 0x40
 
movzx ebx,al
shr eax,8
movzx ecx,al
shr eax,8
movzx edx,al
 
; ebx ecx edx h m s
 
push ebx
push ecx
 
mov eax,[maxx]
sub eax,32
shl eax,16
mov ebx,eax
add ebx,9
 
mov ecx,[bte]
 
cmp [graph_text],1
jne no_y3
sub bx,2
mov ecx,0xffffff
no_y3:
 
 
mov edx,[esp] ; __:_X
and edx,15
mov eax,4
add ebx,10*65536
add edx,text
mov esi,1
int 0x40
 
pop edx ; __:X_
shr edx,4
and edx,15
mov eax,4
sub ebx,6*65536
add edx,text
mov esi,1
int 0x40
 
mov edx,[esp] ; _X:__
and edx,15
mov eax,4
sub ebx,11*65536
add edx,text
mov esi,1
int 0x40
 
pop edx ; X_:__
shr edx,4
and edx,15
mov eax,4
sub ebx,6*65536
add edx,text
mov esi,1
int 0x40
 
call draw_cpu_usage
 
_ret:
 
cmp [minimize_right],0
jne no_m_r2
sub [maxx],10
no_m_r2:
 
no_setup:
 
popa
ret
 
 
 
draw_cpu_usage:
 
pusha
 
mov [ysi],30
cmp [graph_text],1
jne @f
mov [ysi],10
@@:
 
 
mov eax,18 ; TSC / SEC
mov ebx,5
int 0x40
shr eax,20
push eax
mov eax,18 ; IDLE / SEC
mov ebx,4
int 0x40
shr eax,20
xor edx,edx
imul eax,[ysi]
 
cdq
pop ebx
inc ebx
div ebx
push eax
 
mov eax,13
mov ebx,[maxx]
sub ebx,60 ;;65
shl ebx,16
mov bx,8
push ebx
mov eax,13
mov ecx,5*65536
add cx,word [ysi]
inc cx
 
push ebx
inc ecx
sub ebx,1 shl 16
add ebx,2
xor edx,edx
int 0x40
dec ecx
pop ebx
 
mov edx,0xff0000 ;[wcolor]
; sub edx,0x303030
int 0x40
pop ebx
pop eax
 
; push ebx
inc eax
mov ecx,5*65536
mov cx,ax
; pop ebx
push ecx
push ebx
sub ecx,1 shl 16
add ecx,1
sub ebx,1 shl 16
add ebx,2
mov eax,13
xor edx,edx
int 0x40
pop ebx
pop ecx
mov edx,0x44aa44 ;[wcolor]
; add edx,0x00101010
int 0x40
 
popa
 
ret
 
 
 
 
; DATA
 
stripe:
dd -0x010101
dd -0x010101
dd -0x020202
dd -0x010101
dd -0x000000
 
dd 0x000000
dd 0x010101
dd 0x020202
dd 0x010101
dd 0x010101
 
m_icon:
dd 0x0
dd 0x808080
dd 0x000000
dd 0x000000
dd 0xffffff
 
 
lsz m_text,\
ru, "Œ…ž",\
en, "MENU"
 
mi_text db 'WAVETETRBGRDGPL '
 
flag_text db 'EnFiGeRuFr'
 
type_lang db 0
;music_type db 1
sound_flag db 0
button_frames dd 0x0
 
checks dd -1
hidetext db 0x11,0x10,0x1e
iconf db 'MBAR_IX BMP'
m_bmp db 'MENUET BMP'
 
sysmeter db 'SYSMETER '
file_end db 'END '
file_sys db 'SETUP '
filename db 'MENU '
turn_text db '><'
;file1 db 'SB '
;file2 db 'TETRIS '
;file3 db 'PIC4 '
;file4 db 'TINYPAD '
;file4_par db 'COPYING.TXT',0
;file5 db 'MFASM '
file6 db 'CALENDAR '
gpl db 'GPL'
 
chlang db 'LANG',0
syslang db 'SLAN',0
 
contrast db 0
 
running_applications dd 0x100
max_applications dd 11
 
b_size_y: dd 0x0
ysi dd 0
small_draw dd 0x0
 
ptime dd 0x0
maxx dd 0x0
text db '0123456789'
bte dd 0xccddee
 
wcolor dd 0x506070
 
sec db ': '
pros db ' '
db ' '
 
screenxy dd 0x0
stcount dd 0x0
 
I_END:
area9 rb 100
system_colours rd 10
app_list rd 50
tictable:
rd 256
image:
/programs/panel/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @panel.asm @panel
@pause
/programs/panel/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @panel.asm @panel
@pause
/programs/panel/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/panel/trunk/setup.asm
0,0 → 1,1648
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; DEVICE SETUP ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
; Authors: Ville - original version
; A. Ivushkin - autostart (w launcher)
; M. Lisovin - added many feauters (apply all, save all, set time...)
; I. Poddubny - fixed russian keymap
 
;******************************************************************************
use32
org 0x0
db 'MENUET01' ; 8 byte identifier
dd 0x01 ; header version
dd START ; pointer to program start
dd I_END ; size of image
dd 0x4000 ; reguired amount of memory
dd 0x4000 ; stack pointer (esp)
dd I_PARAM,0 ; parameters, reserved
include 'MACROS.INC'
;******************************************************************************
 
LLL equ (56+3)
BBB equ 25
 
;******************************************************************************
apply_all:
 
mov eax,6 ; load saved settings from SETUP.DAT
mov ebx,filename
xor ecx,ecx
or edx,-1
mov esi,keyboard
int 0x40
 
call _midibase ;1
call _sound_dma ;10
call _pci_acc ;12
call _sb16 ;4
call _wssp ;6
call _syslang ;5
call _keyboard ;2
 
call get_disk_info
cmp [cd],0
jne no_cd
call _cdbase ;3
no_cd:
cmp [hd],0
jne no_hd
call _lba_read ;11
call _hdbase ;7
call _f32p ;8
no_hd:
ret
;-------------------------------------------------------------------------------
get_disk_info:
mov [hd],1
mov [cd],1
mov [hdbase],0
mov [cdbase],0
mcall 18,11,1,table_area
 
ide_0:
mov al,[table_area+1]
shr al,6
cmp al,0
je ide_1
cmp al,01b
jnz ide_0_cd
mov [hdbase],1
mov [hd],0
jmp ide_1
 
ide_0_cd:
cmp al,10b
jnz ide_1
mov [cdbase],1
mov [cd],0
cmp [hd],0
je all_device
 
ide_1:
mov al,[table_area+1]
shl al,2
shr al,6
cmp al,0
je ide_2
cmp al,01b
jnz ide_1_cd
cmp [hd],0
je ide_11
mov [hdbase],2
mov [hd],0
ide_11:
cmp [cd],0
je all_device
jmp ide_2
 
ide_1_cd:
cmp al,10b
jnz ide_2
cmp [cd],0
je ide_11_cd
mov [cdbase],2
mov [cd],0
ide_11_cd:
cmp [hd],0
je all_device
 
ide_2:
mov al,[table_area+1]
shl al,4
shr al,6
cmp al,0
je ide_3
cmp al,01b
jnz ide_2_cd
cmp [hd],0
je ide_21
mov [hdbase],3
mov [hd],0
ide_21:
cmp [cd],0
je all_device
jmp ide_3
 
ide_2_cd:
cmp al,10b
jnz ide_3
cmp [cd],0
je ide_21_cd
mov [cdbase],3
mov [cd],0
ide_21_cd:
cmp [hd],0
je all_device
 
ide_3:
mov al,[table_area+1]
shl al,6
shr al,6
cmp al,0
je not_device
cmp al,01b
jnz ide_3_cd
cmp [hd],0
je ide_31
mov [hdbase],4
mov [hd],0
ide_31:
cmp [cd],0
jmp all_device
 
ide_3_cd:
cmp al,10b
jnz not_device
cmp [cd],0
je all_device
mov [cdbase],4
mov [cd],0
 
all_device:
not_device:
ret
 
hd db 0
cd db 0
;******************************************************************************
apply_all_and_exit:
call apply_all
jmp close
 
;******************************************************************************
set_language_and_exit:
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
; cmp eax,5
; jne @f
; xor eax,eax
;@@: mov [keyboard],eax
cmp eax,1
je russian
xor eax,eax
set_lang_now:
mov [keyboard],eax
call _keyboard
jmp close
russian:
mov eax,3
jmp set_lang_now
 
set_syslanguage_and_exit:
mov eax,26
mov ebx,5
; mov ecx,9
int 0x40
cmp eax,4
jne temp ;@f
xor eax,eax
;@@: inc eax
temp: inc eax
mov [syslang],eax
call _syslang
jmp close
 
get_setup_values:
mcall 26,1
mov [midibase],eax
mcall 26,2,9
dec eax
mov [keyboard],eax
mcall 26,3
mov [cdbase],eax
mcall 26,4
mov [sb16],eax
mcall 26,5
mov [syslang],eax
mcall 26,6
cmp eax,0x530
jne s_wss_2
mov eax,1
jmp get_other
s_wss_2:
cmp eax,0x608
jne s_wss_3
mov eax,2
jmp get_other
s_wss_3:
cmp eax,0xe80
jne s_wss_4
mov eax,3
jmp get_other
s_wss_4:
mov eax,4
get_other:
mov [wss],eax
mcall 26,7
mov [hdbase],eax
mcall 26,8
mov [f32p],eax
mcall 26,10
mov [sound_dma],eax
mcall 26,11
mov [lba_read],eax
mcall 26,12
mov [pci_acc],eax
ret
 
;******************************************************************************
 
START:
cmp [I_PARAM], 'SLAN'
je set_syslanguage_and_exit
 
cmp [I_PARAM], 'LANG'
je set_language_and_exit
 
; mov eax,6 ; load saved settings from SETUP.DAT
; mov ebx,filename
; xor ecx,ecx
; or edx,-1
; mov esi,keyboard
; int 0x40
 
cmp [I_PARAM], 'BOOT'
je apply_all_and_exit
 
call loadtxt
call get_setup_values
red:
call draw_window
 
still:
 
cmp word [blinkpar],0
jne blinker
mov eax,29 ;get system date
int 0x40
cmp eax,[date]
je gettime
mov [date],eax
gettime:
mov eax,3 ;get system time
int 0x40
cmp ax,[time]
je sysevent
mov [time],ax
call drawtime
 
sysevent:
mov eax,23
mov ebx,8 ; wait here for event with timeout
int 0x40
 
cmp eax,1
jz red
cmp eax,2
jz key
cmp eax,3
jz button
 
jmp still
 
blinker:
cmp byte [count],6
jb noblink
btc dword [blinkpar],16
mov byte [count],0
call drawtime
noblink:
inc byte [count]
jmp sysevent
 
incdectime:
cmp byte [blinkpar],0
je still
mov esi,time
mov bl,0x23 ;border
cmp byte [blinkpar],1
je hours
mov bl,0x59 ;minutes
inc esi
hours:
mov al,byte [esi]
cmp ah,112
je dectime
cmp al,bl
je noinctime
inc al
daa
jmp incdectime1
noinctime:
xor al,al
incdectime1:
mov byte [esi],al
jmp still
dectime:
cmp al,0
je nodectime
dec al
das
jmp incdectime1
nodectime:
mov al,bl
jmp incdectime1
 
incdecdate:
cmp byte [blinkpar+1],0
je still
mov esi,date
mov bl,0 ;border of years
cmp byte [blinkpar+1],1
jne days
mov bl,0x12 ;months
inc esi
days:
cmp byte [blinkpar+1],2
jne nodays
mov bl,0x31
add esi,2
nodays:
mov al,byte [esi]
cmp ah,122
je decdate
cmp al,bl
je noincdate
inc al ;add al,1
daa
jmp incdecdate1
noincdate:
mov al,1
incdecdate1:
mov byte [esi],al
jmp still
decdate:
cmp al,1
je nodecdate
dec al
das
jmp incdecdate1
nodecdate:
mov al,bl
jmp incdecdate1
 
 
key:
;mov eax,2
int 0x40
cmp ah,27
jne still
mov dword [blinkpar],0
call drawtime
jmp still
 
button:
 
mov eax,17
int 0x40
 
cmp ah,112
je incdectime
cmp ah,113
je incdectime
cmp ah,122
je incdecdate
cmp ah,123
je incdecdate
cmp ah,111
jne noseltime
mov al, [blinkpar]
cmp al,2
jae seltime
inc al
jmp seltime1
seltime:
xor al,al
seltime1:
mov [blinkpar],al
call drawtime
jmp still
noseltime:
cmp ah,121
jne noseldate
mov al,byte [blinkpar+1]
cmp al,3
jae seldate
inc al
jmp seldate1
seldate:
xor al,al
seldate1:
mov [blinkpar+1],al
call drawtime
jmp still
noseldate:
cmp ah,99
jne nosaveall
mov eax,33
mov ebx,filename
mov ecx,keyboard
mov edx,48
xor esi,esi
int 0x40
call settime
mov dword [blinkpar],0
call drawtime
jmp still
nosaveall:
cmp ah,100
jne no_apply_all
call apply_all
jmp still
no_apply_all:
 
cmp ah,1 ; CLOSE APPLICATION
jne no_close
close:
or eax,-1
int 0x40
no_close:
 
cmp ah,11 ; SET MIDI BASE
jnz nosetbase1
call _midibase
nosetbase1:
cmp ah,12
jnz nomm
sub [midibase],2
call draw_infotext
nomm:
cmp ah,13
jnz nomp
add [midibase],2
call draw_infotext
nomp:
 
 
cmp ah,4 ; SET KEYBOARD
jnz nokm
mov eax,[keyboard]
test eax,eax
je downuplbl
dec eax
jmp nodownup
downuplbl:
mov eax,4
nodownup:
mov [keyboard],eax
call draw_infotext
nokm:
cmp ah,5
jnz nokp
mov eax,[keyboard]
cmp eax,4
je updownlbl
inc eax
jmp noupdown
updownlbl:
xor eax,eax
noupdown:
mov [keyboard],eax
call draw_infotext
nokp:
 
 
cmp ah,22 ; SET CD BASE
jnz nocm
mov eax,[cdbase]
sub eax,2
and eax,3
inc eax
mov [cdbase],eax
call draw_infotext
nocm:
cmp ah,23
jnz nocp
mov eax,[cdbase]
and eax,3
inc eax
mov [cdbase],eax
call draw_infotext
nocp:
cmp ah,21
jnz nocs
call _cdbase
nocs:
 
cmp ah,62 ; SET HD BASE
jnz hnocm
mov eax,[hdbase]
sub eax,2
and eax,3
inc eax
mov [hdbase],eax
call draw_infotext
hnocm:
cmp ah,63
jnz hnocp
mov eax,[hdbase]
and eax,3
inc eax
mov [hdbase],eax
call draw_infotext
hnocp:
cmp ah,61
jnz hnocs
call _hdbase
hnocs:
 
cmp ah,82 ; SET SOUND DMA
jne no_sdma_d
mov eax,[sound_dma]
dec eax
sdmal:
and eax,3
mov [sound_dma],eax
call draw_infotext
jmp still
no_sdma_d:
cmp ah,83
jne no_sdma_i
mov eax,[sound_dma]
inc eax
jmp sdmal
no_sdma_i:
cmp ah,81
jne no_set_sound_dma
call _sound_dma
jmp still
no_set_sound_dma:
 
cmp ah,92 ; SET LBA READ
jne no_lba_d
slbal:
btc [lba_read],0
call draw_infotext
jmp still
no_lba_d:
cmp ah,93
jne no_lba_i
jmp slbal
no_lba_i:
cmp ah,91
jne no_set_lba_read
call _lba_read
jmp still
no_set_lba_read:
 
 
cmp ah,102 ; SET PCI ACCESS
jne no_pci_d
pcip:
btc [pci_acc],0
call draw_infotext
jmp still
no_pci_d:
cmp ah,103
jne no_pci_i
jmp pcip
no_pci_i:
cmp ah,101
jne no_set_pci_acc
call _pci_acc
jmp still
no_set_pci_acc:
 
 
set_partition:
cmp ah,72 ; SET FAT32 PARTITION
jnz .nominus
mov eax,[f32p]
sub eax,2
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
mov eax,14
@@:
inc eax
mov [f32p],eax
call draw_infotext
.nominus:
cmp ah,73
jnz .noplus
mov eax,[f32p]
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
mov eax,0
@@:
inc eax
mov [f32p],eax
call draw_infotext
.noplus:
cmp ah,71
jnz .noapply
call _f32p
.noapply:
 
cmp ah,32 ; SET SOUND BLASTER 16 BASE
jnz nosbm
sub [sb16],2
call draw_infotext
nosbm:
cmp ah,33
jnz nosbp
add [sb16],2
call draw_infotext
nosbp:
cmp ah,31
jnz nosbs
call _sb16
nosbs:
 
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
jnz nowssm
mov eax,[wss]
sub eax,2
and eax,3
inc eax
mov [wss],eax
call draw_infotext
nowssm:
cmp ah,53
jnz nowssp
mov eax,[wss]
and eax,3
inc eax
mov [wss],eax
call draw_infotext
nowssp:
cmp ah,51
jnz nowsss
call _wssp
nowsss:
 
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
jnz nosysm
mov eax,[syslang]
dec eax
jz still
mov [syslang],eax
call draw_infotext
nosysm:
cmp ah,43
jnz nosysp
mov eax,[syslang]
cmp eax,4
je nosysp
inc eax
mov [syslang],eax
call draw_infotext
nosysp:
cmp ah,41
jnz nosyss
call _syslang
call cleantxt
call loadtxt
call draw_window
call drawtime
nosyss:
 
cmp ah,3 ; SET KEYMAP
jne still
call _keyboard
jmp still
 
_keyboard:
cmp [keyboard],0
jnz nosetkeyle
mov eax,21 ; english
mov ebx,2
mov ecx,1
mov edx,en_keymap
int 0x40
mov eax,21
inc ecx
mov edx,en_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,1
int 0x40
call alt_gen
nosetkeyle:
cmp [keyboard],1
jnz nosetkeylfi
mov eax,21 ; finnish
mov ebx,2
mov ecx,1
mov edx,fi_keymap
int 0x40
mov eax,21
inc ecx
mov edx,fi_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,2
int 0x40
call alt_gen
nosetkeylfi:
cmp [keyboard],2
jnz nosetkeylge
mov eax,21 ; german
mov ebx,2
mov ecx,1
mov edx,ge_keymap
int 0x40
mov eax,21
inc ecx
mov edx,ge_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,3
int 0x40
call alt_gen
nosetkeylge:
cmp [keyboard],3
jnz nosetkeylru
mov eax,21 ; russian
mov ebx,2
mov ecx,1
mov edx,ru_keymap
int 0x40
mov eax,21
inc ecx
mov edx,ru_keymap_shift
int 0x40
call alt_gen
mov eax,21
mov ecx,9
mov edx,4
int 0x40
nosetkeylru:
cmp [keyboard],4 ;french
jnz nosetkeylfr
mov eax,21
mov ebx,2
mov ecx,1
mov edx,fr_keymap
int 0x40
mov eax,21
inc ecx
mov edx,fr_keymap_shift
int 0x40
mov eax,21
inc ecx
mov edx,fr_keymap_alt_gr
int 0x40
mov eax,21
mov ecx,9
mov edx,5
int 0x40
nosetkeylfr:
ret
 
alt_gen:
mov eax,21
mov ecx,3
mov edx,alt_general
int 0x40
ret
 
 
 
draw_buttons:
 
pusha
 
shl ecx,16
add ecx,12
mov ebx,(350-50)*65536+46+BBB
 
mov eax,8
int 0x40
 
mov ebx,(350-79)*65536+9
inc edx
int 0x40
 
mov ebx,(350-67)*65536+9
inc edx
int 0x40
 
popa
ret
 
 
 
; ********************************************
; ******* WINDOW DEFINITIONS AND DRAW *******
; ********************************************
 
 
draw_window:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
xor eax,eax ; DRAW WINDOW
mov ebx,40*65536+355+BBB
mov ecx,40*65536+300
mov edx,0x82111199
mov esi,0x805588dd
mov edi,0x005588dd
int 0x40
 
mov eax,4
mov ebx,8*65536+8
mov ecx,0x10ffffff
mov edx,labelt
cmp [syslang],4
je ruslabel
add edx,20
ruslabel:
mov esi,26
int 0x40
 
mov eax,8 ; CLOSE BUTTON
mov ebx,(355+BBB-19)*65536+12
mov ecx,5*65536+12
mov edx,1
mov esi,0x005588dd
int 0x40
; APPLY ALL
mov ebx,(350-79)*65536+100
mov ecx,251*65536+12
mov edx,100
int 0x40
add ecx,16*65536 ; SAVE ALL
dec edx
int 0x40
 
mov esi,0x5580c0
 
mov edx,11
mov ecx,43
call draw_buttons
 
mov edx,41
mov ecx,43+8*8
call draw_buttons
 
mov edx,21
mov ecx,43+4*8
call draw_buttons
 
mov edx,31
mov ecx,43+2*8
call draw_buttons
 
mov edx,3
mov ecx,43+10*8
call draw_buttons
 
mov edx,51
mov ecx,43+12*8
call draw_buttons
 
mov edx,61
mov ecx,43+6*8
call draw_buttons
 
mov edx,91
mov ecx,43+18*8
call draw_buttons
 
mov edx,71
mov ecx,43+14*8
call draw_buttons
 
mov edx,81
mov ecx,43+16*8
call draw_buttons
 
mov edx,101
mov ecx,43+20*8
call draw_buttons
 
mov edx,111
mov ecx,43+22*8 ; 22
call draw_buttons
 
mov edx,121
mov ecx,43+24*8 ; 24
call draw_buttons
 
call draw_infotext
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
 
draw_infotext:
 
pusha
 
mov eax,[keyboard] ; KEYBOARD
test eax,eax
jnz noen
mov [text00+LLL*10+28],dword 'ENGL'
mov [text00+LLL*10+32],dword 'ISH '
noen:
cmp eax,1
jnz nofi
mov [text00+LLL*10+28],dword 'FINN'
mov [text00+LLL*10+32],dword 'ISH '
nofi:
cmp eax,2
jnz noge
mov [text00+LLL*10+28],dword 'GERM'
mov [text00+LLL*10+32],dword 'AN '
noge:
cmp eax,3
jnz nogr
mov [text00+LLL*10+28],dword 'RUSS'
mov [text00+LLL*10+32],dword 'IAN '
nogr:
cmp eax,4
jnz nofr
mov [text00+LLL*10+28],dword 'FREN'
mov [text00+LLL*10+32],dword 'CH '
nofr:
 
 
mov eax,[syslang] ; SYSTEM LANGUAGE
dec eax
test eax,eax
jnz noen5
mov [text00+LLL*8+28],dword 'ENGL'
mov [text00+LLL*8+32],dword 'ISH '
noen5:
cmp eax,1
jnz nofi5
mov [text00+LLL*8+28],dword 'FINN'
mov [text00+LLL*8+32],dword 'ISH '
nofi5:
cmp eax,2
jnz noge5
mov [text00+LLL*8+28],dword 'GERM'
mov [text00+LLL*8+32],dword 'AN '
noge5:
cmp eax,3
jnz nogr5
mov [text00+LLL*8+28],dword 'RUSS'
mov [text00+LLL*8+32],dword 'IAN '
nogr5:
cmp eax,4
jne nofr5
mov [text00+LLL*8+28],dword 'FREN'
mov [text00+LLL*8+32],dword 'CH '
nofr5:
 
 
mov eax,[midibase]
mov esi,text00+LLL*0+32
call hexconvert ; MIDI BASE
 
 
mov eax,[sb16] ; SB16 BASE
mov esi,text00+LLL*2+32
call hexconvert
 
 
mov eax,[wss] ; WSS BASE
cmp eax,1
jnz nowss1
mov [wssp],dword 0x530
nowss1:
cmp eax,2
jnz nowss2
mov [wssp],dword 0x608
nowss2:
cmp eax,3
jnz nowss3
mov [wssp],dword 0xe80
nowss3:
cmp eax,4
jnz nowss4
mov [wssp],dword 0xf40
nowss4:
 
mov eax,[wssp]
mov esi,text00+LLL*12+32
call hexconvert
 
mov eax,[cdbase] ; CD BASE
cmp eax,1
jnz noe1
mov [text00+LLL*4+28],dword 'PRI.'
mov [text00+LLL*4+32],dword 'MAST'
mov [text00+LLL*4+36],dword 'ER '
noe1:
cmp eax,2
jnz nof1
mov [text00+LLL*4+28],dword 'PRI.'
mov [text00+LLL*4+32],dword 'SLAV'
mov [text00+LLL*4+36],dword 'E '
nof1:
cmp eax,3
jnz nog1
mov [text00+LLL*4+28],dword 'SEC.'
mov [text00+LLL*4+32],dword 'MAST'
mov [text00+LLL*4+36],dword 'ER '
nog1:
cmp eax,4
jnz nog2
mov [text00+LLL*4+28],dword 'SEC.'
mov [text00+LLL*4+32],dword 'SLAV'
mov [text00+LLL*4+36],dword 'E '
nog2:
 
 
mov eax,[hdbase] ; HD BASE
cmp eax,1
jnz hnoe1
mov [text00+LLL*6+28],dword 'PRI.'
mov [text00+LLL*6+32],dword 'MAST'
mov [text00+LLL*6+36],dword 'ER '
hnoe1:
cmp eax,2
jnz hnof1
mov [text00+LLL*6+28],dword 'PRI.'
mov [text00+LLL*6+32],dword 'SLAV'
mov [text00+LLL*6+36],dword 'E '
hnof1:
cmp eax,3
jnz hnog1
mov [text00+LLL*6+28],dword 'SEC.'
mov [text00+LLL*6+32],dword 'MAST'
mov [text00+LLL*6+36],dword 'ER '
hnog1:
cmp eax,4
jnz hnog2
mov [text00+LLL*6+28],dword 'SEC.'
mov [text00+LLL*6+32],dword 'SLAV'
mov [text00+LLL*6+36],dword 'E '
hnog2:
 
 
mov eax,[f32p] ; FAT32 PARTITION
add al,48
mov [text00+LLL*14+28],al
 
mov eax,[sound_dma] ; SOUND DMA
add eax,48
mov [text00+LLL*16+28],al
 
mov eax,[lba_read]
call onoff ; LBA READ
mov [text00+LLL*18+28],ebx
 
mov eax,[pci_acc]
call onoff ; PCI ACCESS
mov [text00+LLL*20+28],ebx
 
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov edx,0x80111199-19
int 0x40
 
mov edx,text00
mov ebx,10*65536+45
mov eax,4
mov ecx,0xffffff
mov esi,LLL
newline:
int 0x40
add ebx,8
add edx,LLL
cmp [edx],byte 'x'
jnz newline
 
popa
ret
 
drawtime:
mov ax,[time] ;hours 22
mov cl,1
call unpacktime
mov [text00+LLL*22+28],word bx
mov al,ah ;minutes
inc cl
call unpacktime
mov [text00+LLL*22+31],word bx
mov eax,[date]
mov ch,3
call unpackdate
mov [text00+LLL*24+34],word bx ;year 24
mov al,ah
mov ch,1
call unpackdate
mov [text00+LLL*24+28],word bx ;month
bswap eax
mov al,ah
inc ch
call unpackdate
mov [text00+LLL*24+31],word bx ;day
 
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov edx,0x80111199-19
int 0x40
 
mov edx,text00
mov ebx,10*65536+45
mov eax,4
mov ecx,0xffffff
mov esi,LLL
newline1:
int 0x40
add ebx,8
add edx,LLL
cmp [edx],byte 'x'
jnz newline1
ret
 
unpacktime:
cmp byte [blinkpar],cl ;translate packed number to ascii
jne unpack1
chkblink:
bt dword [blinkpar],16
jnc unpack1
xor bx,bx
ret
unpackdate:
cmp byte [blinkpar+1],ch
je chkblink
unpack1:
xor bx,bx
mov bh,al
mov bl,al
and bh,0x0f
shr bl,4
add bx,0x3030
ret
 
hexconvert: ;converting dec to hex in ascii
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
mov [esi],cl
shr eax,4
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
dec esi
mov [esi],cl
shr eax,4
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
dec esi
mov [esi],cl
ret
 
onoff:
cmp [syslang],4
jne norus1
mov ebx,'„€ '
cmp eax,1
je exitsub
mov ebx,'…’ '
ret
norus1:
mov ebx,'ON '
cmp eax,1
je exitsub
mov ebx,'OFF '
exitsub:
ret
 
_midibase:
mov eax,21
mov ebx,1
mov ecx,[midibase]
int 0x40
ret
 
_cdbase:
mov eax,21
mov ebx,3
mov ecx,[cdbase]
int 0x40
ret
 
_hdbase:
mov eax,21
mov ebx,7
mov ecx,[hdbase]
int 0x40
ret
 
_sound_dma:
mov eax,21
mov ebx,10
mov ecx,[sound_dma]
int 0x40
ret
 
_lba_read:
mov eax,21
mov ebx,11
mov ecx,[lba_read]
int 0x40
ret
 
_pci_acc:
mov eax,21
mov ebx,12
mov ecx,[pci_acc]
int 0x40
ret
 
_f32p:
mov eax,21
mov ebx,8
mov ecx,[f32p]
int 0x40
ret
 
_sb16:
mov eax,21
mov ebx,4
mov ecx,[sb16]
int 0x40
ret
 
_wssp:
mov eax,21
mov ebx,6
mov ecx,[wssp]
int 0x40
ret
 
_syslang:
mov eax,21
mov ebx,5
mov ecx,[syslang]
int 0x40
ret
 
loadtxt:
cld
mov edi,text00
mov ecx,428
cmp [syslang],4
jne norus
mov esi,textrus
jmp sload
norus:
mov esi,texteng
sload:
rep movsd
ret
 
cleantxt:
xor eax,eax
mov ecx,428
cld
mov edi,text00
rep stosd
mov [text00+1711],byte 'x'
ret
 
settime:
mov dx,0x70
call startstopclk
dec dx
mov al,2 ;set minutes
out dx,al
inc dx
mov al,byte [time+1]
out dx,al
dec dx
mov al,4 ;set hours
out dx,al
inc dx
mov al,byte [time]
out dx,al
dec dx
mov al,7 ;set day
out dx,al
inc dx
mov al,byte [date+2]
out dx,al
dec dx
mov al,8 ;set month
out dx,al
inc dx
mov al,byte [date+1]
out dx,al
dec dx
mov al,9 ;set year
out dx,al
inc dx
mov al,byte [date]
out dx,al
dec dx
call startstopclk
ret
 
startstopclk:
mov al,0x0b
out dx,al
inc dx
in al,dx
btc ax,7
out dx,al
ret
 
; DATA AREA
count: db 0x0
blinkpar: dd 0x0
time: dw 0x0
date: dd 0x0
 
filename: db 'SETUP DAT',0
 
textrus:
 
db ' §  MIDI ROLAND MPU-401 : 0x320 - + à¨¬¥­¨âì'
db ' '
db ' §  SoundBlaster 16 : 0x240 - + à¨¬¥­¨âì'
db ' '
db ' §  CD-ROM  : PRI.SLAVE - + à¨¬¥­¨âì'
db ' '
db ' §  †„-1 : PRI.MASTER - + à¨¬¥­¨âì'
db ' '
db 'Ÿ§ëª á¨á⥬ë : ENGLISH - + à¨¬¥­¨âì'
db ' '
db ' áª« ¤ª  ª« ¢¨ âãàë : ENGLISH - + à¨¬¥­¨âì'
db ' '
db ' §  WSS : 0x200 - + à¨¬¥­¨âì'
db ' '
db ' §¤¥« FAT32 ­  †„-1 : 1 - + à¨¬¥­¨âì'
db ' '
db '‡¢ãª®¢®© ª ­ « DMA : 1 - + à¨¬¥­¨âì'
db ' '
db '‚ª«îç¨âì LBA : OFF - + à¨¬¥­¨âì'
db ' '
db '„®áâ㯠ª 設¥ PCI : OFF - + à¨¬¥­¨âì'
db ' '
db '‘¨á⥬­®¥ ¢à¥¬ï : 0:00 - + ‚ë¡®à '
db ' '
db '‘¨á⥬­ ï ¤ â  (¬,¤,£) : 00/00/00 - + ‚ë¡®à '
db ' '
db '‚ˆŒ€ˆ…: à¨¬¥­¨âì ¢á¥ '
db 'ˆ‘Ž‹œ‡“‰’… „Ž‘’“ Š FAT-32 Ž‘’ŽŽ†Ž! '
db '… ‡€“„œ’… ‘Ž•€ˆ’œ €‘’Ž‰Šˆ ‘®åà ­¨âì ¢á¥ '
db 'x'
 
texteng:
 
db 'MIDI: ROLAND MPU-401 BASE : 0x320 - + APPLY '
db ' '
db 'SOUND: SB16 BASE : 0x240 - + APPLY '
db ' '
db 'CD-ROM BASE : PRI.SLAVE - + APPLY '
db ' '
db 'HARDDISK-1 BASE : PRI.MASTER - + APPLY '
db ' '
db 'SYSTEM LANGUAGE : ENGLISH - + APPLY '
db ' '
db 'KEYBOARD LAYOUT : ENGLISH - + APPLY '
db ' '
db 'WINDOWS SOUND SYSTEM BASE : 0x200 - + APPLY '
db ' '
db 'FAT32-1 PARTITION IN HD-1 : 1 - + APPLY '
db ' '
db 'SOUND DMA CHANNEL : 1 - + APPLY '
db ' '
db 'LBA READ ENABLED : OFF - + APPLY '
db ' '
db 'PCI ACCESS FOR APPL. : OFF - + APPLY '
db ' '
db 'SYSTEM TIME : 0:00 - + SELECT '
db ' '
db 'SYSTEM DATE (M,D,Y) : 00/00/00 - + SELECT '
db ' '
db 'NOTE: APPLY ALL '
db 'TEST FAT32 FUNCTIONS WITH EXTREME CARE '
db 'SAVE YOUR SETTINGS BEFORE QUIT MENUET SAVE ALL '
db 'x'
 
labelt:
db '€‘’Ž‰Š€ “‘’Ž‰‘’‚ MENUET DEVICE SETUP '
 
hex db '0123456789ABCDEF'
 
alt_general:
 
; db ' ',27
; db ' @ $ {[]}\ ',8,9
; db ' ',13
; db ' ',0,' ',0,'4',0,' '
; db ' ',180,178,184,'6',176,'7'
; db 179,'8',181,177,183,185,182
; db 'ABCD',255,'FGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
en_keymap:
 
db '6',27
db '1234567890-=',8,9
db 'qwertyuiop[]',13
db '~asdfghjkl;',39,96,0,'\zxcvbnm,./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
en_keymap_shift:
 
db '6',27
db '!@#$%^&*()_+',8,9
db 'QWERTYUIOP{}',13
db '~ASDFGHJKL:"~',0,'|ZXCVBNM<>?',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fr_keymap:
 
db '6',27
db '&Ž"',39,'(-_“)=',8,9
db 'azertyuiop^$',13
db '~qsdfghjklm’',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
fr_keymap_shift:
 
 
db '6',27
db '1234567890+',8,9
db 'AZERTYUIOP•”',13
db '~QSDFGHJKLM%',0,'–WXCVBN?./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fr_keymap_alt_gr:
 
 
db '6',27
db 28,'~#{[|˜\^@]}',8,9
db 'azertyuiop^$',13
db '~qsdfghjklm’',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
 
fi_keymap:
 
db '6',27
db '1234567890+[',8,9
db 'qwertyuiop',192,'~',13
db '~asdfghjkl',194,193,'1',0,39,'zxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fi_keymap_shift:
 
db '6',27
db '!"#%&/()=?]',8,9
db 'QWERTYUIOP',200,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*ZXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
ge_keymap:
 
db '6',27
db '1234567890?[',8,9
db 'qwertzuiop',203,'~',13
db '~asdfghjkl',194,193,'1',0,39,'yxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
ge_keymap_shift:
 
db '6',27
db '!"#$%&/()=',197,']',8,9
db 'QWERTZUIOP',195,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*YXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
ru_keymap:
 
db '6',27
db '1234567890-=',8,9
db '©æ㪥­£èé§åê',13
db 0,"ä뢠¯à®«¤¦í"
db 0xf1, '-/'
db "ïçᬨâì¡î",'.-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
ru_keymap_shift:
 
db '6',27
db '!"N;%:?*()_+',8,0
db "‰–“Š…ƒ˜™‡•š",13
db 0,"”›‚€Ž‹„†"
db 0xf0, '-\'
db "Ÿ—‘Œˆ’œž",',-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
I_PARAM dd 0
 
keyboard dd 0x0
midibase dd 0x320
cdbase dd 0x2
sb16 dd 0x220
syslang dd 0x1
wss dd 0x1
wssp dd 0x0
hdbase dd 0x1
f32p dd 0x1
sound_dma dd 0x1
lba_read dd 0x1
pci_acc dd 0x1
 
text00:
 
I_END:
table_area:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property