/[projet1]/public/atari/tools/MOULINEX/GEMMACRO.S
Defence Force logotype

Contents of /public/atari/tools/MOULINEX/GEMMACRO.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1389 - (show annotations)
Tue Mar 7 19:16:33 2017 UTC (2 years, 6 months ago) by dbug
File size: 14583 byte(s)
Added Moulinex, old tool to convert MOD files to LOW format and vice versa
1
2 * Macro library to call AES & VDI
3
4 ***********AES Macros******************
5
6 * macro to call a given AES routine
7 aes macro aes_number
8 XREF CALL_AES,int_in,addr_in,int_out,addr_out,current_handle
9 moveq #\1,d0
10 bsr CALL_AES
11 endm
12 * may need to change BSR CALL_AES to JSR for large programs
13
14 appl_init macro
15 aes 10
16 endm
17
18 appl_read macro id,length,buff
19 move.w \1,intin
20 move.w \2,intin1
21 move.l \3,addr_in
22 aes 11
23 endm
24
25 appl_write macro id,length,buffer
26 move.w \1,intin
27 move.w \2,intin1
28 move.l \3,addr_in
29 aes 12
30 endm
31
32 appl_find macro name
33 move.l \1,addr_in
34 aes 13
35 endm
36
37 appl_tplay macro mem,num,scale
38 move.l \1,addr_in
39 move.w \2,int_in
40 move.w \3,int_in+2
41 aes 14
42 endm
43
44 appl_trecord macro mem,count
45 move.l \1,addr_in
46 move.w \2,int_in
47 aes 15
48 endm
49
50 appl_exit macro
51 aes 19
52 endm
53
54 evnt_keybd macro
55 aes 20
56 endm
57
58 evnt_button macro clicks,mask,state
59 move.w \1,int_in
60 move.w \2,int_in+2
61 move.w \3,int_in+4
62 aes 21
63 endm
64
65 evnt_mouse macro flags,x,y,w,h
66 move.w \1,int_in
67 move.w \2,int_in+2
68 move.w \3,int_in+4
69 move.w \4,int_in+6
70 move.w \5,int_in+8
71 aes 22
72 endm
73
74 evnt_mesag macro buffer
75 move.l \1,addr_in
76 aes 23
77 endm
78
79 evnt_timer macro longcount
80 move.l \1,d0
81 swap d0
82 move.l d0,int_in
83 aes 24
84 endm
85
86 evnt_multi macro flags[,lots]
87 move.w \1,int_in
88 IFNC '\2',''
89 move.w \2,int_in+2
90 ENDC
91 IFNC '\3',''
92 move.w \3,int_in+4
93 ENDC
94 IFNC '\4',''
95 move.w \4,int_in+6
96 ENDC
97 IFNC '\5',''
98 move.w \5,int_in+8
99 ENDC
100 IFNC '\6',''
101 move.w \6,int_in+10
102 ENDC
103 IFNC '\7',''
104 move.w \7,int_in+12
105 ENDC
106 IFNC '\8',''
107 move.w \8,int_in+14
108 ENDC
109 IFNC '\9',''
110 move.w \9,int_in+16
111 ENDC
112 IFNC '\A',''
113 move.w \A,int_in+18
114 ENDC
115 IFNC '\B',''
116 move.w \B,int_in+20
117 ENDC
118 IFNC '\C',''
119 move.w \C,int_in+22
120 ENDC
121 IFNC '\D',''
122 move.w \D,int_in+24
123 ENDC
124 IFNC '\E',''
125 move.w \E,int_in+26
126 ENDC
127 IFNC '\F',''
128 move.l \F,d0
129 swap d0
130 move.l d0,int_in+28
131 ENDC
132 aes 25
133 endm
134
135 evnt_dclick macro new,getset
136 move.w \1,int_in
137 move.w \2,int_in+2
138 aes 26
139 endm
140
141 menu_bar macro tree,show
142 move.l \1,addr_in
143 move.w \2,int_in
144 aes 30
145 endm
146
147 menu_icheck macro tree,item,check
148 move.l \1,addr_in
149 move.w \2,int_in
150 move.w \3,int_in+2
151 aes 31
152 endm
153
154 menu_ienable macro tree,item,enable
155 move.l \1,addr_in
156 move.w \2,int_in
157 move.w \3,int_in+2
158 aes 32
159 endm
160
161 menu_tnormal macro tree,title,normal
162 move.l \1,addr_in
163 move.w \2,int_in
164 move.w \3,int_in+2
165 aes 33
166 endm
167
168 menu_text macro tree,item,text
169 move.l \1,addr_in
170 move.w \2,int_in
171 move.l \3,addr_in+4
172 aes 34
173 endm
174
175 menu_register macro id,string
176 move.w \1,int_in
177 move.l \2,addr_in
178 aes 35
179 endm
180
181 objc_add macro tree,parent,child
182 move.l \1,addr_in
183 move.w \2,int_in
184 move.w \3,int_in+2
185 aes 40
186 endm
187
188 objc_delete macro tree,object
189 move.l \1,addr_in
190 move.w \2,int_in
191 aes 41
192 endm
193
194 objc_draw macro tree,startob,depth,x,y,w,h
195 move.l \1,addr_in
196 move.w \2,int_in
197 move.w \3,int_in+2
198 move.w \4,int_in+4
199 move.w \5,int_in+6
200 move.w \6,int_in+8
201 move.w \7,int_in+10
202 aes 42
203 endm
204
205 objc_find macro tree,startob,depth,x,y
206 move.l \1,addr_in
207 move.w \2,int_in
208 move.w \3,int_in+2
209 move.w \4,int_in+4
210 move.w \5,int_in+6
211 aes 43
212 endm
213
214 objc_offset macro tree,object
215 move.l \1,addr_in
216 move.w \2,int_in
217 aes 44
218 endm
219
220 objc_order macro tree,object,newpos
221 move.l \1,addr_in
222 move.w \2,int_in
223 move.w \3,int_in+2
224 aes 45
225 endm
226
227 objc_edit macro tree,object,char,idx,kind
228 move.l \1,addr_in
229 move.w \2,int_in
230 move.w \3,int_in+2
231 move.w \4,int_in+4
232 move.w \5,int_in+6
233 aes 46
234 endm
235
236 objc_change macro tree,object,x,y,w,h,new,redraw
237 move.l \1,addr_in
238 move.w \2,int_in
239 clr.w int_in+2
240 move.w \3,int_in+4
241 move.w \4,int_in+6
242 move.w \5,int_in+8
243 move.w \6,int_in+10
244 move.w \7,int_in+12
245 move.w \8,int_in+14
246 aes 47
247 endm
248
249 form_do macro tree,startob
250 move.l \1,addr_in
251 move.w \2,int_in
252 aes 50
253 endm
254
255 form_dial macro flag,x,y,w,h,x2,y2,w2,h2
256 move.w \1,int_in
257 move.w \2,int_in+2
258 move.w \3,int_in+4
259 move.w \4,int_in+6
260 move.w \5,int_in+8
261 move.w \6,int_in+10
262 move.w \7,int_in+12
263 move.w \8,int_in+14
264 move.w \9,int_in+16
265 aes 51
266 endm
267
268 form_alert macro button,string
269 move.w \1,int_in
270 move.l \2,addr_in
271 aes 52
272 endm
273
274 form_error macro errnum
275 move.w \1,int_in
276 aes 53
277 endm
278
279 form_center macro tree
280 move.l \1,addr_in
281 aes 54
282 endm
283
284 graf_rubberbox macro x,y,w,h
285 move.w \1,int_in
286 move.w \2,int_in+2
287 move.w \3,int_in+4
288 move.w \4,int_in+6
289 aes 70
290 endm
291
292 graf_dragbox macro w,h,x,y,bx,bh,bw,bh
293 move.w \1,int_in
294 move.w \2,int_in+2
295 move.w \3,int_in+4
296 move.w \4,int_in+6
297 move.w \5,int_in+8
298 move.w \6,int_in+10
299 move.w \7,int_in+12
300 move.w \8,int_in+14
301 aes 71
302 endm
303
304 graf_movebox macro w,h,x,y,dx,dy
305 move.w \1,int_in
306 move.w \2,int_in+2
307 move.w \3,int_in+4
308 move.w \4,int_in+6
309 move.w \5,int_in+8
310 move.w \6,int_in+10
311 aes 72
312 endm
313
314 graf_growbox macro x,y,w,h,fx,fy,fw,fh
315 move.w \1,int_in
316 move.w \2,int_in+2
317 move.w \3,int_in+4
318 move.w \4,int_in+6
319 move.w \5,int_in+8
320 move.w \6,int_in+10
321 move.w \7,int_in+12
322 move.w \8,int_in+14
323 aes 73
324 endm
325
326 graf_shrinkbox macro x,y,w,h,sx,sy,sw,sh
327 move.w \1,int_in
328 move.w \2,int_in+2
329 move.w \3,int_in+4
330 move.w \4,int_in+6
331 move.w \5,int_in+8
332 move.w \6,int_in+10
333 move.w \7,int_in+12
334 move.w \8,int_in+14
335 aes 74
336 endm
337
338 graf_watchbox macro tree,object,instate,outstate
339 clr.w int_in
340 move.l \1,addr_in
341 move.w \2,int_in+2
342 move.w \3,int_in+4
343 move.w \4,int_in+6
344 aes 75
345 endm
346
347 graf_slidebox macro tree,parent,obj,vh
348 move.l \1,addr_in
349 move.w \2,int_in
350 move.w \3,int_in+2
351 move.w \4,int_in+3
352 endm
353
354 graf_handle macro
355 aes 77
356 endm
357
358 graf_mouse macro num<,addr>
359 move.w \1,int_in
360 IFNC '\2',''
361 move.l \2,addr_in
362 ENDC
363 aes 78
364 endm
365
366 ; 0 Fl‚che /1 Curseur /2 Abeille /3 Doigt point‚
367 ; 4 Main ouverte /5 R‚ticule fin /6 R‚ticule ‚paix /7 Contour de r‚ticule
368 ; 255 --> D‚finition dans addr_in
369 ; 256 --> Hidem
370 ; 257 --> Showm
371
372 graf_mkstate macro
373 aes 79
374 endm
375
376 scrp_read macro scrap
377 move.l \1,addr_in
378 aes 80
379 endm
380
381 scrp_write macro scrap
382 move.l \1,addr_in
383 aes 81
384 endm
385
386 fsel_input macro path,filename
387 move.l \1,addr_in
388 move.l \2,addr_in+4
389 aes 90
390 endm
391
392 wind_create macro kind,x,y,w,h
393 move.w \1,int_in
394 move.w \2,int_in+2
395 move.w \3,int_in+4
396 move.w \4,int_in+6
397 move.w \5,int_in+8
398 aes 100
399 endm
400
401 wind_open macro handle,x,y,w,h
402 move.w \1,int_in
403 move.w \2,int_in+2
404 move.w \3,int_in+4
405 move.w \4,int_in+6
406 move.w \5,int_in+8
407 aes 101
408 endm
409
410 wind_close macro handle
411 move.w \1,int_in
412 aes 102
413 endm
414
415 wind_delete macro handle
416 move.w \1,int_in
417 aes 103
418 endm
419
420 wind_get macro handle,field
421 move.w \1,int_in
422 move.w \2,int_in+2
423 aes 104
424 endm
425
426 wind_set macro handle,field
427 move.w \1,int_in
428 move.w \2,int_in+2
429 aes 105
430 endm
431
432 wind_find macro x,y
433 move.w \1,int_in
434 move.w \2,int_in+2
435 aes 106
436 endm
437
438 wind_update macro begend
439 move.w \1,int_in
440 aes 107
441 endm
442
443 wind_calc macro type,kind,inx,iny,inw,inh
444 move.w \1,int_in
445 move.w \2,int_in+2
446 move.w \3,int_in+4
447 move.w \4,int_in+6
448 move.w \5,int_in+8
449 move.w \6,int_in+10
450 aes 108
451 endm
452
453 rsrc_load macro name
454 move.l \1,addr_in
455 aes 110
456 endm
457
458 rsrc_free macro
459 aes 111
460 endm
461
462 rsrc_gaddr macro type,index
463 move.w \1,int_in
464 move.w \2,int_in+2
465 move.l #112<<16+2,control
466 move.l #1<<16,control+4
467 move.w #1,control+8 unique!
468 move.l #aes_params,d1
469 move.w #200,d0
470 trap #2
471 move.w int_out,d0
472 endm
473
474 rsrc_saddr macro type,index,saddr
475 move.w \1,int_in
476 move.w \2,int_in+2
477 move.l \3,addr_in
478 aes 113
479 endm
480
481 rsrc_obfix macro tree,object
482 move.l \1,addr_in
483 move.w \2,int_in
484 aes 114
485 endm
486
487 shel_read macro command,shell
488 move.l \1,addr_in
489 move.l \2,addr_in+4
490 aes 120
491 endm
492
493 shel_write macro doex,sgr,scr,cmd,shell
494 move.w \1,int_in
495 move.w \2,int_in+2
496 move.w \3,int_in+4
497 move.l \4,addr_in
498 move.l \5,addr_in+4
499 aes 121
500 endm
501
502 shel_find macro buffer
503 move.l \1,addr_in
504 aes 124
505 endm
506
507 shel_envrn macro value,string
508 move.l \1,addr_in
509 move.l \2,addr_in+4
510 aes 125
511 endm
512
513
514 *********** END OF AES *************
515
516
517 *********** VDI MACROS *************
518
519 * conditional macro definition(!) to call vdi routine
520 IFGT __LK
521 callvdi macro vdiname
522 XREF \1,contrl,contrl1,contrl3
523 XREF intin,ptsin,intout,ptsout,vdi_params
524 BSR \1
525 endm
526 ELSEIF
527 callvdi macro vdiname
528 BSR \1
529 endm
530 ENDC
531 * may need to change BSR above to JSR for large progs
532
533 v_opnwk macro
534 callvdi v_opnwk
535 endm
536
537 v_clswk macro
538 callvdi v_clswk
539 endm
540
541 v_opnvwk macro
542 callvdi v_opnvwk
543 endm
544
545 v_clsvwk macro
546 callvdi v_clsvwk
547 endm
548
549 v_clrwk macro
550 callvdi v_clrwk
551 endm
552
553 v_updwk macro
554 callvdi v_updwk
555 endm
556
557 vst_load_fonts macro
558 callvdi vst_load_fonts
559 endm
560
561 vst_unload_fonts macro
562 callvdi vst_unload_fonts
563 endm
564
565 vs_clip macro flag,x1,y1,x2,y2
566 move.w \1,intin
567 move.w \2,ptsin
568 move.w \3,ptsin+2
569 move.w \4,ptsin+4
570 move.w \5,ptsin+6
571 callvdi vs_clip
572 endm
573
574 v_pline macro count
575 move.w \1,contrl1
576 callvdi v_pline
577 endm
578
579 v_pmarker macro count
580 move.w \1,contrl1
581 callvdi v_pmarker
582 endm
583
584 v_gtext macro x,y,string
585 move.w \1,ptsin
586 move.w \2,ptsin+2
587 move.l \3,a0
588 callvdi v_gtext
589 endm
590
591 v_fillarea macro count
592 move.w \1,contrl1
593 callvdi v_fillarea
594 endm
595
596 v_contour_fill macro x,y,index
597 move.w \1,ptsin
598 move.w \2,ptsin+2
599 move.w \3,intin
600 callvdi v_contour_fill
601 endm
602
603 vr_recfl macro x1,y1,x2,y2
604 move.w \1,ptsin
605 move.w \2,ptsin+2
606 move.w \3,ptsin+4
607 move.w \4,ptsin+6
608 callvdi vr_recfl
609 endm
610
611 v_bar macro x1,y1,x2,y2
612 move.w \1,ptsin
613 move.w \2,ptsin+2
614 move.w \3,ptsin+4
615 move.w \4,ptsin+6
616 callvdi v_bar
617 endm
618
619 v_arc macro x,y,rad,start,end
620 move.w \1,ptsin
621 move.w \2,ptsin+2
622 move.w \3,ptsin+12
623 moev.w \4,intin
624 move.w \5,intin+2
625 callvdi v_arc
626 endm
627
628 v_pieslice macro x,y,rad,start,end
629 move.w \1,ptsin
630 move.w \2,ptsin+2
631 move.w \3,ptsin+12
632 moev.w \4,intin
633 move.w \5,intin+2
634 callvdi v_pieslice
635 endm
636
637 v_circle macro x,y,rad
638 move.w \1,ptsin
639 move.w \2,ptsin+2
640 move.w \3,ptsin+8
641 callvdi v_circle
642 endm
643
644 v_ellarc macro x,y,xr,yr,start,end
645 move.w \1,ptsin
646 move.w \2,ptsin+2
647 move.w \3,ptsin+4
648 move.w \4,ptsin+6
649 move.w \5,intin
650 move.w \6,intin+2
651 callvdi v_ellarc
652 endm
653
654 v_ellpie macro x,y,xr,yr,start,end
655 move.w \1,ptsin
656 move.w \2,ptsin+2
657 move.w \3,ptsin+4
658 move.w \4,ptsin+6
659 move.w \5,intin
660 move.w \6,intin+2
661 callvdi v_ellpie
662 endm
663
664 v_ellipse macro x,y,xr,yr
665 move.w \1,ptsin
666 move.w \2,ptsin+2
667 move.w \3,ptsin+4
668 move.w \4,ptsin+6
669 callvdi v_ellipse
670 endm
671
672 v_rbox macro x1,y1,x2,y2
673 move.w \1,ptsin
674 move.w \2,ptsin+2
675 move.w \3,ptsin+4
676 move.w \4,ptsin+6
677 callvdi v_rbox
678 endm
679
680 v_rfbox macro x1,y1,x2,y2
681 move.w \1,ptsin
682 move.w \2,ptsin+2
683 move.w \3,ptsin+4
684 move.w \4,ptsin+6
685 callvdi v_rfbox
686 endm
687
688 v_justified macro x,y,string,length,ws,cs
689 move.w \1,ptsin
690 move.w \2,ptsin+2
691 move.w \4,ptsin+4
692 move.w \5,intin
693 move.w \6,intin+2
694 move.l \3,a0
695 callvdi v_justified
696 endm
697
698 vswr_mode macro mode
699 move.w \1,intint
700 callvdi vswr_mode
701 endm
702
703 vs_color macro index,read,green,blue
704 move.w \1,intin
705 move.w \2,intin+2
706 move.w \3,intin+4
707 move.w \4,intin+6
708 callvdi vs_color
709 endm
710
711 vsl_type macro style
712 move.w \1,intin
713 callvdi vsl_type
714 endm
715
716 vsl_udsty macro pattern
717 move.w \1,intin
718 callvdi vsl_udsty
719 endm
720
721 vsl_width macro width
722 move.w \1,ptsin
723 callvdi vsl_width
724 endm
725
726 vsl_color macro index
727 move.w \1,intin
728 callvdi vsl_color
729 endm
730
731 vsl_ends macro beg,end
732 move.w \1,intin
733 move.w \2,intin+2
734 callvdi vsl_ends
735 endm
736
737 vsm_type macro symbol
738 move.w \1,intin
739 callvdi vsm_type
740 endm
741
742 vsm_height macro height
743 move.w \1,ptsin+2
744 callvdi vsm_height
745 endm
746
747 vsm_color macro index
748 move.w \1,intin
749 callvdi vsm_color
750 endm
751
752 vst_height macro height
753 move.w \1,ptsin+2
754 callvdi vst_height
755 endm
756
757 vst_point macro point
758 move.w \1,intin
759 callvdi vst_point
760 endm
761
762 vst_rotation macro angle
763 move.w \1,intin
764 callvdi vst_rotation
765 endm
766
767 vst_font macro font
768 move.w \1,intin
769 callvdi vst_font
770 endm
771
772 vst_color macro index
773 move.w \1,intin
774 callvdi vst_color
775 endm
776
777 vst_effects macro effect
778 move.w \1,intin
779 callvdi vst_effects
780 endm
781
782 vst_alignment macro hor,vert
783 move.w \1,intin
784 move.w \2,intin+2
785 callvdi vst_alignment
786 endm
787
788 vsf_interior macro style
789 move.w \1,intin
790 callvdi vsf_interior
791 endm
792
793 vsf_style macro index
794 move.w \1,intin
795 callvdi vsf_style
796 endm
797
798 vsf_color macro index
799 move.w \1,intin
800 callvdi vsf_color
801 endm
802
803 vsf_perimeter macro vis
804 move.w \1,intin
805 callvdi vsf_perimeter
806 endm
807
808 vsf_updat macro
809 callvdi vsf_updat
810 endm
811
812 vro_cpyfm macro mode,sourceMFDB,destMFDB
813 move.w \1,intin
814 move.l \2,contrl+14
815 move.l \3,contrl+18
816 callvdi vro_cpyfm
817 endm
818
819 vrt_cpyfm macro mode,sourceMFDB,destMFDB,index1,index2
820 move.w \1,intin
821 move.l \2,contrl+14
822 move.l \3,contrl+18
823 move.w \4,intin+2
824 move.w \5,intin+4
825 callvdi vrt_cpyfm
826 endm
827
828 vr_trnfm macro source,dest
829 move.l \1,contrl+14
830 move.l \2,contrl+18
831 callvdi vr_trnfm
832 endm
833
834 v_get_pixel macro x,y
835 move.w \1,ptsin
836 move.w \2,ptsin+2
837 callvdi v_get_pixel
838 endm
839
840 vex_timv macro newtimer
841 move.l \1,contrl+14
842 callvdi vex_timv
843 endm
844
845 v_show_c macro reset
846 move.w \1,intin
847 callvdi v_show_c
848 endm
849
850 v_hide_c macro
851 callvdi v_hide_c
852 endm
853
854 vq_mouse macro
855 callvdi vq_mouse
856 endm
857
858 vex_butv macro newxbut
859 move.l \1,contrl+14
860 callvdi vex_butv
861 endm
862
863 vex_motv macro newmov
864 move.l \1,contrl+14
865 callvdi vex_motv
866 endm
867
868 vex_curv macro newcursor
869 move.l \1,contrl+14
870 callvdi vex_curv
871 endm
872
873 vq_key_s macro
874 callvdi vq_key_s
875 endm
876
877 vq_extnd macro flag
878 move.w \1,intin
879 callvdi vq_extnd
880
881 vq_color macro index,flag
882 move.w \1,intin
883 move.w \2,intin+2
884 callvdi vq_color
885 endm
886
887 vql_attributes macro
888 callvdi vql_attributes
889 endm
890
891 vqm_attributes macro
892 callvdi vqm_attributes
893 endm
894
895 vqf_attributes macro
896 callvdi vqf_attributes
897 endm
898
899 vqt_attributes macro
900 callvdi vqt_attributes
901 endm
902
903 vqt_extent macro string
904 move.l \1,a0
905 callvdi vqt_extent
906 endm
907
908 vqt_width macro char
909 move.w \1,intin
910 callvdi vqt_width
911 endm
912
913 vqt_name macro number
914 move.w \1,intin
915 callvdi vqt_name
916 endm
917
918 vqt_fontinfo macro
919 callvdi vqt_fontinfo
920 endm
921
922 *********** END OF VDI *****************

  ViewVC Help
Powered by ViewVC 1.1.26