Rev 135 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 135 | Rev 485 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | dd 0x2FF000 |
38 | dd 0x2FF000 |
39 | dd 0x0 |
39 | dd 0x0 |
40 | dd 0x0 |
40 | dd 0x0 |
Line 41... | Line 41... | ||
41 | 41 | ||
42 | include 'lang.inc' |
42 | include 'lang.inc' |
43 | include 'macros.inc' |
43 | include '..\..\..\macros.inc' |
Line 44... | Line 44... | ||
44 | ; CODE AREA |
44 | ; CODE AREA |
Line 45... | Line 45... | ||
45 | 45 | ||
Line 51... | Line 51... | ||
51 | call draw_window ; draw the window |
51 | call draw_window ; draw the window |
Line 52... | Line 52... | ||
52 | 52 | ||
Line 53... | Line 53... | ||
53 | still: |
53 | still: |
54 | 54 | ||
Line 55... | Line 55... | ||
55 | mov eax,10 ; wait for event |
55 | mov eax,10 ; wait for event |
56 | int 0x40 |
56 | mcall |
57 | 57 | ||
58 | cmp eax,1 ; redraw? |
58 | cmp eax,1 ; redraw? |
Line 70... | Line 70... | ||
70 | 70 | ||
Line 71... | Line 71... | ||
71 | ; Key handler |
71 | ; Key handler |
72 | 72 | ||
73 | key: |
73 | key: |
74 | mov eax,2 ; read it |
74 | mov eax,2 ; read it |
Line 75... | Line 75... | ||
75 | int 0x40 |
75 | mcall |
76 | shr eax,8 |
76 | shr eax,8 |
Line 130... | Line 130... | ||
130 | ; Button handler |
130 | ; Button handler |
Line 131... | Line 131... | ||
131 | 131 | ||
Line 132... | Line 132... | ||
132 | button: |
132 | button: |
133 | 133 | ||
Line 134... | Line 134... | ||
134 | mov eax,17 |
134 | mov eax,17 |
135 | int 0x40 |
135 | mcall |
136 | 136 | ||
137 | cmp ah,1 |
137 | cmp ah,1 |
138 | jnz no_quit |
138 | jnz no_quit |
Line 139... | Line 139... | ||
139 | mov eax,-1 |
139 | mov eax,-1 |
140 | int 0x40 |
140 | mcall |
141 | no_quit: |
141 | no_quit: |
Line 179... | Line 179... | ||
179 | cmp ah,6 |
179 | cmp ah,6 |
180 | jnz no_delete_io |
180 | jnz no_delete_io |
181 | pusha |
181 | pusha |
182 | mov eax,32 |
182 | mov eax,32 |
183 | mov ebx,iofile |
183 | mov ebx,iofile |
184 | int 0x40 |
184 | mcall |
185 | popa |
185 | popa |
186 | no_delete_io: |
186 | no_delete_io: |
Line 187... | Line 187... | ||
187 | 187 | ||
188 | cmp ah,7 |
188 | cmp ah,7 |
189 | jnz no_delete_archive |
189 | jnz no_delete_archive |
190 | pusha |
190 | pusha |
191 | mov eax,32 |
191 | mov eax,32 |
192 | mov ebx,cmfile |
192 | mov ebx,cmfile |
193 | int 0x40 |
193 | mcall |
194 | popa |
194 | popa |
Line 195... | Line 195... | ||
195 | no_delete_archive: |
195 | no_delete_archive: |
Line 200... | Line 200... | ||
200 | 200 | ||
Line 201... | Line 201... | ||
201 | draw_window: |
201 | draw_window: |
202 | 202 | ||
203 | mov eax,12 ; Start redrawing |
203 | mov eax,12 ; Start redrawing |
Line 204... | Line 204... | ||
204 | mov ebx,1 |
204 | mov ebx,1 |
205 | int 0x40 |
205 | mcall |
206 | 206 | ||
207 | xor eax,eax ; Define window |
207 | xor eax,eax ; Define window |
208 | mov ebx,100*65536+240 |
208 | mov ebx,100*65536+240 |
209 | mov ecx,100*65536+130 |
209 | mov ecx,100*65536+130 |
210 | mov edx,0x03AAAAAA |
210 | mov edx,0x03AAAAAA |
Line 211... | Line 211... | ||
211 | mov esi,0x80777777 |
211 | mov esi,0x80777777 |
212 | mov edi,0x00777777 |
212 | mov edi,0x00777777 |
213 | int 0x40 |
213 | mcall |
214 | 214 | ||
215 | mov eax,4 ; Draw all needed texts |
215 | mov eax,4 ; Draw all needed texts |
216 | mov ebx,8*65536+8 |
216 | mov ebx,8*65536+8 |
Line 217... | Line 217... | ||
217 | mov ecx,0x00FFFFFF |
217 | mov ecx,0x00FFFFFF |
218 | mov edx,title |
218 | mov edx,title |
219 | mov esi,arclab-title |
219 | mov esi,arclab-title |
220 | int 0x40 |
220 | mcall |
221 | 221 | ||
Line 222... | Line 222... | ||
222 | xor ecx,ecx |
222 | xor ecx,ecx |
223 | mov edx,arclab |
223 | mov edx,arclab |
224 | mov esi,unplab-arclab |
224 | mov esi,unplab-arclab |
225 | add ebx,10*65536+28 |
225 | add ebx,10*65536+28 |
Line 226... | Line 226... | ||
226 | int 0x40 |
226 | mcall |
Line 227... | Line 227... | ||
227 | 227 | ||
228 | mov edx,unplab |
228 | mov edx,unplab |
229 | mov esi,fin_text-unplab |
229 | mov esi,fin_text-unplab |
230 | add ebx,18 |
230 | add ebx,18 |
231 | int 0x40 |
231 | mcall |
232 | 232 | ||
Line 233... | Line 233... | ||
233 | pusha |
233 | pusha |
234 | 234 | ||
235 | ; mov eax,8 ; Buttons |
235 | ; mov eax,8 ; Buttons |
236 | ; mov ebx,222*65536+10 |
236 | ; mov ebx,222*65536+10 |
237 | ; mov ecx,6*65536+10 |
237 | ; mov ecx,6*65536+10 |
Line 238... | Line 238... | ||
238 | ; mov edx,1 |
238 | ; mov edx,1 |
239 | ; mov esi,0x555555 |
239 | ; mov esi,0x555555 |
240 | ; int 0x40 |
240 | ; mcall |
Line 241... | Line 241... | ||
241 | 241 | ||
242 | mov eax,8 |
242 | mov eax,8 |
243 | mov ebx,15*65536+100 |
243 | mov ebx,15*65536+100 |
244 | mov ecx,70*65536+13 |
244 | mov ecx,70*65536+13 |
Line 245... | Line 245... | ||
245 | mov edx,2 |
245 | mov edx,2 |
246 | int 0x40 |
246 | mcall |
247 | 247 | ||
Line 248... | Line 248... | ||
248 | inc edx |
248 | inc edx |
249 | add ebx,110*65536 |
249 | add ebx,110*65536 |
250 | int 0x40 |
250 | mcall |
251 | 251 | ||
Line 252... | Line 252... | ||
252 | inc edx |
252 | inc edx |
253 | mov ebx,214*65536+11 |
253 | mov ebx,214*65536+11 |
254 | mov ecx,33*65536+11 |
254 | mov ecx,33*65536+11 |
Line 255... | Line 255... | ||
255 | int 0x40 |
255 | mcall |
Line 256... | Line 256... | ||
256 | 256 | ||
257 | inc edx |
257 | inc edx |
258 | add ecx,18*65536 |
258 | add ecx,18*65536 |
259 | int 0x40 |
259 | mcall |
260 | 260 | ||
Line 261... | Line 261... | ||
261 | inc edx |
261 | inc edx |
262 | mov ebx,15*65536+100 |
262 | mov ebx,15*65536+100 |
263 | mov ecx,86*65536+13 |
263 | mov ecx,86*65536+13 |
264 | int 0x40 |
264 | mcall |
Line 265... | Line 265... | ||
265 | 265 | ||
Line 266... | Line 266... | ||
266 | inc edx |
266 | inc edx |
267 | add ebx,110*65536 |
267 | add ebx,110*65536 |
268 | int 0x40 |
268 | mcall |
Line 269... | Line 269... | ||
269 | 269 | ||
Line 270... | Line 270... | ||
270 | popa |
270 | popa |
Line 296... | Line 296... | ||
296 | 296 | ||
297 | mov eax,13 ; Clean draw area |
297 | mov eax,13 ; Clean draw area |
298 | mov ebx,127*65536+85 |
298 | mov ebx,127*65536+85 |
299 | mov ecx,33*65536+33 |
299 | mov ecx,33*65536+33 |
300 | mov edx,0x00AAAAAA |
300 | mov edx,0x00AAAAAA |
Line 301... | Line 301... | ||
301 | int 0x40 |
301 | mcall |
302 | 302 | ||
303 | mov eax,4 ; Draw filenames |
303 | mov eax,4 ; Draw filenames |
304 | mov ebx,134*65536+36 |
304 | mov ebx,134*65536+36 |
305 | mov edx,cmfile |
305 | mov edx,cmfile |
306 | xor ecx,ecx |
306 | xor ecx,ecx |
307 | mov esi,12 |
307 | mov esi,12 |
308 | cmp byte [editstate],1 |
308 | cmp byte [editstate],1 |
309 | jnz no_active_1 |
309 | jnz no_active_1 |
310 | mov ecx,activecolor |
310 | mov ecx,activecolor |
311 | no_active_1: |
311 | no_active_1: |
312 | int 0x40 |
312 | mcall |
313 | xor ecx,ecx |
313 | xor ecx,ecx |
314 | cmp byte [editstate],2 |
314 | cmp byte [editstate],2 |
315 | jnz no_active_2 |
315 | jnz no_active_2 |
316 | mov ecx,activecolor |
316 | mov ecx,activecolor |
317 | no_active_2: |
317 | no_active_2: |
318 | add ebx,18 |
318 | add ebx,18 |
Line 319... | Line 319... | ||
319 | add edx,12 |
319 | add edx,12 |
320 | int 0x40 |
320 | mcall |
321 | 321 | ||
322 | mov eax,13 ; Clean info area |
322 | mov eax,13 ; Clean info area |
323 | mov ebx,14*65536+210 |
323 | mov ebx,14*65536+210 |
Line 324... | Line 324... | ||
324 | mov ecx,107*65536+14 |
324 | mov ecx,107*65536+14 |
325 | mov edx,0x00AAAAAA |
325 | mov edx,0x00AAAAAA |
326 | int 0x40 |
326 | mcall |
327 | 327 | ||
Line 336... | Line 336... | ||
336 | xor ah,ah |
336 | xor ah,ah |
337 | xor edx,edx |
337 | xor edx,edx |
338 | mov dx,ax |
338 | mov dx,ax |
339 | add edx,msgtable |
339 | add edx,msgtable |
340 | mov eax,4 |
340 | mov eax,4 |
341 | int 0x40 |
341 | mcall |
342 | notype: |
342 | notype: |
Line 343... | Line 343... | ||
343 | 343 | ||
Line 344... | Line 344... | ||
344 | popa ; Restore registers |
344 | popa ; Restore registers |
Line 407... | Line 407... | ||
407 | mov ebx,iofile |
407 | mov ebx,iofile |
408 | xor ecx,ecx |
408 | xor ecx,ecx |
409 | mov edx,ecx |
409 | mov edx,ecx |
410 | not edx |
410 | not edx |
411 | mov esi,ifile |
411 | mov esi,ifile |
412 | int 0x40 |
412 | mcall |
Line 413... | Line 413... | ||
413 | 413 | ||
414 | cmp eax,0xFFFFFFFF |
414 | cmp eax,0xFFFFFFFF |
415 | jnz compress_filefound ; i/o file not found |
415 | jnz compress_filefound ; i/o file not found |
416 | mov byte [msgid],3 |
416 | mov byte [msgid],3 |
Line 427... | Line 427... | ||
427 | 427 | ||
Line 428... | Line 428... | ||
428 | push edx |
428 | push edx |
429 | 429 | ||
430 | mov eax,32 |
430 | mov eax,32 |
Line 431... | Line 431... | ||
431 | mov ebx,cmfile |
431 | mov ebx,cmfile |
432 | int 0x40 |
432 | mcall |
433 | 433 | ||
434 | mov eax,33 |
434 | mov eax,33 |
435 | pop edx |
435 | pop edx |
436 | mov ebx,cmfile |
436 | mov ebx,cmfile |
Line 437... | Line 437... | ||
437 | mov ecx,ofile |
437 | mov ecx,ofile |
438 | xor esi,esi |
438 | xor esi,esi |
Line 439... | Line 439... | ||
439 | int 0x40 |
439 | mcall |
Line 452... | Line 452... | ||
452 | mov ebx,cmfile |
452 | mov ebx,cmfile |
453 | xor ecx,ecx |
453 | xor ecx,ecx |
454 | mov edx,ecx |
454 | mov edx,ecx |
455 | not edx |
455 | not edx |
456 | mov esi,ofile |
456 | mov esi,ofile |
457 | int 0x40 |
457 | mcall |
Line 458... | Line 458... | ||
458 | 458 | ||
459 | cmp eax,0xFFFFFFFF |
459 | cmp eax,0xFFFFFFFF |
460 | jnz decompress_filefound ; *.mhc file not found |
460 | jnz decompress_filefound ; *.mhc file not found |
461 | mov byte [msgid],4 |
461 | mov byte [msgid],4 |
Line 479... | Line 479... | ||
479 | 479 | ||
Line 480... | Line 480... | ||
480 | push edx |
480 | push edx |
481 | 481 | ||
482 | mov eax,32 |
482 | mov eax,32 |
Line 483... | Line 483... | ||
483 | mov ebx,iofile |
483 | mov ebx,iofile |
484 | int 0x40 |
484 | mcall |
485 | 485 | ||
486 | mov eax,33 |
486 | mov eax,33 |
487 | pop edx |
487 | pop edx |
488 | mov ebx,iofile |
488 | mov ebx,iofile |
Line 489... | Line 489... | ||
489 | mov ecx,ifile |
489 | mov ecx,ifile |
490 | xor esi,esi |
490 | xor esi,esi |
Line 491... | Line 491... | ||
491 | int 0x40 |
491 | mcall |