kolibrios-fun/programs/system/rb/trunk/@RB.ASM

422 lines
9.9 KiB
NASM
Raw Normal View History

;
; DESKTOP CONTEXT MENU
; written by Ivan Poddubny
;
; <20><><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E3A1AD>
; e-mail: ivan-yar@bk.ru
;
; Compile with flat assembler
;
include 'lang.inc'
include '..\..\..\macros.inc'
meos_app_start
code
mov eax, 48 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD><><E6A2A5>
mov ebx, 3
mov ecx, sc ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov edx, sizeof.system_colors ; <20> <20><><><E0A0A7><EFBFBD>
mcall
mov eax,40 ; <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><>
mov ebx,100000b ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <20><><EFBFBD><EFBFBD>
mcall
still: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><EFBFBD><E1ADAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,10 ; <20><><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
mcall
mov eax,37 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
mov ebx,2
mcall
cmp eax,ebx ; <20><20><> <20><EFBFBD><E0A0A2>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne still
;---<2D><><EFBFBD><EFBFBD>!---
; mov eax,37 ; <20><><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E2ABA0><EFBFBD> - <20><20><><EFBFBD><EFBFBD> <20> <20><>窥 (0;0), <20><><EFBFBD><EFBFBD><E0AEA5><EFBFBD>
; xor ebx,ebx
; mcall
; test eax,eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>窥 (0;0), <20>.<2E>. eax = 0
; je exit
mov eax,9 ; <20><><EFBFBD><EFBFBD><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20> <20><><EFBFBD><EFBFBD>
mov ebx,procinfo
xor ecx,ecx
mcall
inc eax ; ⥯<><E2A5AF><EFBFBD> <20> eax ᮤ<><EFBFBD><E0A6A8><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ + 1
mov [processes],eax
mov ecx,1
new_process:
pushad
mov eax,9 ; <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><E0ACA0><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; <20><><EFBFBD><EFBFBD><EFBFBD> - <20> ecx
mov ebx,procinfo
mcall
mov eax,37 ; <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
xor ebx,ebx
mcall
mov ebx,eax ; eax = cursor_x
shr eax,16 ; ebx = cursor_y
and ebx,0xffff
mov [curx1],eax ; curx1 = cursor_x
mov [cury1],ebx ; cury1 = cursor_y
; \begin{diamond}[18.09.2006]
; ignore minimized windows
test [procinfo.wnd_state], 2
jnz ne_goden
; \end{diamond}[18.09.2006]
mov eax,[procinfo.box.left] ; eax = wnd_x_start
mov ebx,[procinfo.box.top] ; ebx = wnd_y_start
mov ecx,[procinfo.box.width]
add ecx,eax ; ecx = wnd_x_end
mov edx,[procinfo.box.height]
add edx,ebx ; ecx = wnd_y_end
cmp eax,[curx1] ; wnd_x_start > cursor_x => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
jg ne_goden
cmp ecx,[curx1] ; wnd_x_end < cursor_x => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD>
jl ne_goden
cmp ebx,[cury1] ; wnd_y_start > cursor_y => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
jg ne_goden
cmp edx,[cury1] ; wnd_y_end < cursor_y => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
jl ne_goden
goden: ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
popad
jmp still
ne_goden: ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><><20><><EFBFBD><EFBFBD><EFBFBD><E0A8A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>
popad
inc ecx
cmp ecx,[processes]
jl new_process ; <20><><EFBFBD><EFBFBD> ᬮਬ ᫥<><E1ABA5><EFBFBD><20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AAA0> <20><><EFBFBD><EFBFBD>
@@: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><20><EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mov eax,37
mov ebx,2 ; <20><EFBFBD><E3ADAA><EFBFBD> 37-2:
mcall ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>?
test eax,ebx ; <20><20><><EFBFBD><EFBFBD><EFBFBD>⨫, (eax != 2)
jz @f ; <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E6A8AA>
mov eax,5 ; <20><><EFBFBD><EFBFBD><EFBFBD>
;mov ebx,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 <20><>
mcall
jmp @b ; <20> <20><EFBFBD><20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
@@:
; <20>᫨ 㦥 <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E0AEA5><EFBFBD>:
@@:
cmp [menu_opened],0
je @f
mov eax,5
mov ebx,3 ; <20><><EFBFBD><EFBFBD> 3 <20><>
mcall
jmp @b
@@:
mov eax,51 ; <20><><E2A5AF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E1ACA5> <20><><EFBFBD><EFBFBD><EFBFBD><E1AAA0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>⮪) <20><><EFBFBD><EFBFBD>
mov ebx,1 ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><>⮪ (thread)
mov ecx,start_wnd ; <20><><20><EFBFBD> <20><><EFBFBD>
mov edx,stack_wnd ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>
mcall
jmp still
exit_menu: ; <20><20><><EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> [menu_opened] 0
mov [menu_opened],0
exit: ; <20><20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4> <20><> <20><EFBFBD><E1ADAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
or eax,-1 ; eax = -1
mcall
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
start_wnd:
mov [menu_opened],1
mov eax,40 ; <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,100101b ; <20><><EFBFBD><EFBFBD> + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2>
mcall
red:
call draw_window
still2: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mov eax,10 ; <20><><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
mcall
cmp eax,1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2>?
je red
cmp eax,3 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
je button
cmp eax,6 ; <20><><EFBFBD><EFBFBD>?
je mouse
jmp still2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E6A8AA>
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mouse: ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><E0AEA5><EFBFBD>
mov eax,37
mov ebx,2 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
mcall
test eax,eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? - ⮣<><E2AEA3> <20><EFBFBD><E0A5AA>᭮! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>
jz still2
mcall 37, 0
mov esi, eax
shr esi, 16
movzx edi, ax
mcall 9, procinfo2, -1
mov eax, [procinfo2.box.left]
cmp esi, eax
jl exit_menu
add eax, [procinfo2.box.width]
cmp esi, eax
jge exit_menu
mov eax, [procinfo2.box.top]
cmp edi, eax
jl exit_menu
add eax, [procinfo2.box.height]
cmp edi, eax
jge exit_menu
jmp still2
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
button:
mov eax,17 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall
sub ah,10 ; <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 10
jl nofuncbtns ; <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD>
movzx ebx,ah ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20> ᯨ᪥ <20> ebx
mov esi, [startapps + ebx*4]
mov edi, start_info.path
cld
@@:
lodsb
stosb
test al, al
jnz @b
mcall 70, start_info
; mov eax,5 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; mov ebx,1 ; <20> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> (<28><><EFBFBD> <20> <20><><EFBFBD><EFBFBD>???)
; mcall ; <20><><EFBFBD><E1AAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>, <20><20> <20><><EFBFBD> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD>
; <20> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD>
nofuncbtns: ; <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD>
jmp exit_menu
_BTNS_ = 6 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ("<22>㭪⮢ <20><><EFBFBD><EFBFBD>")
if lang eq ru
font = 0x00000000
string_length = 20 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
wnd_x_size = 133 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
title_pos = 36 shl 16 + 7
else
font = 0x10000000
string_length = 12 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
wnd_x_size = 105 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
title_pos = 23 shl 16 + 7
end if
;*******************************
;******** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ********
;*******************************
draw_window:
mov eax,12 ; <20><><EFBFBD><E7A8AD><EFBFBD> "<22><><EFBFBD><E1AEA2><EFBFBD>"
mov ebx,1
mcall
mov eax,[curx1] ; ⥪<><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [curx],eax ; <20><><EFBFBD><EFBFBD><20> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mov eax,[cury1]
mov [cury],eax
; ⥯<><E2A5AF><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><EFBFBD> <20><><EFBFBD> <20><> <20><20><><EFBFBD> <20><> <20><EFBFBD><EBABA5><EFBFBD>
mov eax,14 ; <20><><EFBFBD><EFBFBD>稬 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD>
mcall
mov ebx,eax
shr eax,16 ; <20> eax - x_screen
and ebx,0xffff ; <20> ebx - y_screen
add eax,-wnd_x_size ; eax = [x_screen - <20><><EFBFBD> <20><><EFBFBD><EFBFBD>]
add ebx,-_BTNS_*15-21 ; ebx = [y_screen - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>]
cmp eax,[curx]
jg .okx ; <20><20><><EFBFBD><EFBFBD> ᫨誮<E1ABA8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0A0A2><EFBFBD> <20><><EFBFBD><EFBFBD>,
add [curx],-wnd_x_size ; ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> 100
.okx:
cmp ebx, [cury]
jg .oky ; <20><> <20><><EFBFBD><EFBFBD><E2A8AA><EFBFBD> <20><>筮 ⠪<><E2A0AA>
add [cury], -_BTNS_*15-21
.oky:
xor eax, eax ; <20><EFBFBD><E3ADAA><EFBFBD> 0 - ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mov ebx, [curx] ; ebx = [<5B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x] shl 16 + [<5B><><EFBFBD>]
shl ebx, 16
add ebx, wnd_x_size
mov ecx, [cury] ; ecx = [<5B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y] shl 16 + [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]
shl ecx, 16
add ecx, _BTNS_*15+21
mov edx, [sc.work] ; 梥<><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov esi, [sc.grab] ; 梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
or esi, 0x81000000
mov edi, [sc.frame] ; 梥<><><E0A0AC>
mcall
mov eax, 4 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx, title_pos ; [x] shl 16 + [y]
mov ecx, [sc.grab_text]; <20><><EFBFBD><EFBFBD><EFBFBD> <20><> (<28><><EFBFBD><EFBFBD><EFBFBD>)
or ecx, 0x10000000
; add ecx, -0x333333
push ecx
push ecx
xor edx,edx
.dec_color:
sub byte [esp+edx], 0x33
jae @f
mov byte [esp+edx], 0
@@:
inc edx
jnp .dec_color
pop ecx
mov edx, title ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov esi, title.size ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ("M E N U")
mcall
pop ecx
add ebx, 1 shl 16 ; ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> 1
mcall
mov ebx, 1*65536+wnd_x_size-2 ; <20><><EFBFBD><E7A8AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ecx, 20*65536+15
mov edx, 10 or 0x40000000 ; <20><><EFBFBD> 30 <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> => <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov edi,_BTNS_ ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD>稪)
newbtn: ; <20><><EFBFBD><><E6A8AA>
mov eax,8 ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall
; <20><>襬 ⥪<><E2A5AA> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
pushad ; ᯠᠥ<E1AFA0><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
shr ecx, 16
and ebx, 0xffff0000
add ebx, ecx ; ebx = [x] shl 16 + [y];
add ebx, 10*65536+4 ; ebx += ᬥ饭<E1ACA5><E9A5AD> <20><EFBFBD><E2ADAE>⥫쭮 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
mov ecx, [sc.work_text] ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><>
or ecx, font
add edx, -10 ; edx = <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
imul edx, string_length ; edx *= <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>;
add edx, text ; edx += text; ⥯<><E2A5AF><EFBFBD> <20> edx <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
mov esi, string_length ; <20> esi - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
mov eax, 4 ; <20><EFBFBD><E3ADAA><EFBFBD> 4 - <20><EFBFBD><><E2A5AA><EFBFBD>
mcall
popad
inc edx ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>++;
add ecx,15*65536 ; 㢥<><E3A2A5>稬 ᬥ饭<E1ACA5><E9A5AD> <20><> y
dec edi ; 㬥<><E3ACA5><20><><EFBFBD><EFBFBD>
jnz newbtn ; <20><20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20><><EFBFBD>
mov eax,12 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><E1AEA2><EFBFBD>"
mov ebx,2
mcall
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DATA
macro strtbl name, [string]
{
common
label name dword
forward
local str
dd str
forward
str db string
}
strtbl startapps ,\
<"/sys/PIC4",0> ,\
<"/sys/DESKTOP",0> ,\
<"/sys/ICONMNGR",0>,\
<"/sys/SETUP",0> ,\
<"/sys/VRR",0> ,\
<"/sys/CPU",0>
sz title, "KolibriOS"
lsz text,\
en, 'Background ',\
en, 'Desktop ',\
en, 'Icon manager',\
en, 'Device setup',\
en, 'VRR ',\
en, 'Processes ',\
\
ru, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ',\
ru, '<27><><EFBFBD><EFBFBD><EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD> ',\
ru, '<27><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',\
ru, '<27><><EFBFBD><EFBFBD><EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD><E0AEA9><EFBFBD> ',\
ru, '<27><><EFBFBD><EFBFBD><EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',\
ru, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
start_info:
.mode dd 7
dd 0
.params dd 0
dd 0
dd 0
db 0
dd start_info.path
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
UDATA
processes dd ? ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20> <20><><EFBFBD><EFBFBD>
curx1 dd ? ; <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cury1 dd ?
curx dd ? ; <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
cury dd ?
menu_opened db ? ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>? (1-<2D><>, 0-<2D><><EFBFBD>)
align 4
start_info.path rb 256
sc system_colors ; <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD><><E6A2A5>
procinfo process_information ; <20><><EFBFBD><EFBFBD><EFBFBD><E0ACA0><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procinfo2 process_information
rb 1024 ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> - 墠<><E5A2A0><EFBFBD> <20> 1 <20><>
align 32
stack_wnd:
MEOS_APP_END
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>