2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-07-07 21:18:51 +02:00
|
|
|
kabout:
|
|
|
|
test dword [status],4
|
|
|
|
jnz still
|
|
|
|
or dword [status],4
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
call get_memory_for_thread_stack
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [thread_stack_3],eax
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 51,1,thread3 ;thread_stack_3
|
2011-06-12 00:16:26 +02:00
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
2011-07-07 21:18:51 +02:00
|
|
|
thread3: ; start of bgrd thread
|
|
|
|
mcall 9, procinfo_threads, -1
|
|
|
|
mov eax,[ebx+30]
|
|
|
|
mov [PID3],eax
|
|
|
|
mcall 40,0x7
|
|
|
|
;------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.red:
|
2011-07-07 21:18:51 +02:00
|
|
|
call .draw_window
|
|
|
|
;------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.still:
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 10 ; wait here for event
|
|
|
|
cmp eax,1 ; redraw request ?
|
|
|
|
je .red
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
cmp eax,2 ; key in buffer ?
|
|
|
|
je .close ;.key
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
cmp eax,3 ; button in buffer ?
|
|
|
|
je .button
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
jmp .still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
;.key:
|
|
|
|
; mcall
|
|
|
|
; cmp ah,27
|
|
|
|
; je .close
|
|
|
|
; jmp .still
|
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.button: ; button
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 17 ; get id
|
|
|
|
cmp ah,1 ; button id=1 ?
|
|
|
|
je .close
|
|
|
|
|
|
|
|
cmp ah,2
|
|
|
|
jne .still ;noclose3
|
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
.close:
|
2011-07-07 21:18:51 +02:00
|
|
|
xor dword [status],4
|
|
|
|
xor eax,eax
|
|
|
|
mov [PID3],eax
|
2011-06-12 00:16:26 +02:00
|
|
|
mcall 68,13,[thread_stack_3]
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall -1 ; close this program
|
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
; *********************************************
|
|
|
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
|
|
|
; *********************************************
|
|
|
|
.draw_window:
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 12,1
|
|
|
|
xor eax,eax ; function 0 : define and draw window
|
|
|
|
xor esi,esi
|
|
|
|
mcall ,<100,300>,<100,240>,0x13eeeeee,,labelt3
|
|
|
|
mcall 8,<120,40>,<210,20>,2,0xdddddd
|
|
|
|
add ebx,15 shl 16
|
|
|
|
shr ecx,16
|
|
|
|
mov bx,cx
|
|
|
|
add ebx,6
|
|
|
|
xor ecx,ecx
|
|
|
|
mcall 4,,,ok_btn,ok_btn.size
|
|
|
|
mcall ,<20,30>,0x80000000,Authors_text.1
|
|
|
|
mcall ,<30,45>, ,Authors_text.2
|
|
|
|
mcall ,<30,60>, ,Authors_text.3
|
|
|
|
mcall ,<60,70>, ,Authors_text.4
|
|
|
|
mcall ,<60,80>, ,Authors_text.5
|
|
|
|
mcall ,<60,90>, ,Authors_text.6
|
|
|
|
mcall ,<60,100>, ,Authors_text.7
|
|
|
|
mcall ,<30,115>, ,Authors_text.8
|
|
|
|
mcall ,<60,125>, ,Authors_text.9
|
|
|
|
mcall ,<60,135>, ,Authors_text.10
|
|
|
|
mcall ,<30,150>, ,Authors_text.11
|
|
|
|
mcall ,<60,160>, ,Authors_text.12
|
|
|
|
mcall ,<30,175>, ,Authors_text.13
|
|
|
|
mcall ,<60,185>, ,Authors_text.14
|
|
|
|
; mcall 47,0x80000,[PID3],<200, 5>,0xffffff
|
|
|
|
mcall 12,2
|
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|