Rev 1951 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1951 | Rev 2000 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;--------------------------------------------------------------------- |
1 | ;--------------------------------------------------------------------- |
2 | kabout: |
2 | kabout: |
3 | test dword [status],4 |
3 | test dword [status],4 |
4 | jnz still |
4 | jnz still |
5 | or dword [status],4 |
5 | or dword [status],4 |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | call get_memory_for_tread_stack |
7 | call get_memory_for_thread_stack |
8 | mov [thread_stack_3],eax |
8 | mov [thread_stack_3],eax |
9 | mcall 51,1,thread3 ;,thread_stack_3 |
9 | mcall 51,1,thread3 ;thread_stack_3 |
10 | jmp still |
10 | jmp still |
11 | ;--------------------------------------------------------------------- |
11 | ;--------------------------------------------------------------------- |
12 | thread3: ; start of bgrd thread |
12 | thread3: ; start of bgrd thread |
13 | mcall 9, procinfo_threads, -1 |
13 | mcall 9, procinfo_threads, -1 |
14 | mov eax,[ebx+30] |
14 | mov eax,[ebx+30] |
15 | mov [PID3],eax |
15 | mov [PID3],eax |
- | 16 | mcall 40,0x7 |
|
16 | mcall 40, 0x7 |
17 | ;------------------------------ |
17 | .red: |
18 | .red: |
18 | call .draw_window |
- | |
- | 19 | call .draw_window |
|
19 | 20 | ;------------------------------ |
|
- | 21 | .still: |
|
- | 22 | mcall 10 ; wait here for event |
|
- | 23 | cmp eax,1 ; redraw request ? |
|
Line 20... | Line -... | ||
20 | .still: |
- | |
21 | - | ||
22 | mov eax,10 ; wait here for event |
- | |
23 | mcall |
- | |
24 | - | ||
25 | cmp eax,1 ; redraw request ? |
24 | je .red |
26 | je .red |
25 | |
27 | cmp eax,2 ; key in buffer ? |
- | |
28 | je .close ;.key |
- | |
29 | cmp eax,3 ; button in buffer ? |
- | |
30 | je .button |
- | |
31 | - | ||
32 | jmp .still |
- | |
33 | - | ||
34 | ; .key: |
- | |
35 | ; mcall |
- | |
36 | ; cmp ah,27 |
- | |
Line -... | Line 26... | ||
- | 26 | cmp eax,2 ; key in buffer ? |
|
- | 27 | je .close ;.key |
|
Line -... | Line 28... | ||
- | 28 | ||
- | 29 | cmp eax,3 ; button in buffer ? |
|
- | 30 | je .button |
|
- | 31 | ||
- | 32 | jmp .still |
|
- | 33 | ;--------------------------------------------------------------------- |
|
- | 34 | ;.key: |
|
- | 35 | ; mcall |
|
37 | ; je .close |
36 | ; cmp ah,27 |
38 | ; jmp .still |
37 | ; je .close |
39 | - | ||
40 | - | ||
41 | .button: ; button |
38 | ; jmp .still |
42 | mov eax,17 ; get id |
39 | ;--------------------------------------------------------------------- |
- | 40 | .button: ; button |
|
43 | mcall |
41 | mcall 17 ; get id |
44 | 42 | cmp ah,1 ; button id=1 ? |
|
- | 43 | je .close |
|
45 | cmp ah,1 ; button id=1 ? |
44 | |
46 | je .close |
- | |
47 | cmp ah,2 |
- | |
48 | jne .still ;noclose3 |
45 | cmp ah,2 |
49 | .close: |
46 | jne .still ;noclose3 |
50 | ; btr dword [status],3 |
47 | |
51 | ; bts dword [status],2 |
48 | .close: |
52 | xor dword [status],4 |
49 | xor dword [status],4 |
53 | xor eax,eax |
- | |
54 | mov [PID3],eax |
- | |
55 | mcall 68,13,[thread_stack_3] |
50 | xor eax,eax |
56 | mov eax,-1 ; close this program |
- | |
57 | mcall |
- | |
58 | ; .noclose: |
- | |
59 | ; jmp still3 |
- | |
60 | 51 | mov [PID3],eax |
|
61 | 52 | mcall 68,13,[thread_stack_3] |
|
62 | 53 | mcall -1 ; close this program |
|
63 | - | ||
64 | ; ********************************************* |
- | |
65 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
54 | ;--------------------------------------------------------------------- |
66 | ; ********************************************* |
- | |
67 | - | ||
68 | - | ||
69 | .draw_window: |
- | |
70 | - | ||
71 | - | ||
72 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
73 | mov ebx,1 ; 1, start of draw |
- | |
74 | mcall |
- | |
75 | - | ||
76 | ; DRAW WINDOW |
- | |
77 | xor eax,eax ; function 0 : define and draw window |
- | |
78 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
- | |
79 | mov ecx,100*65536+240 ; [y start] *65536 + [y size] |
- | |
80 | mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl |
- | |
81 | mcall |
- | |
82 | - | ||
83 | mov ebx,120*65536+40 |
- | |
84 | mov ecx,210*65536+20 |
- | |
85 | mov edx,2 |
- | |
86 | mov esi,0xdddddd |
- | |
87 | mcall 8 |
- | |
88 | - | ||
89 | pusha |
- | |
90 | mcall 4,<20,30>,0x80000000,Authors_text.1 |
- | |
91 | mcall ,<30,45>, ,Authors_text.2 |
- | |
92 | - | ||
93 | mcall ,<30,60>, ,Authors_text.3 |
- | |
94 | mcall ,<60,70>, ,Authors_text.4 |
- | |
95 | mcall ,<60,80>, ,Authors_text.5 |
- | |
96 | mcall ,<60,90>, ,Authors_text.6 |
- | |
97 | mcall ,<60,100>, ,Authors_text.7 |
- | |
98 | - | ||
99 | mcall ,<30,115>, ,Authors_text.8 |
- | |
100 | mcall ,<60,125>, ,Authors_text.9 |
- | |
101 | mcall ,<60,135>, ,Authors_text.10 |
- | |
102 | - | ||
103 | mcall ,<30,150>, ,Authors_text.11 |
- | |
104 | mcall ,<60,160>, ,Authors_text.12 |
- | |
105 | - | ||
106 | mcall ,<30,175>, ,Authors_text.13 |
- | |
107 | mcall ,<60,185>, ,Authors_text.14 |
- | |
108 | popa |
- | |
109 | - | ||
110 | add ebx,15 shl 16 |
- | |
111 | shr ecx,16 |
- | |
112 | mov bx,cx |
- | |
113 | add ebx,6 |
- | |
114 | - | ||
115 | mov ecx,0 |
- | |
116 | mov edx, ok_btn |
- | |
117 | mov esi, ok_btn.size ;2 |
- | |
118 | mcall 4 |
- | |
119 | - | ||
120 | ; WINDOW LABEL |
- | |
121 | mcall 71,1, labelt3 |
- | |
122 | ; mcall 47,0x80000,[PID3],<200, 5>,0xffffff |
- | |
123 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
124 | mov ebx,2 ; 2, end of draw |
- | |
125 | mcall |
55 | ; ********************************************* |
- | 56 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
|
- | 57 | ; ********************************************* |
|
- | 58 | .draw_window: |
|
- | 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 |