Rev 109 | Rev 539 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 485 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | ; random bug deleted eax is use. |
25 | ; random bug deleted eax is use. |
26 | ;0.11 loadfile from me +puttxt bug del ~07.09.2004 |
26 | ;0.11 loadfile from me +puttxt bug del ~07.09.2004 |
27 | ;0.12 open/save dialog ~13.09.2004 |
27 | ;0.12 open/save dialog ~13.09.2004 |
28 | ;0.13 dialogs bugs deleted |
28 | ;0.13 dialogs bugs deleted |
29 | ;0.14 drawlbut ~03.10.2004 |
29 | ;0.14 drawlbut ~03.10.2004 |
30 | ;0.15 extendet label! |
- | |
Line 31... | Line 30... | ||
31 | 30 | ||
32 | ; LOADFILE |
31 | ; LOADFILE |
33 | ; (SYNTAX) LOADFILE 'full_path_to_file',file_load_area,file_temp_area |
32 | ; (SYNTAX) LOADFILE 'full_path_to_file',file_load_area,file_temp_area |
Line 34... | Line -... | ||
34 | ; (SAMPLE) LOADFILE '/rd/1/clock.bmp',load_area,temp_area |
- | |
35 | 33 | ; (SAMPLE) LOADFILE '/rd/1/clock.bmp',load_area,temp_area |
|
36 | 34 | ||
37 | macro loadfile file_name,file_load_area,file_temp_area |
35 | macro loadfile file_name,file_load_area,file_temp_area |
38 | { |
36 | { |
39 | local open,fileinfo,string |
37 | local open,fileinfo,string |
Line 48... | Line 46... | ||
48 | db file_name,0 |
46 | db file_name,0 |
49 | open: |
47 | open: |
50 | mov dword [fileinfo+8],1 ; how many blocks to read (1) |
48 | mov dword [fileinfo+8],1 ; how many blocks to read (1) |
51 | mov eax,58 |
49 | mov eax,58 |
52 | mov ebx,fileinfo |
50 | mov ebx,fileinfo |
53 | int 0x40 |
51 | mcall |
54 | mov eax,[file_load_area+2] |
52 | mov eax,[file_load_area+2] |
55 | shr eax,9 ; ¯®¤¥«¨¬ 512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢ |
53 | shr eax,9 ; ¯®¤¥«¨¬ 512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢ |
56 | inc eax |
54 | inc eax |
57 | mov dword [fileinfo+8],eax |
55 | mov dword [fileinfo+8],eax |
58 | mov eax,58 |
56 | mov eax,58 |
59 | mov ebx,fileinfo |
57 | mov ebx,fileinfo |
60 | int 0x40 |
58 | mcall |
61 | } |
59 | } |
Line 62... | Line 60... | ||
62 | 60 | ||
63 | - | ||
64 | ;macro wordstoreg reg,hiword,loword |
- | |
65 | ;{ |
- | |
66 | ;if hiword eqtype 0 & loword eqtype 0 |
- | |
67 | ; mov reg,dword hiword*65536+loword |
- | |
68 | ;else if hiword eqtype 12 & loword eqtype eax |
- | |
69 | ; mov reg,dword hiword*65536 |
- | |
70 | ; add reg,dword loword |
- | |
71 | ;else if hiword eqtype 12 & loword eqtype [123] |
- | |
72 | ; mov reg,dword hiword*65536 |
- | |
73 | ; add reg,dword loword |
- | |
74 | ;else |
- | |
75 | ; mov reg,dword hiword |
- | |
76 | ; shl reg,16 |
- | |
77 | ; add reg,dword loword |
- | |
78 | ;end if |
- | |
79 | ;} |
- | |
80 | - | ||
81 | macro dword2reg reg,doubleword |
- | |
82 | { |
- | |
83 | if doubleword eq |
- | |
84 | ; not changes |
- | |
85 | else |
- | |
86 | mov reg,dword doubleword |
- | |
87 | end if |
- | |
88 | } |
- | |
89 | 61 | ||
90 | macro words2reg reg,hiword,lowword |
- | |
91 | { |
- | |
92 | if hiword eq |
- | |
93 | if lowword eq |
- | |
94 | ; not changes |
62 | macro wordstoreg reg,hiword,loword |
95 | else |
- | |
96 | if lowword eqtype 12 |
63 | { |
97 | and reg,dword 0xffff0000 |
- | |
98 | add reg,dword lowword |
64 | if hiword eqtype 0 & loword eqtype 0 |
99 | else |
65 | mov reg,(hiword)*65536+(loword) |
100 | and reg,dword 0xffff0000 |
66 | else if hiword eqtype 12 & loword eqtype eax |
101 | add reg,dword lowword |
- | |
102 | end if |
- | |
103 | end if |
67 | mov reg,(hiword)*65536 |
104 | else |
68 | add reg,loword |
105 | if lowword eq |
69 | else if hiword eqtype 0 & loword eqtype [123] |
106 | if hiword eqtype 12 |
70 | mov reg,(hiword)*65536 |
107 | and reg,dword 0x0000ffff |
71 | add reg,loword |
- | 72 | else if (hiword eq ) & (loword eq ) |
|
108 | add reg,dword hiword*65536 |
73 | else |
109 | else |
- | |
110 | shl reg,16 |
- | |
111 | add reg,dword hiword |
- | |
112 | ror reg,16 |
- | |
113 | end if |
- | |
114 | else |
- | |
115 | if lowword eqtype 12 & hiword eqtype 12 |
- | |
116 | if lowword eq 0 & hiword eq 0 |
- | |
117 | xor reg,reg |
- | |
118 | else |
- | |
119 | mov reg,dword hiword*65536+lowword |
- | |
120 | end if |
- | |
121 | else |
- | |
122 | mov reg,dword hiword |
74 | mov reg,hiword |
123 | shl reg,16 |
- | |
124 | add reg,dword lowword |
- | |
125 | end if |
75 | shl reg,16 |
126 | end if |
76 | add reg,loword |
Line 127... | Line -... | ||
127 | end if |
- | |
128 | } |
- | |
129 | 77 | end if |
|
Line 130... | Line 78... | ||
130 | 78 | } |
|
131 | 79 | ||
132 | 80 | ||
133 | ; DRAW BUTTON with label |
81 | ; DRAW BUTTON with label |
134 | 82 | ||
135 | macro drawlbut x,y,xs,ys,text,id,bcolor,tcolor |
83 | macro drawlbut x,y,xs,ys,text,id,bcolor,tcolor |
136 | { |
84 | { |
137 | local asd,lab |
85 | local asd,lab |
138 | jmp asd |
86 | jmp asd |
139 | lab db text ;arg label |
87 | lab db text ;arg label |
140 | asd: |
88 | asd: |
141 | words2reg ebx,x,xs |
89 | wordstoreg ebx,x,xs |
Line 142... | Line 90... | ||
142 | words2reg ecx,y,ys |
90 | wordstoreg ecx,y,ys |
143 | mov edx,id |
91 | mov edx,id |
144 | mov esi,bcolor |
92 | mov esi,bcolor |
145 | mov eax,8 |
93 | mov eax,8 |
Line 166... | Line 114... | ||
166 | 114 | ||
167 | mov ecx,tcolor ;arg4 color |
115 | mov ecx,tcolor ;arg4 color |
168 | mov edx,lab |
116 | mov edx,lab |
169 | mov esi,asd-lab ;calc size |
117 | mov esi,asd-lab ;calc size |
170 | mov eax,4 |
118 | mov eax,4 |
171 | int 0x40 |
119 | mcall |
Line 172... | Line 120... | ||
172 | } |
120 | } |
173 | 121 | ||
Line 195... | Line 143... | ||
195 | 143 | ||
196 | ; Get my PID in dec format 4 bytes |
144 | ; Get my PID in dec format 4 bytes |
197 | mov eax,9 |
145 | mov eax,9 |
198 | mov ebx,procinfo |
146 | mov ebx,procinfo |
199 | mov ecx,-1 |
147 | mov ecx,-1 |
Line 200... | Line 148... | ||
200 | int 0x40 |
148 | mcall |
201 | 149 | ||
202 | ; convert eax bin to param dec |
150 | ; convert eax bin to param dec |
203 | mov eax,dword [procinfo+30] ;offset of myPID |
151 | mov eax,dword [procinfo+30] ;offset of myPID |
Line 229... | Line 177... | ||
229 | ; define IPC memory |
177 | ; define IPC memory |
230 | mov eax,60 |
178 | mov eax,60 |
231 | mov ebx,1 ; define IPC |
179 | mov ebx,1 ; define IPC |
232 | mov ecx,path ; offset of area |
180 | mov ecx,path ; offset of area |
233 | mov edx,150 ; size 150 bytes |
181 | mov edx,150 ; size 150 bytes |
234 | int 0x40 |
182 | mcall |
Line 235... | Line 183... | ||
235 | 183 | ||
236 | ; change wanted events list 7-bit IPC event |
184 | ; change wanted events list 7-bit IPC event |
237 | mov eax,40 |
185 | mov eax,40 |
238 | mov ebx,01000111b |
186 | mov ebx,01000111b |
Line 239... | Line 187... | ||
239 | int 0x40 |
187 | mcall |
240 | 188 | ||
241 | ; |
189 | ; |
Line 242... | Line 190... | ||
242 | ; STEP 3 run SYSTEM XTREE with parameters |
190 | ; STEP 3 run SYSTEM XTREE with parameters |
243 | ; |
191 | ; |
244 | 192 | ||
Line 245... | Line 193... | ||
245 | mov eax,58 |
193 | mov eax,58 |
Line 246... | Line 194... | ||
246 | mov ebx,run_fileinfo |
194 | mov ebx,run_fileinfo |
247 | int 0x40 |
195 | mcall |
248 | 196 | ||
249 | call redproc |
197 | call redproc |
250 | 198 | ||
Line 251... | Line 199... | ||
251 | mov [get_loops],0 |
199 | mov [get_loops],0 |
252 | getmesloop: |
200 | getmesloop: |
253 | mov eax,23 |
201 | mov eax,23 |
254 | mov ebx,50 ;0.5 sec |
202 | mov ebx,50 ;0.5 sec |
Line 265... | Line 213... | ||
265 | 213 | ||
266 | ; Get number of procces |
214 | ; Get number of procces |
267 | mov ebx,procinfo |
215 | mov ebx,procinfo |
268 | mov ecx,-1 |
216 | mov ecx,-1 |
269 | mov eax,9 |
217 | mov eax,9 |
270 | int 0x40 |
218 | mcall |
Line 271... | Line 219... | ||
271 | mov ebp,eax |
219 | mov ebp,eax |
272 | 220 | ||
273 | loox: |
221 | loox: |
274 | mov eax,9 |
222 | mov eax,9 |
275 | mov ebx,procinfo |
223 | mov ebx,procinfo |
276 | mov ecx,ebp |
224 | mov ecx,ebp |
277 | int 0x40 |
225 | mcall |
278 | mov eax,[DLGPID] |
226 | mov eax,[DLGPID] |
279 | cmp [procinfo+30],eax ;IF Dialog find |
227 | cmp [procinfo+30],eax ;IF Dialog find |
280 | je dlg_is_work ;jmp to dlg_is_work |
228 | je dlg_is_work ;jmp to dlg_is_work |
Line 297... | Line 245... | ||
297 | mred: |
245 | mred: |
298 | call redproc |
246 | call redproc |
299 | jmp getmesloop |
247 | jmp getmesloop |
300 | mkey: |
248 | mkey: |
301 | mov eax,2 |
249 | mov eax,2 |
302 | int 0x40 ; read (eax=2) |
250 | mcall ; read (eax=2) |
303 | jmp getmesloop |
251 | jmp getmesloop |
304 | mbutton: |
252 | mbutton: |
305 | mov eax,17 ; get id |
253 | mov eax,17 ; get id |
306 | int 0x40 |
254 | mcall |
307 | cmp ah,1 ; button id=1 ? |
255 | cmp ah,1 ; button id=1 ? |
308 | jne getmesloop |
256 | jne getmesloop |
309 | mov eax,-1 ; close this program |
257 | mov eax,-1 ; close this program |
310 | int 0x40 |
258 | mcall |
311 | mgetmes: |
259 | mgetmes: |
Line 312... | Line 260... | ||
312 | 260 | ||
313 | ; If dlg_pid_get then second message get jmp to still |
261 | ; If dlg_pid_get then second message get jmp to still |
314 | cmp [dlg_pid_get],dword 1 |
262 | cmp [dlg_pid_get],dword 1 |
Line 378... | Line 326... | ||
378 | dd procinfo ; 0x10000 |
326 | dd procinfo ; 0x10000 |
379 | ;run_filepath |
327 | ;run_filepath |
380 | db '/RD/1/SYSXTREE',0 |
328 | db '/RD/1/SYSXTREE',0 |
Line 381... | Line 329... | ||
381 | 329 | ||
382 | procinfo: |
330 | procinfo: |
383 | times 1024 db 0 |
331 | times 256 db 0 |
Line 384... | Line 332... | ||
384 | } |
332 | } |
385 | 333 | ||
Line 407... | Line 355... | ||
407 | 355 | ||
408 | ; Get my PID in dec format 4 bytes |
356 | ; Get my PID in dec format 4 bytes |
409 | mov eax,9 |
357 | mov eax,9 |
410 | mov ebx,procinfo |
358 | mov ebx,procinfo |
411 | mov ecx,-1 |
359 | mov ecx,-1 |
Line 412... | Line 360... | ||
412 | int 0x40 |
360 | mcall |
413 | 361 | ||
414 | ; convert eax bin to param dec |
362 | ; convert eax bin to param dec |
415 | mov eax,dword [procinfo+30] ;offset of myPID |
363 | mov eax,dword [procinfo+30] ;offset of myPID |
Line 440... | Line 388... | ||
440 | 388 | ||
441 | ; define IPC memory |
389 | ; define IPC memory |
442 | mov eax,60 |
390 | mov eax,60 |
443 | mov ebx,1 ; define IPC |
391 | mov ebx,1 ; define IPC |
444 | mov ecx,path ; offset of area |
392 | mov ecx,path ; offset of area |
445 | mov edx,150 ; size 150 bytes |
393 | mov edx,120 ; size 150 bytes |
Line 446... | Line 394... | ||
446 | int 0x40 |
394 | mcall |
447 | 395 | ||
448 | ; change wanted events list 7-bit IPC event |
396 | ; change wanted events list 7-bit IPC event |
449 | mov eax,40 |
397 | mov eax,40 |
Line 450... | Line 398... | ||
450 | mov ebx,01000111b |
398 | mov ebx,01000111b |
451 | int 0x40 |
399 | mcall |
452 | 400 | ||
Line 453... | Line 401... | ||
453 | ; |
401 | ; |
454 | ; STEP 3 run SYSTEM XTREE with parameters |
402 | ; STEP 3 run SYSTEM XTREE with parameters |
455 | ; |
403 | ; |
Line 456... | Line 404... | ||
456 | 404 | ||
Line 457... | Line 405... | ||
457 | mov eax,58 |
405 | mov eax,58 |
458 | mov ebx,run_fileinfo |
406 | mov ebx,run_fileinfo |
459 | int 0x40 |
407 | mcall |
460 | 408 | ||
461 | call redproc |
409 | call redproc |
Line 462... | Line 410... | ||
462 | 410 | ||
463 | mov [get_loops],0 |
411 | mov [get_loops],0 |
464 | getmesloop: |
412 | getmesloop: |
465 | mov eax,23 |
413 | mov eax,23 |
Line 477... | Line 425... | ||
477 | 425 | ||
478 | ; Get number of procces |
426 | ; Get number of procces |
479 | mov ebx,procinfo |
427 | mov ebx,procinfo |
480 | mov ecx,-1 |
428 | mov ecx,-1 |
481 | mov eax,9 |
429 | mov eax,9 |
482 | int 0x40 |
430 | mcall |
Line 483... | Line 431... | ||
483 | mov ebp,eax |
431 | mov ebp,eax |
484 | 432 | ||
485 | loox: |
433 | loox: |
486 | mov eax,9 |
434 | mov eax,9 |
487 | mov ebx,procinfo |
435 | mov ebx,procinfo |
488 | mov ecx,ebp |
436 | mov ecx,ebp |
489 | int 0x40 |
437 | mcall |
490 | mov eax,[DLGPID] |
438 | mov eax,[DLGPID] |
491 | cmp [procinfo+30],eax ;IF Dialog find |
439 | cmp [procinfo+30],eax ;IF Dialog find |
492 | je dlg_is_work ;jmp to dlg_is_work |
440 | je dlg_is_work ;jmp to dlg_is_work |
Line 508... | Line 456... | ||
508 | 456 | ||
509 | mred: |
457 | mred: |
510 | call redproc |
458 | call redproc |
511 | jmp getmesloop |
459 | jmp getmesloop |
512 | mkey: |
- | |
513 | mov eax,2 |
460 | mkey: |
514 | int 0x40 ; read (eax=2) |
461 | mcall ; read (eax=2) |
515 | jmp getmesloop |
462 | jmp getmesloop |
516 | mbutton: |
463 | mbutton: |
517 | mov eax,17 ; get id |
464 | mov eax,17 ; get id |
518 | int 0x40 |
465 | mcall |
519 | cmp ah,1 ; button id=1 ? |
466 | cmp ah,1 ; button id=1 ? |
520 | jne getmesloop |
467 | jne getmesloop |
521 | mov eax,-1 ; close this program |
468 | mov eax,-1 ; close this program |
522 | int 0x40 |
469 | mcall |
Line 523... | Line 470... | ||
523 | mgetmes: |
470 | mgetmes: |
524 | 471 | ||
525 | ; If dlg_pid_get then second message get jmp to still |
472 | ; If dlg_pid_get then second message get jmp to still |
Line 577... | Line 524... | ||
577 | get_loops dd 0 |
524 | get_loops dd 0 |
578 | dlg_pid_get dd 0 |
525 | dlg_pid_get dd 0 |
579 | DLGPID dd 0 |
526 | DLGPID dd 0 |
Line 580... | Line 527... | ||
580 | 527 | ||
581 | param: |
528 | param: |
582 | dd 0 ; My dec PID |
529 | rb 4 ; My dec PID |
Line 583... | Line 530... | ||
583 | dd 0,0 ; Type of dialog |
530 | rb 6 ; Type of dialog |
584 | 531 | ||
585 | run_fileinfo: |
532 | run_fileinfo: |
586 | dd 16 |
533 | dd 16 |
587 | dd 0 |
534 | dd 0 |
588 | dd param |
535 | dd param |
589 | dd 0 |
536 | dd 0 |
590 | dd procinfo |
537 | dd procinfo |
Line 591... | Line 538... | ||
591 | ;run_filepath: |
538 | run_filepath: |
592 | db '/RD/1/SYSXTREE',0 |
539 | db '/RD/1/SYSXTREE',0 |
593 | 540 | ||
Line 669... | Line 616... | ||
669 | } |
616 | } |
Line 670... | Line 617... | ||
670 | 617 | ||
671 | macro scank |
618 | macro scank |
672 | { |
619 | { |
673 | mov eax,10 |
620 | mov eax,10 |
674 | int 0x40 |
621 | mcall |
Line 675... | Line 622... | ||
675 | } |
622 | } |
676 | 623 | ||
677 | macro putpix x,y,color |
624 | macro putpix x,y,color |
678 | { |
625 | { |
679 | mov ebx,x |
626 | mov ebx,x |
680 | mov ecx,y |
627 | mov ecx,y |
681 | mov edx,color |
628 | mov edx,color |
682 | mov eax,1 |
629 | mov eax,1 |
Line 683... | Line 630... | ||
683 | int 0x40 |
630 | mcall |
684 | } |
631 | } |
685 | 632 | ||
686 | macro puttxt x,y,offs,size,color |
633 | macro puttxt x,y,offs,size,color |
687 | { |
634 | { |
688 | ; mov ebx,x |
635 | ; mov ebx,x |
689 | ; shl ebx,16 |
- | |
690 | ; add ebx,y |
- | |
691 | words2reg ebx,x,y |
- | |
692 | - | ||
693 | dword2reg ecx,color |
- | |
694 | dword2reg edx,offs |
636 | ; shl ebx,16 |
695 | dword2reg esi,size |
637 | ; add ebx,y |
696 | 638 | wordstoreg ebx,x,y |
|
697 | ; mov ecx,color |
639 | mov ecx,color |
698 | ; mov edx,offs |
640 | mov edx,offs |
699 | ; mov esi,size |
641 | mov esi,size |
Line 700... | Line 642... | ||
700 | mov eax,4 |
642 | mov eax,4 |
701 | int 0x40 |
643 | mcall |
702 | } |
644 | } |
703 | 645 | ||
704 | macro outcount data, x, y, color, numtype |
646 | macro outcount data, x, y, color, numtype |
705 | { |
647 | { |
706 | mov ecx,data |
648 | mov ecx,data |
707 | mov ebx,numtype |
649 | mov ebx,numtype |
708 | mov bl,0 |
650 | mov bl,0 |
709 | ; mov edx,x*65536+y |
651 | ; mov edx,x*65536+y |
710 | words2reg edx,x,y |
652 | wordstoreg edx,x,y |
Line 711... | Line 653... | ||
711 | mov esi,color |
653 | mov esi,color |
Line 712... | Line 654... | ||
712 | mov eax,47 |
654 | mov eax,47 |
713 | int 0x40 |
655 | mcall |
714 | } |
656 | } |
715 | 657 | ||
716 | ; SCEVENT - Scan event |
658 | ; SCEVENT - Scan event |
717 | 659 | ||
718 | macro scevent red,key,but |
660 | macro scevent red,key,but |
719 | { |
661 | { |
720 | mov eax,11 |
662 | mov eax,11 |
Line 730... | Line 672... | ||
730 | ; WTEVENT - Wait event |
672 | ; WTEVENT - Wait event |
Line 731... | Line 673... | ||
731 | 673 | ||
732 | macro wtevent red,key,but |
674 | macro wtevent red,key,but |
733 | { |
675 | { |
734 | mov eax,10 |
676 | mov eax,10 |
735 | int 0x40 |
677 | mcall |
736 | dec eax |
678 | dec eax |
737 | jz red |
679 | jz red |
738 | dec eax |
680 | dec eax |
739 | jz key |
681 | jz key |
Line 745... | Line 687... | ||
745 | 687 | ||
746 | macro timeevent xfps,noevent,red,key,but |
688 | macro timeevent xfps,noevent,red,key,but |
747 | { |
689 | { |
748 | mov eax,23 |
690 | mov eax,23 |
749 | mov ebx,xfps |
691 | mov ebx,xfps |
750 | int 0x40 |
692 | mcall |
751 | cmp eax,0 |
693 | cmp eax,0 |
752 | je noevent |
694 | je noevent |
753 | dec eax |
695 | dec eax |
754 | jz red |
696 | jz red |
Line 762... | Line 704... | ||
762 | ; CLOSE - Close program |
704 | ; CLOSE - Close program |
Line 763... | Line 705... | ||
763 | 705 | ||
764 | macro close |
706 | macro close |
765 | { |
707 | { |
766 | mov eax,-1 |
708 | mov eax,-1 |
767 | int 0x40 |
709 | mcall |
Line 768... | Line 710... | ||
768 | } |
710 | } |
769 | 711 | ||
770 | ; DELAY - Create delay 1/100 sec |
712 | ; DELAY - Create delay 1/100 sec |
Line 771... | Line 713... | ||
771 | ; (SYNTAX) Delay time |
713 | ; (SYNTAX) Delay time |
772 | ; (SAMPLE) Delay 100 ;delay 2 sec 1/100*200=2 sec |
714 | ; (SAMPLE) Delay 100 ;delay 2 sec 1/100*200=2 sec |
773 | 715 | ||
774 | macro delay arg1 |
716 | macro delay arg1 |
775 | { |
717 | { |
776 | mov eax,5 |
718 | mov eax,5 |
Line 777... | Line 719... | ||
777 | mov ebx,arg1 |
719 | mov ebx,arg1 |
778 | int 0x40 |
720 | mcall |
779 | } |
721 | } |
Line 780... | Line 722... | ||
780 | 722 | ||
781 | ; WINDOW - Draw window |
723 | ; WINDOW - Draw window |
782 | ; (SYNTAX) WINDOW Xstart,Ystart,'Text',Color |
724 | ; (SYNTAX) WINDOW Xstart,Ystart,'Text',Color |
783 | ; (SAMPLE) WINDOW 10,10,640+8,480+24,window_Skinned |
725 | ; (SAMPLE) WINDOW 10,10,640+8,480+24,window_Skinned |
784 | 726 | ||
785 | macro window arg1,arg2,arg3,arg4,arg5 |
727 | macro window arg1,arg2,arg3,arg4,arg5 |
786 | { |
728 | { |
787 | ; mov ebx,arg1*65536+arg3 |
729 | ; mov ebx,arg1*65536+arg3 |
788 | ; mov ecx,arg2*65536+arg4 |
730 | ; mov ecx,arg2*65536+arg4 |
789 | words2reg ebx,arg1,arg3 |
731 | wordstoreg ebx,arg1,arg3 |
Line 790... | Line 732... | ||
790 | words2reg ecx,arg2,arg4 |
732 | wordstoreg ecx,arg2,arg4 |
791 | mov edx,arg5 |
733 | mov edx,arg5 |
792 | mov eax,0 |
734 | mov eax,0 |
793 | int 0x40 |
735 | mcall |
794 | } |
736 | } |
795 | 737 | ||
796 | macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7 |
738 | macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7 |
797 | { |
739 | { |
798 | mov ebx,arg1*65536+arg3 |
740 | mov ebx,arg1*65536+arg3 |
799 | mov ecx,arg2*65536+arg4 |
741 | mov ecx,arg2*65536+arg4 |
Line 800... | Line 742... | ||
800 | mov edx,arg5 |
742 | mov edx,arg5 |
Line 801... | Line 743... | ||
801 | mov esi,arg6 |
743 | mov esi,arg6 |
802 | mov edi,arg7 |
744 | mov edi,arg7 |
803 | mov eax,0 |
745 | mov eax,0 |
804 | int 0x40 |
746 | mcall |
805 | } |
747 | } |
806 | 748 | ||
Line 807... | Line 749... | ||
807 | 749 | ||
Line 808... | Line 750... | ||
808 | ; STARTWD - Start of window draw |
750 | ; STARTWD - Start of window draw |
809 | 751 | ||
810 | macro startwd |
752 | macro startwd |
811 | { |
753 | { |
812 | mov eax,12 |
754 | mov eax,12 |
813 | mov ebx,1 |
755 | mov ebx,1 |
Line 814... | Line 756... | ||
814 | int 0x40 |
756 | mcall |
815 | } |
757 | } |
816 | 758 | ||
Line 834... | Line 776... | ||
834 | lab db arg3 ;arg label |
776 | lab db arg3 ;arg label |
835 | asd: |
777 | asd: |
836 | ; mov ebx,arg1 ;arg1=y arg2=x |
778 | ; mov ebx,arg1 ;arg1=y arg2=x |
837 | ; shl ebx,16 |
779 | ; shl ebx,16 |
838 | ; add ebx,arg2 |
780 | ; add ebx,arg2 |
839 | - | ||
840 | words2reg ebx,arg1,arg2 |
781 | wordstoreg ebx,arg1,arg2 |
841 | - | ||
842 | dword2reg ecx,arg4 |
782 | if ~(arg4 eq ) |
- | 783 | mov ecx,arg4 ;arg4 color |
|
843 | 784 | end if |
|
844 | mov edx,lab |
785 | mov edx,lab |
845 | mov esi,asd-lab ;calc size |
786 | mov esi,asd-lab ;calc size |
846 | mov eax,4 |
787 | mov eax,4 |
847 | int 0x40 |
788 | mcall |
848 | } |
789 | } |
Line 849... | Line 790... | ||
849 | 790 | ||
850 | ;Key's |
791 | ;Key's |
851 | key_Up equ 178 |
792 | key_Up equ 178 |