Rev 109 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 485 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | dd 0x8000 ; required amount of memory |
15 | dd 0x8000 ; required amount of memory |
16 | dd 0x8000 ; esp = 0x7FFF0 |
16 | dd 0x8000 ; esp = 0x7FFF0 |
17 | dd 0x00000000 ; reserved=no extended header |
17 | dd 0x00000000 ; reserved=no extended header |
Line 18... | Line 18... | ||
18 | 18 | ||
19 | include 'lang.inc' |
19 | include 'lang.inc' |
Line 20... | Line 20... | ||
20 | include 'macros.inc' |
20 | include '..\..\..\macros.inc' |
Line 21... | Line 21... | ||
21 | 21 | ||
Line 29... | Line 29... | ||
29 | call draw_window ; at first, draw the window |
29 | call draw_window ; at first, draw the window |
Line 30... | Line 30... | ||
30 | 30 | ||
Line 31... | Line 31... | ||
31 | still: |
31 | still: |
32 | 32 | ||
Line 33... | Line 33... | ||
33 | mov eax,10 ; wait here for event |
33 | mov eax,10 ; wait here for event |
34 | int 0x40 |
34 | mcall |
35 | 35 | ||
36 | dec eax ; redraw request ? |
36 | dec eax ; redraw request ? |
Line 46... | Line 46... | ||
46 | ; call draw_window |
46 | ; call draw_window |
47 | ; jmp still |
47 | ; jmp still |
Line 48... | Line 48... | ||
48 | 48 | ||
49 | key: ; key |
49 | key: ; key |
50 | mov eax,2 ; just read it and ignore |
50 | mov eax,2 ; just read it and ignore |
51 | int 0x40 |
51 | mcall |
Line 52... | Line 52... | ||
52 | jmp still |
52 | jmp still |
53 | 53 | ||
54 | button: ; button |
54 | button: ; button |
Line 55... | Line 55... | ||
55 | mov eax,17 ; get id |
55 | mov eax,17 ; get id |
56 | int 0x40 |
56 | mcall |
57 | 57 | ||
58 | cmp ah,3 |
58 | cmp ah,3 |
Line 70... | Line 70... | ||
70 | jmp red |
70 | jmp red |
71 | no_down: |
71 | no_down: |
Line 72... | Line 72... | ||
72 | 72 | ||
73 | dec ah ; button id=1 ? |
73 | dec ah ; button id=1 ? |
74 | jne still |
74 | jne still |
75 | xor eax,eax ; close this program |
75 | or eax,-1 ; close this program |
76 | dec eax |
- | |
Line 77... | Line 76... | ||
77 | int 0x40 |
76 | mcall |
78 | 77 | ||
79 | 78 | ||
Line 84... | Line 83... | ||
84 | 83 | ||
Line 85... | Line 84... | ||
85 | draw_window: |
84 | draw_window: |
86 | 85 | ||
87 | mov eax,12 ; function 12:tell os about windowdraw |
86 | mov eax,12 ; function 12:tell os about windowdraw |
Line 88... | Line 87... | ||
88 | mov ebx,1 ; 1, start of draw |
87 | mov ebx,1 ; 1, start of draw |
89 | int 0x40 |
88 | mcall |
90 | 89 | ||
91 | ; DRAW WINDOW |
90 | ; DRAW WINDOW |
92 | xor eax,eax ; function 0 : define and draw window |
91 | xor eax,eax ; function 0 : define and draw window |
93 | mov ebx,100*65536+400 ; [x start] *65536 + [x size] |
- | |
94 | mov ecx,100*65536+270 ; [y start] *65536 + [y size] |
92 | mov ebx,100*65536+400 ; [x start] *65536 + [x size] |
95 | mov edx,0x03224466 ; color of work area RRGGBB,8->c |
93 | mov ecx,100*65536+270 ; [y start] *65536 + [y size] |
96 | mov esi,0x006688aa ; color of grab bar RRGGBB,8->color gl |
94 | mov edx,0x13224466 ; color of work area RRGGBB,8->c |
97 | mov edi,0x00ffffff ; color of frames RRGGBB |
- | |
98 | int 0x40 |
- | |
99 | - | ||
100 | ; WINDOW LABEL |
- | |
101 | mov eax,4 ; function 4 : write text to window |
- | |
102 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
- | |
103 | mov ecx,0x00ffffff ; color of text RRGGBB |
- | |
Line 104... | Line 95... | ||
104 | mov edx,labelt ; pointer to text beginning |
95 | mov edi,title ; WINDOW LABEL |
105 | mov esi,labellen-labelt ; text length |
96 | mcall |
106 | int 0x40 |
97 | |
107 | 98 | ||
108 | mov eax,8 |
99 | mov eax,8 |
109 | mov ebx,280*65536+16*6 |
100 | mov ebx,280*65536+16*6 |
Line 110... | Line 101... | ||
110 | mov ecx,240*65536+14 |
101 | mov ecx,240*65536+14 |
111 | mov edx,2 |
102 | mov edx,2 |
112 | mov esi,0x5599cc |
103 | mov esi,0x5599cc |
Line 113... | Line 104... | ||
113 | int 0x40 |
104 | mcall |
114 | 105 | ||
115 | mov ebx,15*65536+125 |
106 | mov ebx,15*65536+125 |
Line 116... | Line 107... | ||
116 | inc edx |
107 | inc edx |
117 | int 0x40 |
108 | mcall |
118 | 109 | ||
119 | 110 | ||
120 | add ebx,127*65536 |
111 | add ebx,127*65536 |
121 | inc edx |
112 | inc edx |
Line 122... | Line 113... | ||
122 | int 0x40 |
113 | mcall |
123 | 114 | ||
124 | 115 | ||
Line 154... | Line 145... | ||
154 | 145 | ||
Line 155... | Line 146... | ||
155 | newhex: |
146 | newhex: |
156 | 147 | ||
157 | ; mov ebx,0x00020101 |
148 | ; mov ebx,0x00020101 |
Line 158... | Line 149... | ||
158 | ; mov esi,0xffff00 |
149 | ; mov esi,0xffff00 |
159 | int 0x40 |
150 | mcall |
160 | 151 | ||
161 | add edx,16*65536 |
152 | add edx,16*65536 |
Line 169... | Line 160... | ||
169 | pop ebx |
160 | pop ebx |
Line 170... | Line 161... | ||
170 | 161 | ||
171 | mov eax,4 ; text |
162 | mov eax,4 ; text |
172 | mov esi,16 |
163 | mov esi,16 |
173 | mov ecx,0xffffff |
164 | mov ecx,0xffffff |
174 | int 0x40 |
165 | mcall |
175 | add ebx,12 |
166 | add ebx,12 |
176 | add edx,16 |
167 | add edx,16 |
177 | dec edi |
168 | dec edi |
Line 178... | Line 169... | ||
178 | jnz newline |
169 | jnz newline |
179 | 170 | ||
180 | mov eax,12 ; function 12:tell os about windowdraw |
171 | mov eax,12 ; function 12:tell os about windowdraw |
Line 181... | Line 172... | ||
181 | mov ebx,2 ; 2, end of draw |
172 | mov ebx,2 ; 2, end of draw |
Line 195... | Line 186... | ||
195 | mov eax,6 |
186 | mov eax,6 |
196 | mov ebx,file_name |
187 | mov ebx,file_name |
197 | xor ecx,ecx |
188 | xor ecx,ecx |
198 | mov edx,-1 |
189 | mov edx,-1 |
199 | mov esi,text |
190 | mov esi,text |
200 | int 0x40 |
191 | mcall |
Line 201... | Line 192... | ||
201 | 192 | ||
Line 202... | Line 193... | ||
202 | popa |
193 | popa |
Line 203... | Line 194... | ||
203 | 194 | ||
Line 204... | Line 195... | ||
204 | ret |
195 | ret |
205 | - | ||
Line 206... | Line 196... | ||
206 | 196 | ||
207 | 197 | ||
208 | ; DATA AREA |
198 |