1,22 → 1,19 |
; |
|
; END |
; KolibriOS Team 2005-2013 |
; |
; <diamond> note that 'mov al,xx' is shorter than 'mov eax,xx' |
; and if we know that high 24 bits of eax are zero, we can use 1st form |
; the same about ebx,ecx,edx |
; KolibriOS Team 2005-2015 |
|
fade equ 0 |
|
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à |
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à |
org 0x0 ; ¤à¥á æ¨ï á ã«ï |
|
db 'MENUET01' ; 8-¡ ©âë© ¨¤¥â¨ä¨ª â®à MenuetOS |
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1) |
dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë |
dd IM_END ; à §¬¥à ¯à®£à ¬¬ë |
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
dd stacktop ; ¤à¥á ¢¥àè¨ë á⥪ |
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ |
db 'MENUET01' ; 8-¡ ©âë© ¨¤¥â¨ä¨ª â®à MenuetOS |
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1) |
dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë |
dd IM_END ; à §¬¥à ¯à®£à ¬¬ë |
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
dd stacktop ; ¤à¥á ¢¥àè¨ë á⥪ |
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ |
dd cur_dir_path |
|
include 'lang.inc' |
26,43 → 23,43 |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
|
@use_library |
@use_library |
|
align 4 |
START: |
|
load_libraries l_libs_start,end_l_libs |
inc eax |
test eax,eax |
jz close |
inc eax |
test eax,eax |
jz close |
|
push dword check1 |
call [init_checkbox2] |
push dword check1 |
call [init_checkbox2] |
|
stdcall dll.Init,[init_lib] |
|
invoke ini_get_int,ini_file,asettings,aautosave,0 |
mov [autosave],eax |
dec eax |
jnz @f |
bts dword [check1.flags],1 |
invoke ini_get_int,ini_file,asettings,aautosave,0 |
mov [autosave],eax |
dec eax |
jnz @f |
bts dword [check1.flags],1 |
@@: |
mcall 40,0x80000027 |
mcall 40,0x80000027 |
redraw: |
call draw_window |
still: |
mov al,10 |
mcall ;wait here for event |
mcall ;wait here for event |
dec eax |
jz redraw |
jz redraw |
dec eax |
jz key |
jz key |
dec eax |
jz button |
jz button |
|
push dword check1 |
call [check_box_mouse2] |
bt dword [check1.flags],1 |
bt dword [check1.flags],1 |
jnc @f |
mov [autosave],1 |
jmp still |
72,7 → 69,7 |
|
key: |
mov al,2 |
mcall ;eax=2 - get key code |
mcall ;eax=2 - get key code |
mov al,ah |
cmp al,13 |
je restart |
89,14 → 86,14 |
mcall -1 |
|
button: |
mcall 17 ;eax=17 - get pressed button id |
mcall 17 ;eax=17 - get pressed button id |
xchg al,ah |
dec eax |
jz close |
jz close |
dec eax |
jz restart_kernel |
jz restart_kernel |
dec eax |
jz restart |
jz restart |
dec eax |
jnz checkbox |
|
131,12 → 128,12 |
|
if fade=0 |
mov al,4 |
mcall ,<50,110> ,0x800000cc,label7 ;eax=4 - write text |
mcall ,<50,120> ,0x800000cc,label7 ;eax=4 - write text |
end if |
|
mcall 70,rdsave |
test eax,eax |
js no_save |
js no_save |
mov ecx,eax |
mcall 18,21 |
mov ecx,eax |
150,7 → 147,7 |
pop ecx |
mcall 9,proc_info |
cmp [proc_info+50],9 |
je no_save |
je no_save |
jmp @b |
no_save: |
pop ecx |
159,7 → 156,7 |
|
checkbox: |
btc dword [check1.flags],1 |
jc .1 |
jc .1 |
mov [autosave],1 |
jmp .draw |
.1: |
174,34 → 171,34 |
mcall ,1 |
|
mov al,14 |
mcall ;eax=14 - get screen max x & max y |
mcall ;eax=14 - get screen max x & max y |
movzx ecx,ax |
shr eax,17 |
shl eax,16 |
lea ebx,[eax-110 shl 16+222] |
lea ebx,[eax-165 shl 16+332] |
shr ecx,1 |
shl ecx,16 |
lea ecx,[ecx-70 shl 16+122] |
lea ecx,[ecx-70 shl 16+132] |
|
xor eax,eax |
mcall , , ,[color1],0x01000000 ;define and draw window |
mcall , , ,[color1],0x01000000 ;define and draw window |
|
mov al,13 |
mcall ,<0,223> ,<0,123> |
mcall ,<1,221>,<1,121>,[color2] |
mcall ,<2,220>,<2,120>, [color3] |
mcall ,<0,333> ,<0,133> |
mcall ,<1,331>,<1,131>,[color2] |
mcall ,<2,330>,<2,130>, [color3] |
|
mov al,8 |
mcall ,<16,90> ,<20,27>,4,[color4] ;eax=8 - draw buttons |
mcall ,<113,90>, ,2,[color5] |
mcall , ,<54,27>,1,[color6] |
mcall ,<16,90> , ,3,[color7] |
mcall ,<16,144> ,<16,36>,4,[color4] ;eax=8 - draw buttons |
mcall ,<170,144>, ,2,[color5] |
mcall , ,<62,36>,1,[color6] |
mcall ,<16,144> , ,3,[color7] |
|
mov al,4 |
mcall ,<27,24> ,[color8],label2 ;eax=4 - write text |
mcall ,<23,58> , ,label3 |
mcall ,<47,37> , ,label5 |
mcall ,<41,71> , ,label6 |
mcall ,<28,19> ,[color8],label2 ;eax=4 - write text |
mcall ,<28,65> , ,label3 |
mcall ,<64,40> ,[color9],label5 |
mcall ,<64,86> , ,label6 |
|
push dword check1 |
call [check_box_draw2] |
222,12 → 219,12 |
autosave rd 1 |
;--------------------------------------------------------------------- |
cur_dir_path: |
rb 4096 |
rb 4096 |
;--------------------------------------------------------------------- |
library_path: |
rb 4096 |
rb 4096 |
;--------------------------------------------------------------------- |
align 32 |
rb 4096 |
rb 4096 |
stacktop: |
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë |
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë |