- bug-fix and optimization

git-svn-id: svn://kolibrios.org@604 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Rus 2007-08-03 00:43:10 +00:00
parent 7d78d661a3
commit db2f7da2e5

View File

@ -13,27 +13,27 @@ include '..\..\..\macros.inc'
meos_app_start meos_app_start
code code
mov eax, 48 ; ¯®«ãç¨âì á¨á⥬­ë¥ æ¢¥â  mov eax, 48 ; ¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx, 3 mov ebx, 3
mov ecx, sc ;  ¤à¥á áâàãªâãàë mov ecx, sc ;  ¤à¥á áâàãªâãàë
mov edx, sizeof.system_colors ; ¨ ¥¥ à §¬¥à mov edx, sizeof.system_colors ; ¨ ¥¥ à §¬¥à
mcall mcall
mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ᮡë⨩ mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ᮡë⨩
mov ebx,100000b ; ­ á ¨­â¥à¥áã¥â ⮫쪮 ¬ëèì mov ebx,100000b ; ­ á ¨­â¥à¥áã¥â ⮫쪮 ¬ëèì
mcall mcall
still: ; £« ¢­ë© 横« ®á­®¢­®£® ¯à®æ¥áá  still: ; £« ¢­ë© 横« ®á­®¢­®£® ¯à®æ¥áá 
mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï
mcall mcall
mov eax,37 ; ª ª¨¥ ­ ¦ âë ª¯®¯ª¨? mov eax,37 ; ª ª¨¥ ­ ¦ âë ª¯®¯ª¨?
mov ebx,2 mov ebx,2
mcall mcall
cmp eax,2 ; ¥á«¨ ­¥ ¯à ¢ ï, ¢®§¢à â cmp eax,ebx ; ¥á«¨ ­¥ ¯à ¢ ï, ¢®§¢à â
jne still jne still
;---¯®¥å «¨!--- ;---¯®¥å «¨!---
@ -44,99 +44,99 @@ still: ;
; je exit ; je exit
mov eax,9 ; ¯®«ã稬 ç¨á«® ¯à®æ¥áᮢ ¢ á¨á⥬¥ mov eax,9 ; ¯®«ã稬 ç¨á«® ¯à®æ¥áᮢ ¢ á¨á⥬¥
mov ebx,procinfo mov ebx,procinfo
xor ecx,ecx xor ecx,ecx
mcall mcall
inc eax ; ⥯¥àì ¢ eax ᮤ¥à¦¨âáï ç¨á«® ¯à®æ¥áᮢ + 1 inc eax ; ⥯¥àì ¢ eax ᮤ¥à¦¨âáï ç¨á«® ¯à®æ¥áᮢ + 1
mov [processes],eax mov [processes],eax
mov ecx,1 mov ecx,1
new_process: new_process:
pushad pushad
mov eax,9 ; ¯®«ã稬 ¨­ä®à¬ æ¨î ® ¯à®æ¥áá¥; ­®¬¥à - ¢ ecx mov eax,9 ; ¯®«ã稬 ¨­ä®à¬ æ¨î ® ¯à®æ¥áá¥; ­®¬¥à - ¢ ecx
mov ebx,procinfo mov ebx,procinfo
mcall mcall
mov eax,37 ; ª®®à¤¨­ âë ªãàá®à  mov eax,37 ; ª®®à¤¨­ âë ªãàá®à 
xor ebx,ebx xor ebx,ebx
mcall mcall
mov ebx,eax ; eax = cursor_x mov ebx,eax ; eax = cursor_x
shr eax,16 ; ebx = cursor_y shr eax,16 ; ebx = cursor_y
and ebx,0xffff and ebx,0xffff
mov [curx1],eax ; curx1 = cursor_x mov [curx1],eax ; curx1 = cursor_x
mov [cury1],ebx ; cury1 = cursor_y mov [cury1],ebx ; cury1 = cursor_y
; \begin{diamond}[18.09.2006] ; \begin{diamond}[18.09.2006]
; ignore minimized windows ; ignore minimized windows
test [procinfo.wnd_state], 2 test [procinfo.wnd_state], 2
jnz ne_goden jnz ne_goden
; \end{diamond}[18.09.2006] ; \end{diamond}[18.09.2006]
mov eax,[procinfo.box.left] ; eax = wnd_x_start mov eax,[procinfo.box.left] ; eax = wnd_x_start
mov ebx,[procinfo.box.top] ; ebx = wnd_y_start mov ebx,[procinfo.box.top] ; ebx = wnd_y_start
mov ecx,[procinfo.box.width] mov ecx,[procinfo.box.width]
add ecx,eax ; ecx = wnd_x_end add ecx,eax ; ecx = wnd_x_end
mov edx,[procinfo.box.height] mov edx,[procinfo.box.height]
add edx,ebx ; ecx = wnd_y_end add edx,ebx ; ecx = wnd_y_end
cmp eax,[curx1] ; wnd_x_start > cursor_x => ªãàá®à «¥¢¥¥ ®ª­  cmp eax,[curx1] ; wnd_x_start > cursor_x => ªãàá®à «¥¢¥¥ ®ª­ 
jg ne_goden jg ne_goden
cmp ecx,[curx1] ; wnd_x_end < cursor_x => ªãàá®à ¯à ¢¥¥ ®ª­  cmp ecx,[curx1] ; wnd_x_end < cursor_x => ªãàá®à ¯à ¢¥¥ ®ª­ 
jl ne_goden jl ne_goden
cmp ebx,[cury1] ; wnd_y_start > cursor_y => ªãàá®à ¢ëè¥ ®ª­  cmp ebx,[cury1] ; wnd_y_start > cursor_y => ªãàá®à ¢ëè¥ ®ª­ 
jg ne_goden jg ne_goden
cmp edx,[cury1] ; wnd_y_end < cursor_y => ªãàá®à ­¨¦¥ ®ª­  cmp edx,[cury1] ; wnd_y_end < cursor_y => ªãàá®à ­¨¦¥ ®ª­ 
jl ne_goden jl ne_goden
goden: ; ª«¨ª ¡ë« ¢­ãâਠª ª®£®-â® ®ª­ , ¯®í⮬㠭¨ç¥£® ­¥ ¤¥« ¥¬ goden: ; ª«¨ª ¡ë« ¢­ãâਠª ª®£®-â® ®ª­ , ¯®í⮬㠭¨ç¥£® ­¥ ¤¥« ¥¬
popad popad
jmp still jmp still
ne_goden: ; ª«¨ª ¡ë« á­ à㦨 à áᬠâਢ ¥¬®£® ®ª­ , ¯®í⮬ã ne_goden: ; ª«¨ª ¡ë« á­ à㦨 à áᬠâਢ ¥¬®£® ®ª­ , ¯®í⮬ã
popad popad
inc ecx inc ecx
cmp ecx,[processes] cmp ecx,[processes]
jl new_process ; «¨¡® ᬮਬ á«¥¤ãî饥 ®ª­®, «¨¡® § ¯ã᪠¥¬ ¬¥­î jl new_process ; «¨¡® ᬮਬ á«¥¤ãî饥 ®ª­®, «¨¡® § ¯ã᪠¥¬ ¬¥­î
@@: ; ¯®¤®¦¤ñ¬, ¯®ª  ¯®«ì§®¢ â¥«ì ­¥ ®â¯ãá⨫ ¯à ¢ãî ª­®¯ªã ¬ëè¨ @@: ; ¯®¤®¦¤ñ¬, ¯®ª  ¯®«ì§®¢ â¥«ì ­¥ ®â¯ãá⨫ ¯à ¢ãî ª­®¯ªã ¬ëè¨
mov eax,37 mov eax,37
mov ebx,2 ; äã­ªæ¨ï 37-2: mov ebx,2 ; äã­ªæ¨ï 37-2:
mcall ; ­ ¦ âë «¨ ª­®¯ª¨ ¬ëè¨? mcall ; ­ ¦ âë «¨ ª­®¯ª¨ ¬ëè¨?
cmp eax,ebx ; ¥á«¨ ®â¯ãá⨫, (eax != 2) test eax,ebx ; ¥á«¨ ®â¯ãá⨫, (eax != 2)
jnz @f ; ¨¤ñ¬ ¢ ­ ç «® £« ¢­®£® 横«  jz @f ; ¨¤ñ¬ ¢ ­ ç «® £« ¢­®£® 横« 
mov eax,5 ; ¨­ ç¥ mov eax,5 ; ¨­ ç¥
mov ebx,2 ; ¯®¤®¦¤ñ¬ 2 ¬á ;mov ebx,2 ; ¯®¤®¦¤ñ¬ 2 ¬á
mcall mcall
jmp @b ; ¨ ¯à®¢¥à¨¬ ¬ëèì ®¯ïâì jmp @b ; ¨ ¯à®¢¥à¨¬ ¬ëèì ®¯ïâì
@@: @@:
; ¥á«¨ 㦥 ¡ë«® ®âªàëâ® ¬¥­î, ­ã¦­® ¯®¤®¦¤ âì, ¯®ª  ®­® § ªà®¥âáï: ; ¥á«¨ 㦥 ¡ë«® ®âªàëâ® ¬¥­î, ­ã¦­® ¯®¤®¦¤ âì, ¯®ª  ®­® § ªà®¥âáï:
@@: @@:
cmp [menu_opened],0 cmp [menu_opened],0
je @f je @f
mov eax,5 mov eax,5
mov ebx,3 ; ¦¤ñ¬ 3 ¬á mov ebx,3 ; ¦¤ñ¬ 3 ¬á
mcall mcall
jmp @b jmp @b
@@: @@:
mov eax,51 ;   ⥯¥àì ¬®¦­® ᬥ«® § ¯ã᪠âì ¯à®æ¥áá (¯®â®ª) ¬¥­î mov eax,51 ;   ⥯¥àì ¬®¦­® ᬥ«® § ¯ã᪠âì ¯à®æ¥áá (¯®â®ª) ¬¥­î
mov ebx,1 ; ᮧ¤ ñ¬ ¯®â®ª (thread) mov ebx,1 ; ᮧ¤ ñ¬ ¯®â®ª (thread)
mov ecx,start_wnd ; â®çª  ¢å®¤  ¯®â®ª  mov ecx,start_wnd ; â®çª  ¢å®¤  ¯®â®ª 
mov edx,stack_wnd ; ¢¥à設  áâíª  ¤«ï ¯®â®ª  mov edx,stack_wnd ; ¢¥à設  áâíª  ¤«ï ¯®â®ª 
mcall mcall
jmp still jmp still
exit_menu: ; ¥á«¨ ¢ë室¨¬ ¨§ ¬¥­î, ­ ¤® § ¯¨á âì ¢ [menu_opened] 0 exit_menu: ; ¥á«¨ ¢ë室¨¬ ¨§ ¬¥­î, ­ ¤® § ¯¨á âì ¢ [menu_opened] 0
mov [menu_opened],0 mov [menu_opened],0
exit: ; á ¬ë ¨¤ñ¬, ª®£¤  ¢ë室¨¬ ¨§ ®á­®¢­®£® ¯à®æ¥áá  exit: ; á ¬ë ¨¤ñ¬, ª®£¤  ¢ë室¨¬ ¨§ ®á­®¢­®£® ¯à®æ¥áá 
or eax,-1 ; eax = -1 or eax,-1 ; eax = -1
mcall mcall
@ -144,80 +144,80 @@ exit: ;
; §¤¥áì áâ àâã¥â ¯à®æ¥áá ¬¥­î ; §¤¥áì áâ àâã¥â ¯à®æ¥áá ¬¥­î
start_wnd: start_wnd:
mov [menu_opened],1 mov [menu_opened],1
mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ¦¥« ¥¬ëå ᮡë⨩ ¤«ï í⮣® ¯à®æ¥áá  mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ¦¥« ¥¬ëå ᮡë⨩ ¤«ï í⮣® ¯à®æ¥áá 
mov ebx,100101b ; ¬¥­î + ª­®¯ª¨ + ¯¥à¥à¨á®¢ª  mov ebx,100101b ; ¬¥­î + ª­®¯ª¨ + ¯¥à¥à¨á®¢ª 
mcall mcall
red: red:
call draw_window call draw_window
still2: ; £« ¢­ë© 横« ¯à®æ¥áá  ¬¥­î still2: ; £« ¢­ë© 横« ¯à®æ¥áá  ¬¥­î
mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï
mcall mcall
cmp eax,1 ; ¯¥à¥à¨á®¢ª ? cmp eax,1 ; ¯¥à¥à¨á®¢ª ?
je red je red
cmp eax,3 ; ª­®¯ª ? cmp eax,3 ; ª­®¯ª ?
je button je button
cmp eax,6 ; ¬ëèì? cmp eax,6 ; ¬ëèì?
je mouse je mouse
jmp still2 ; ¢¥à­ñ¬áï ¢ ­ ç «® £« ¢­®£® 横«  jmp still2 ; ¢¥à­ñ¬áï ¢ ­ ç «® £« ¢­®£® 横« 
; Ž<><C5BD><EFBFBD>ŽˆŠ Œ›˜ˆ ; Ž<><C5BD><EFBFBD>ŽˆŠ Œ›˜ˆ
mouse: ; ª®£¤  ¯®«ì§®¢ â¥«ì ­ ¦¬ñâ ª­®¯ªã ¬ëè¨, § ªà®¥¬áï mouse: ; ª®£¤  ¯®«ì§®¢ â¥«ì ­ ¦¬ñâ ª­®¯ªã ¬ëè¨, § ªà®¥¬áï
mov eax,37 mov eax,37
mov ebx,2 ; ª ª¨¥ ª­®¯ª¨ ­ ¦ âë? mov ebx,2 ; ª ª¨¥ ª­®¯ª¨ ­ ¦ âë?
mcall mcall
test eax,eax ; ­¨ª ª¨¥? - ⮣¤  ¯à¥ªà á­®! ¢¥à­ñ¬áï ¢ £« ­ë© 横« test eax,eax ; ­¨ª ª¨¥? - ⮣¤  ¯à¥ªà á­®! ¢¥à­ñ¬áï ¢ £« ­ë© 横«
jz still2 jz still2
jmp exit_menu ;   ¥á«¨ ¢áñ-â ª¨ ­ ¦ âë - § ªà®¥¬ ®ª­® jmp exit_menu ;   ¥á«¨ ¢áñ-â ª¨ ­ ¦ âë - § ªà®¥¬ ®ª­®
; <20>€†€€ Š<>Ž<EFBFBD>Š€ ; <20>€†€€ Š<>Ž<EFBFBD>Š€
button: button:
mov eax,17 ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨ mov eax,17 ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
mcall mcall
sub ah,10 ; áà ¢­¨¢ ¥¬ á 10 sub ah,10 ; áà ¢­¨¢ ¥¬ á 10
jl nofuncbtns ; ¥á«¨ ¬¥­ìè¥ - § ªà뢠¥¬ ¬¥­î jl nofuncbtns ; ¥á«¨ ¬¥­ìè¥ - § ªà뢠¥¬ ¬¥­î
movzx ebx,ah ; ¯®«ã稫¨ ­®¬¥à ¯à®£à ¬¬ë ¢ ᯨ᪥ ¢ ebx movzx ebx,ah ; ¯®«ã稫¨ ­®¬¥à ¯à®£à ¬¬ë ¢ ᯨ᪥ ¢ ebx
mov esi, [startapps + ebx*4] mov esi, [startapps + ebx*4]
mov edi, start_info.path mov edi, start_info.path
cld cld
@@: @@:
lodsb lodsb
stosb stosb
test al, al test al, al
jnz @b jnz @b
mcall 70, start_info mcall 70, start_info
; mov eax,5 ; ¯®¤®¦¤ñ¬, ¯®ª  ¯à®£à ¬¬  § ¯ãáâ¨âìáï ; mov eax,5 ; ¯®¤®¦¤ñ¬, ¯®ª  ¯à®£à ¬¬  § ¯ãáâ¨âìáï
; mov ebx,1 ;   â® ¥ñ ®ª­® ­¥ ¡ã¤¥â ®âà¨á®¢ ­® (¡ £ ¢ ï¤à¥???) ; mov ebx,1 ;   â® ¥ñ ®ª­® ­¥ ¡ã¤¥â ®âà¨á®¢ ­® (¡ £ ¢ ï¤à¥???)
; mcall ; à áª®¬¬¥­â¨àã©â¥ í⨠áâப¨, ¥á«¨ ã ¢ á ¯à®¡«¥¬ë ; mcall ; à áª®¬¬¥­â¨àã©â¥ í⨠áâப¨, ¥á«¨ ã ¢ á ¯à®¡«¥¬ë
; á ®âà¨á®¢ª®© ; á ®âà¨á®¢ª®©
nofuncbtns: ; § ªà뢠¥¬ ¬¥­î nofuncbtns: ; § ªà뢠¥¬ ¬¥­î
jmp exit_menu jmp exit_menu
_BTNS_ = 6 ; ª®«¨ç¥á⢮ ª­®¯®ª ("¯ã­ªâ®¢ ¬¥­î") _BTNS_ = 6 ; ª®«¨ç¥á⢮ ª­®¯®ª ("¯ã­ªâ®¢ ¬¥­î")
if lang eq ru if lang eq ru
font = 0x00000000 font = 0x00000000
string_length = 20 ; ¤«¨­  áâப¨ string_length = 20 ; ¤«¨­  áâப¨
wnd_x_size = 133 ; è¨à¨­  ®ª­  wnd_x_size = 133 ; è¨à¨­  ®ª­ 
title_pos = 36 shl 16 + 7 title_pos = 36 shl 16 + 7
else else
font = 0x10000000 font = 0x10000000
string_length = 12 ; ¤«¨­  áâப¨ string_length = 12 ; ¤«¨­  áâப¨
wnd_x_size = 105 ; è¨à¨­  ®ª­  wnd_x_size = 105 ; è¨à¨­  ®ª­ 
title_pos = 23 shl 16 + 7 title_pos = 23 shl 16 + 7
end if end if
;******************************* ;*******************************
@ -226,106 +226,106 @@ end if
draw_window: draw_window:
mov eax,12 ; ­ ç¨­ ¥¬ "à¨á®¢ âì" mov eax,12 ; ­ ç¨­ ¥¬ "à¨á®¢ âì"
mov ebx,1 mov ebx,1
mcall mcall
mov eax,[curx1] ; ⥪ã騥 ª®®à¤¨­ âë ªãàá®à  mov eax,[curx1] ; ⥪ã騥 ª®®à¤¨­ âë ªãàá®à 
mov [curx],eax ; § ¯¨è¥¬ ¢ ª®®à¤¨­ âë ®ª­  mov [curx],eax ; § ¯¨è¥¬ ¢ ª®®à¤¨­ âë ®ª­ 
mov eax,[cury1] mov eax,[cury1]
mov [cury],eax mov [cury],eax
; ⥯¥àì ¡ã¤¥¬ áç¨â âì ª®®à¤¨­ âë ®ª­ , çâ®¡ë ®­® §  ªà © íªà ­  ­¥ ¢ë«¥§«® ; ⥯¥àì ¡ã¤¥¬ áç¨â âì ª®®à¤¨­ âë ®ª­ , çâ®¡ë ®­® §  ªà © íªà ­  ­¥ ¢ë«¥§«®
mov eax,14 ; ¯®«ã稬 à §¬¥à íªà ­  mov eax,14 ; ¯®«ã稬 à §¬¥à íªà ­ 
mcall mcall
mov ebx,eax mov ebx,eax
shr eax,16 ; ¢ eax - x_screen shr eax,16 ; ¢ eax - x_screen
and ebx,0xffff ; ¢ ebx - y_screen and ebx,0xffff ; ¢ ebx - y_screen
add eax,-wnd_x_size ; eax = [x_screen - è¨à¨­  ®ª­ ] add eax,-wnd_x_size ; eax = [x_screen - è¨à¨­  ®ª­ ]
add ebx,-_BTNS_*15-21 ; ebx = [y_screen - ¢ëá®â  ®ª­ ] add ebx,-_BTNS_*15-21 ; ebx = [y_screen - ¢ëá®â  ®ª­ ]
cmp eax,[curx] cmp eax,[curx]
jg .okx ; ¥á«¨ ®ª­® ᫨誮¬ ¡«¨§ª® ª ¯à ¢®¬ã ªà î, jg .okx ; ¥á«¨ ®ª­® ᫨誮¬ ¡«¨§ª® ª ¯à ¢®¬ã ªà î,
add [curx],-wnd_x_size ; ᤢ¨­¥¬ ¥£® ¢«¥¢® ­  100 add [curx],-wnd_x_size ; ᤢ¨­¥¬ ¥£® ¢«¥¢® ­  100
.okx: .okx:
cmp ebx, [cury] cmp ebx, [cury]
jg .oky ; ¯® ¢¥à⨪ «¨ â®ç­® â ª¦¥ jg .oky ; ¯® ¢¥à⨪ «¨ â®ç­® â ª¦¥
add [cury], -_BTNS_*15-21 add [cury], -_BTNS_*15-21
.oky: .oky:
xor eax, eax ; äã­ªæ¨ï 0 - ᮧ¤ âì ®ª­® xor eax, eax ; äã­ªæ¨ï 0 - ᮧ¤ âì ®ª­®
mov ebx, [curx] ; ebx = [ª®®à¤¨­ â  ¯® x] shl 16 + [è¨à¨­ ] mov ebx, [curx] ; ebx = [ª®®à¤¨­ â  ¯® x] shl 16 + [è¨à¨­ ]
shl ebx, 16 shl ebx, 16
add ebx, wnd_x_size add ebx, wnd_x_size
mov ecx, [cury] ; ecx = [ª®®à¤¨­ â  ¯® y] shl 16 + [¢ëá®â ] mov ecx, [cury] ; ecx = [ª®®à¤¨­ â  ¯® y] shl 16 + [¢ëá®â ]
shl ecx, 16 shl ecx, 16
add ecx, _BTNS_*15+21 add ecx, _BTNS_*15+21
mov edx, [sc.work] ; 梥â à ¡®ç¥© ®¡« á⨠mov edx, [sc.work] ; 梥â à ¡®ç¥© ®¡« áâ¨
mov esi, [sc.grab] ; 梥⠧ £®«®¢ª  mov esi, [sc.grab] ; 梥⠧ £®«®¢ª 
or esi, 0x81000000 or esi, 0x81000000
mov edi, [sc.frame] ; 梥â à ¬ª¨ mov edi, [sc.frame] ; 梥â à ¬ª¨
mcall mcall
mov eax, 4 ; § £®«®¢®ª mov eax, 4 ; § £®«®¢®ª
mov ebx, title_pos ; [x] shl 16 + [y] mov ebx, title_pos ; [x] shl 16 + [y]
mov ecx, [sc.grab_text]; èà¨äâ ¨ 梥â (á¥àë©) mov ecx, [sc.grab_text]; èà¨äâ ¨ 梥â (á¥àë©)
or ecx, 0x10000000 or ecx, 0x10000000
; add ecx, -0x333333 ; add ecx, -0x333333
push ecx push ecx
push ecx push ecx
xor edx,edx xor edx,edx
.dec_color: .dec_color:
sub byte [esp+edx], 0x33 sub byte [esp+edx], 0x33
jae @f jae @f
mov byte [esp+edx], 0 mov byte [esp+edx], 0
@@: @@:
inc edx inc edx
jnp .dec_color jnp .dec_color
pop ecx pop ecx
mov edx, title ;  ¤à¥á § £®«®¢ª  mov edx, title ;  ¤à¥á § £®«®¢ª 
mov esi, title.size ; ¤«¨­  § £®«®¢ª  ("M E N U") mov esi, title.size ; ¤«¨­  § £®«®¢ª  ("M E N U")
mcall mcall
pop ecx pop ecx
add ebx, 1 shl 16 ; ᤢ¨­¥¬ ¢¯à ¢® ­  1 add ebx, 1 shl 16 ; ᤢ¨­¥¬ ¢¯à ¢® ­  1
mcall mcall
mov ebx, 1*65536+wnd_x_size-2 ; ­ ç¨­ ¥¬ ¤¥« âì ª­®¯ª¨ mov ebx, 1*65536+wnd_x_size-2 ; ­ ç¨­ ¥¬ ¤¥« âì ª­®¯ª¨
mov ecx, 20*65536+15 mov ecx, 20*65536+15
mov edx, 10 or 0x40000000 ; ¡¨â 30 ãáâ ­®¢«¥­ => ª­®¯ª  ­¥ à¨áã¥âáï mov edx, 10 or 0x40000000 ; ¡¨â 30 ãáâ ­®¢«¥­ => ª­®¯ª  ­¥ à¨áã¥âáï
mov edi,_BTNS_ ; ª®«¨ç¥á⢮ ª­®¯®ª (áçñâ稪) mov edi,_BTNS_ ; ª®«¨ç¥á⢮ ª­®¯®ª (áçñâ稪)
newbtn: ; ­ ç «® 横«  newbtn: ; ­ ç «® 横« 
mov eax,8 ; ᮧ¤ ñ¬ ª­®¯ªã mov eax,8 ; ᮧ¤ ñ¬ ª­®¯ªã
mcall mcall
; ¯¨è¥¬ ⥪áâ ­  ª­®¯ª¥ ; ¯¨è¥¬ ⥪áâ ­  ª­®¯ª¥
pushad ; ᯠᠥ¬ ॣ¨áâàë pushad ; ᯠᠥ¬ ॣ¨áâàë
shr ecx, 16 shr ecx, 16
and ebx, 0xffff0000 and ebx, 0xffff0000
add ebx, ecx ; ebx = [x] shl 16 + [y]; add ebx, ecx ; ebx = [x] shl 16 + [y];
add ebx, 10*65536+4 ; ebx += ᬥ饭¨¥ ®â­®á¨â¥«ì­® ªà ï ª­®¯ª¨; add ebx, 10*65536+4 ; ebx += ᬥ饭¨¥ ®â­®á¨â¥«ì­® ªà ï ª­®¯ª¨;
mov ecx, [sc.work_text] ; èà¨äâ ¨ 梥â mov ecx, [sc.work_text] ; èà¨äâ ¨ 梥â
or ecx, font or ecx, font
add edx, -10 ; edx = ­®¬¥à ª­®¯ª¨; add edx, -10 ; edx = ­®¬¥à ª­®¯ª¨;
imul edx, string_length ; edx *= ¤«¨­  áâப¨; imul edx, string_length ; edx *= ¤«¨­  áâப¨;
add edx, text ; edx += text; ⥯¥àì ¢ edx  ¤à¥á áâப¨ add edx, text ; edx += text; ⥯¥àì ¢ edx  ¤à¥á áâப¨
mov esi, string_length ; ¢ esi - ¤«¨­  áâப¨ mov esi, string_length ; ¢ esi - ¤«¨­  áâப¨
mov eax, 4 ; äã­ªæ¨ï 4 - ¢ë¢®¤ ⥪áâ  mov eax, 4 ; äã­ªæ¨ï 4 - ¢ë¢®¤ ⥪áâ 
mcall mcall
popad popad
inc edx ; ­®¬¥à ª­®¯ª¨++; inc edx ; ­®¬¥à ª­®¯ª¨++;
add ecx,15*65536 ; 㢥«¨ç¨¬ ᬥ饭¨¥ ¯® y add ecx,15*65536 ; 㢥«¨ç¨¬ ᬥ饭¨¥ ¯® y
dec edi ; 㬥­ì訬 áçñâ稪 dec edi ; 㬥­ì訬 áçñâ稪
jnz newbtn ; ¥á«¨ ­¥ ­®«ì, ¯®¢â®à¨¬ ¢áñ ¥éñ à § jnz newbtn ; ¥á«¨ ­¥ ­®«ì, ¯®¢â®à¨¬ ¢áñ ¥éñ à §
mov eax,12 ; § ª®­ç¨«¨ "à¨á®¢ âì" mov eax,12 ; § ª®­ç¨«¨ "à¨á®¢ âì"
mov ebx,2 mov ebx,2
mcall mcall
ret ; ¢®§¢à â ret ; ¢®§¢à â
@ -343,11 +343,11 @@ DATA
str db string str db string
} }
strtbl startapps ,\ strtbl startapps ,\
<"/sys/PIC4",0> ,\ <"/sys/PIC4",0> ,\
<"/sys/DESKTOP",0> ,\ <"/sys/DESKTOP",0> ,\
<"/sys/ICON",0>,\ <"/sys/ICON",0>,\
<"/sys/SETUP",0> ,\ <"/sys/SETUP",0> ,\
<"/sys/VRR",0> ,\ <"/sys/VRR",0> ,\
<"/sys/CPU",0> <"/sys/CPU",0>
@ -369,31 +369,31 @@ DATA
ru, '<27>à®æ¥ááë ' ru, '<27>à®æ¥ááë '
start_info: start_info:
.mode dd 7 .mode dd 7
dd 0 dd 0
.params dd 0 .params dd 0
dd 0 dd 0
dd 0 dd 0
db 0 db 0
dd start_info.path dd start_info.path
; <20>ˆ<E280A6>ˆˆˆˆ<E280A1>Ž<E2809A><E282AC>… „€<E2809E><E282AC> ; <20>ˆ<E280A6>ˆˆˆˆ<E280A1>Ž<E2809A><E282AC>… „€<E2809E><E282AC>
UDATA UDATA
processes dd ? ; ª®«¨ç¥á⢮ ¯à®æ¥áᮢ ¢ á¨á⥬¥ processes dd ? ; ª®«¨ç¥á⢮ ¯à®æ¥áᮢ ¢ á¨á⥬¥
curx1 dd ? ; ª®®à¤¨­ âë ªãàá®à  curx1 dd ? ; ª®®à¤¨­ âë ªãàá®à 
cury1 dd ? cury1 dd ?
curx dd ? ; ª®®à¤¨­ âë ®ª­  ¬¥­î curx dd ? ; ª®®à¤¨­ âë ®ª­  ¬¥­î
cury dd ? cury dd ?
menu_opened db ? ; ®âªàëâ® ¬¥­î ¨«¨ ­¥â? (1-¤ , 0-­¥â) menu_opened db ? ; ®âªàëâ® ¬¥­î ¨«¨ ­¥â? (1-¤ , 0-­¥â)
align 4 align 4
start_info.path rb 256 start_info.path rb 256
sc system_colors ; á¨á⥬­ë¥ æ¢¥â  sc system_colors ; á¨á⥬­ë¥ 梥â 
procinfo process_information ; ¨­ä®à¬ æ¨ï ® ¯à®æ¥áᥠprocinfo process_information ; ¨­ä®à¬ æ¨ï ® ¯à®æ¥áá¥
rb 1024 ; áâíª ¤«ï ®ª­  ¬¥­î - 墠â¨â ¨ 1 Š¡ rb 1024 ; áâíª ¤«ï ®ª­  ¬¥­î - 墠â¨â ¨ 1 Š¡
align 32 align 32
stack_wnd: stack_wnd: