Rev 1951 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1951 | mario79 | 1 | ;--------------------------------------------------------------------- |
2000 | mario79 | 2 | kabout: |
3 | test dword [status],4 |
||
4 | jnz still |
||
5 | or dword [status],4 |
||
1951 | mario79 | 6 | |
2000 | mario79 | 7 | call get_memory_for_thread_stack |
1951 | mario79 | 8 | mov [thread_stack_3],eax |
2000 | mario79 | 9 | mcall 51,1,thread3 ;thread_stack_3 |
1951 | mario79 | 10 | jmp still |
11 | ;--------------------------------------------------------------------- |
||
2000 | mario79 | 12 | thread3: ; start of bgrd thread |
13 | mcall 9, procinfo_threads, -1 |
||
14 | mov eax,[ebx+30] |
||
15 | mov [PID3],eax |
||
16 | mcall 40,0x7 |
||
17 | ;------------------------------ |
||
1951 | mario79 | 18 | .red: |
2000 | mario79 | 19 | call .draw_window |
20 | ;------------------------------ |
||
1951 | mario79 | 21 | .still: |
2000 | mario79 | 22 | mcall 10 ; wait here for event |
23 | cmp eax,1 ; redraw request ? |
||
24 | je .red |
||
1951 | mario79 | 25 | |
2000 | mario79 | 26 | cmp eax,2 ; key in buffer ? |
27 | je .close ;.key |
||
1951 | mario79 | 28 | |
2000 | mario79 | 29 | cmp eax,3 ; button in buffer ? |
30 | je .button |
||
1951 | mario79 | 31 | |
2000 | mario79 | 32 | jmp .still |
33 | ;--------------------------------------------------------------------- |
||
34 | ;.key: |
||
35 | ; mcall |
||
36 | ; cmp ah,27 |
||
37 | ; je .close |
||
38 | ; jmp .still |
||
39 | ;--------------------------------------------------------------------- |
||
1951 | mario79 | 40 | .button: ; button |
2000 | mario79 | 41 | mcall 17 ; get id |
42 | cmp ah,1 ; button id=1 ? |
||
43 | je .close |
||
44 | |||
45 | cmp ah,2 |
||
46 | jne .still ;noclose3 |
||
47 | |||
1951 | mario79 | 48 | .close: |
2000 | mario79 | 49 | xor dword [status],4 |
50 | xor eax,eax |
||
51 | mov [PID3],eax |
||
1951 | mario79 | 52 | mcall 68,13,[thread_stack_3] |
2000 | mario79 | 53 | mcall -1 ; close this program |
54 | ;--------------------------------------------------------------------- |
||
1951 | mario79 | 55 | ; ********************************************* |
56 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
||
57 | ; ********************************************* |
||
58 | .draw_window: |
||
2000 | mario79 | 59 | mcall 12,1 |
60 | xor eax,eax ; function 0 : define and draw window |
||
61 | xor esi,esi |
||
62 | mcall ,<100,300>,<100,240>,0x13eeeeee,,labelt3 |
||
63 | mcall 8,<120,40>,<210,20>,2,0xdddddd |
||
64 | add ebx,15 shl 16 |
||
65 | shr ecx,16 |
||
66 | mov bx,cx |
||
67 | add ebx,6 |
||
68 | xor ecx,ecx |
||
69 | mcall 4,,,ok_btn,ok_btn.size |
||
70 | mcall ,<20,30>,0x80000000,Authors_text.1 |
||
71 | mcall ,<30,45>, ,Authors_text.2 |
||
72 | mcall ,<30,60>, ,Authors_text.3 |
||
73 | mcall ,<60,70>, ,Authors_text.4 |
||
74 | mcall ,<60,80>, ,Authors_text.5 |
||
75 | mcall ,<60,90>, ,Authors_text.6 |
||
76 | mcall ,<60,100>, ,Authors_text.7 |
||
77 | mcall ,<30,115>, ,Authors_text.8 |
||
78 | mcall ,<60,125>, ,Authors_text.9 |
||
79 | mcall ,<60,135>, ,Authors_text.10 |
||
80 | mcall ,<30,150>, ,Authors_text.11 |
||
81 | mcall ,<60,160>, ,Authors_text.12 |
||
82 | mcall ,<30,175>, ,Authors_text.13 |
||
83 | mcall ,<60,185>, ,Authors_text.14 |
||
84 | ; mcall 47,0x80000,[PID3],<200, 5>,0xffffff |
||
85 | mcall 12,2 |
||
86 | ret |
||
87 | ;---------------------------------------------------------------------200,>60,185>30,175>60,160>30,150>60,135>60,125>30,115>60,100>60,90>60,80>60,70>30,60>30,45>20,30>210,20>120,40>100,240>100,300> |