home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI09.ARJ / ictari.09 / ASSEMBLY / MACROS / MACRO_1 / TOSMACRO.S next >
Text File  |  1994-03-25  |  9KB  |  643 lines

  1. ;TOS MACRO file for DevPac assembler
  2. ;Version 1.      15-10-1993      Compiled by Peter Hibbs
  3.  
  4. ;    ---------------- Operating System Macros -------------------
  5.  
  6. ;Calls TRAP No #1 and then tidies up stack and tests d0.l
  7.  
  8. gemdos     MACRO        trap No, stack size
  9.     move    \1,-(sp)
  10.     trap    #1
  11.     add    \2,sp
  12.     tst    d0
  13.     ENDM
  14.  
  15. ;Calls TRAP No #13 and then tidies up stack and tests d0.l
  16.  
  17. bios     MACRO        trap No, stack size
  18.     move    \1,-(sp)
  19.     trap    #13
  20.     add    \2,sp
  21.     tst    d0
  22.     ENDM
  23.  
  24. ;Calls TRAP No #14 and then tidies up stack and tests d0.l
  25.  
  26. xbios     MACRO        trap No, stack size
  27.     move    \1,-(sp)
  28.     trap    #14
  29.     add    \2,sp
  30.     tst    d0
  31.     ENDM
  32.  
  33. ;   ------------------------ GEMDOS (TRAP #1) ---------------------
  34.  
  35. p_term0    MACRO
  36.     clr    -(sp)
  37.     trap    #1
  38.     illegal
  39.     ENDM
  40.     
  41. c_conin    MACRO
  42.     gemdos    #1,#2
  43.     ENDM
  44.  
  45. c_conout    MACRO        1\char
  46.     move    \1,-(sp)
  47.     gemdos    #2,#4
  48.     ENDM
  49.  
  50. c_auxin    MACRO
  51.     gemdos    #3,#2
  52.     ENDM
  53.     
  54. c_auxout    MACRO        1\char
  55.     move    \1,-(sp)
  56.     gemdos    #4,#4
  57.     ENDM
  58.  
  59. c_prnout    MACRO        1\char
  60.     move    \1,-(sp)
  61.     gemdos    #5,#4
  62.     ENDM
  63.  
  64. c_rawio    MACRO        1\char
  65.     move    \1,-(sp)
  66.     gemdos    #6,#4
  67.     ENDM
  68.  
  69. c_rawcin    MACRO
  70.     gemdos    #7,#2
  71.     ENDM
  72.  
  73. c_necin    MACRO
  74.     gemdos    #8,#2
  75.     ENDM
  76.  
  77. c_conws     MACRO        1\buffer_addr
  78.     move.l    \1,-(sp)
  79.     gemdos    #9,#6
  80.     ENDM
  81.  
  82. c_conrs     MACRO        1\buffer_addr
  83.     move.l    \1,-(sp)
  84.     gemdos    #10,#6
  85.     ENDM
  86.  
  87. c_conis    MACRO
  88.     gemdos    #11,#2
  89.     ENDM
  90.  
  91. d_setdrv     MACRO        1\drive_No
  92.     move    \1,-(sp)
  93.     gemdos    #14,#4
  94.     ENDM
  95.  
  96. c_conos    MACRO
  97.     gemdos    #16,#2
  98.     ENDM
  99.  
  100. c_prnos    MACRO
  101.     gemdos    #17,#2
  102.     ENDM
  103.  
  104. c_auxis    MACRO
  105.     gemdos    #18,#2
  106.     ENDM
  107.  
  108. c_auxos    MACRO
  109.     gemdos    #19,#2
  110.     ENDM
  111.  
  112. m_addalt    MACRO        1\size,2\address
  113.     move.l    \1,-(sp)
  114.     move.l    \2,-(sp)
  115.     gemdos    #20,#10
  116.     ENDM
  117.  
  118. d_getdrv    MACRO
  119.     gemdos    #25,#2
  120.     ENDM
  121.  
  122. f_setdta     MACRO        1\buffer_address
  123.     move.l    \1,-(sp)
  124.     gemdos    #26,#6
  125.     ENDM
  126.  
  127. super    MACRO
  128.     clr.l    -(sp)
  129.     gemdos    #32,#6
  130.     ENDM
  131.  
  132. user    MACRO        1\old stack
  133.     move.l    \1,-(sp)
  134.     gemdos    #32,#6
  135.     ENDM
  136.  
  137. t_getdate    MACRO
  138.     gemdos    #42,#2
  139.     ENDM
  140.  
  141. t_setdate     MACRO        1\date
  142.     move    \1,-(sp)
  143.     gemdos    #43,#4
  144.     ENDM
  145.  
  146. t_gettime    MACRO
  147.     gemdos    #44,#2
  148.     ENDM
  149.  
  150. t_settime     MACRO        1\time
  151.     move    \1,-(sp)
  152.     gemdos    #45,#4
  153.     ENDM
  154.  
  155. f_getdta    MACRO
  156.     gemdos    #47,#2
  157.     ENDM
  158.  
  159. s_version    MACRO
  160.     gemdos    #48,#2
  161.     ENDM
  162.  
  163. p_termres    MACRO        1\ret_code,2\bytes
  164.     move    \1,-(sp)
  165.     move.l    \2,-(sp)
  166.     gemdos    #49,#8
  167.     ENDM
  168.  
  169. d_free    MACRO        1\drive,2\buffer
  170.     move    \1,-(sp)
  171.     move.l    \2,-(sp)
  172.     gemdos    #54,#8
  173.     ENDM
  174.  
  175. d_create    MACRO        1\address
  176.     move.l    \1,-(sp)
  177.     gemdos    #57,#6
  178.     ENDM
  179.  
  180. d_delete    MACRO        1\address
  181.     move.l    \1,-(sp)
  182.     gemdos    #58,#6
  183.     ENDM
  184.  
  185. d_setpath    MACRO        1\address
  186.     move.l    \1,-(sp)
  187.     gemdos    #59,#6
  188.     ENDM
  189.  
  190. f_create     MACRO        1\attribute,2\filename
  191.     move    \1,-(sp)
  192.     move.l    \2,-(sp)
  193.     gemdos    #60,#8
  194.     ENDM
  195.  
  196. f_open     MACRO        1\attribute,2\filename
  197.     move    \1,-(sp)
  198.     move.l    \2,-(sp)
  199.     gemdos    #61,#8
  200.     ENDM
  201.  
  202. f_close     MACRO        1\fhandle
  203.     move    \1,-(sp)
  204.     gemdos    #62,#4
  205.     ENDM
  206.  
  207. f_read     MACRO        1\buffer,2\count,3\fhandle
  208.     move.l    \1,-(sp)
  209.     move.l    \2,-(sp)
  210.     move    \3,-(sp)
  211.     gemdos    #63,#12
  212.     ENDM
  213.  
  214. f_write     MACRO        1\buffer,2\count,3\fhandle
  215.     move.l    \1,-(sp)
  216.     move.l    \2,-(sp)
  217.     move    \3,-(sp)
  218.     gemdos    #64,#12
  219.     ENDM
  220.  
  221. f_delete     MACRO        1\filename
  222.     move.l    \1,-(sp)
  223.     gemdos    #65,#6
  224.     ENDM
  225.  
  226. f_seek     MACRO        1\mode,2\fhandle,3\offset
  227.     move    \1,-(sp)
  228.     move    \2,-(sp)
  229.     move.l    \3,-(sp)
  230.     gemdos    #66,#10
  231.     ENDM
  232.  
  233. f_attrib    MACRO        1\attrib,2\get/set,3\address
  234.     move    \1,-(sp)
  235.     move    \2,-(sp)
  236.     move.l    \3,-(sp)
  237.     gemdos    #67,#10
  238.     ENDM
  239.  
  240. f_dup    MACRO        1\standard_handle
  241.     move    \1,-(sp)
  242.     gemdos    #69,#4
  243.     ENDM
  244.  
  245. f_force    MACRO        1\nstdh,2\stdh
  246.     move    \1,-(sp)
  247.     move    \2,-(sp)
  248.     gemdos    #70,#6
  249.     ENDM
  250.  
  251. d_getpath    MACRO        1\drive,2\address
  252.     move    \1,-(sp)
  253.     move.l    \2,-(sp)
  254.     gemdos    #71,#8
  255.     ENDM
  256.  
  257. m_alloc    MACRO        1\size
  258.     move.l    \1,-(sp)
  259.     gemdos    #72,#6
  260.     ENDM
  261.  
  262. m_free    MACRO        1\address
  263.     move.l    \1,-(sp)
  264.     gemdos    #73,#6
  265.     ENDM
  266.  
  267. m_shrink     MACRO        1\newsize,2\block
  268.     move.l    \1,-(sp)
  269.     move.l    \2,-(sp)
  270.     clr    -(sp)
  271.     gemdos    #74,#12
  272.     ENDM
  273.  
  274. p_exec     MACRO        1\environ,2\command,3\filename,4\mode
  275.     move.l    \1,-(sp)
  276.     move.l    \2,-(sp)
  277.     move.l    \3,-(sp)
  278.     move    \4,-(sp)
  279.     gemdos    #75,#16
  280.     ENDM
  281.  
  282. p_term     MACRO        1\return_code or nothing
  283.     IFNE     \?1
  284.     move    \1,-(sp)
  285.     ELSE
  286.     clr    -(sp)
  287.     ENDC
  288.     move    #76,-(sp)
  289.     trap    #1
  290.     illegal        generate error if no return
  291.     ENDM
  292.  
  293. f_sfirst     MACRO        1\attribute,2\filespec
  294.     move    \1,-(sp)
  295.     move.l    \2,-(sp)
  296.     gemdos    #78,#8
  297.     ENDM
  298.  
  299. f_snext    MACRO
  300.     gemdos    #79,#2
  301.     ENDM
  302.  
  303. f_rename    MACRO        1\newname,2\oldname
  304.     move.l    \1,-(sp)
  305.     move.l    \2,-(sp)
  306.     clr    -(sp)    dummy
  307.     gemdos    #86,#12
  308.     ENDM
  309.  
  310. f_datime    MACRO        1\mode,2\fhandle,3\buffer
  311.     move    \1,-(sp)
  312.     move.l    \3,-(sp)
  313.     move    \2,-(sp)
  314.     gemdos    #87,#10
  315.     ENDM
  316.  
  317. ;------------------------BIOS (TRAP #13) -------------------------
  318.  
  319. getmpb     MACRO        1\pointer
  320.     move.l    \1,-(sp)
  321.     bios     #0,#6
  322.     ENDM
  323.  
  324. bconstat     MACRO        1\device
  325.     move    \1,-(sp)
  326.     bios    #1,#4
  327.     ENDM
  328.  
  329. bconin     MACRO        1\device
  330.     move    \1,-(sp)
  331.     bios    #2,#4
  332.     ENDM
  333.  
  334. bconout     MACRO        1\character,2\device
  335.     move    \1,-(sp)
  336.     move    \2,-(sp)
  337.     bios    #3,#6
  338.     ENDM
  339.  
  340. rwabs     MACRO        1\drive,2\recno,3\count,4\buffer,5\mode
  341.     move    \1,-(sp)
  342.     move    \2,-(sp)
  343.     move    \3,-(sp)
  344.     move.l    \4,-(sp)
  345.     move    \5,-(sp)
  346.     bios    #4,#14
  347.     ENDM
  348.  
  349. setexc     MACRO        1\vecaddress,2\vecnum
  350.     move.l    \1,-(sp)
  351.     move    \2,-(sp)
  352.     bios    #5,#8
  353.     ENDM
  354.  
  355. tickcal    MACRO
  356.     bios    #6,#2
  357.     ENDM
  358.  
  359. getbpb     MACRO        1\deviceno
  360.     move    \1,-(sp)
  361.     bios    #7,#4
  362.     ENDM
  363.  
  364. bcostat     MACRO        1\deviceno
  365.     move     \1,-(sp)
  366.     bios    #8,#4
  367.     ENDM
  368.  
  369. mediach     MACRO        1\deviceno
  370.     move    \1,-(sp)
  371.     bios    #9,#4
  372.     ENDM
  373.  
  374. drvmap    MACRO
  375.     bios    #10,#2
  376.     ENDM
  377.  
  378. kbshift     MACRO        1\mode
  379.     move    \1,-(sp)
  380.     bios    #11,#4
  381.     ENDM
  382.  
  383. ;-------------------- Extended BIOS (TRAP #14) ----------------
  384.  
  385. initmous     MACRO        1\mode,2\parameter,3\vector
  386.     move.l    \3,(sp)
  387.     move.l    \2,-(sp)
  388.     move    \1,-(sp)
  389.     xbios    #0,#12
  390.     ENDM
  391.  
  392. physbase    MACRO
  393.     xbios    #2,#2
  394.     ENDM
  395.  
  396. logbase    MACRO
  397.     xbios    #3,#2
  398.     ENDM
  399.  
  400. getrez    MACRO
  401.     xbios    #4,#2
  402.     ENDM
  403.  
  404. setscreen     MACRO        1\mode,2\physaddress,3\logaddress
  405.     move    \1,-(sp)
  406.     move.l    \2,-(sp)
  407.     move.l    \3,-(sp)
  408.     xbios    #5,#12
  409.     ENDM
  410.  
  411. setpalette     MACRO        1\pointer
  412.     move.l    \1,-(sp)
  413.     xbios    #6,#6
  414.     ENDM
  415.  
  416. setcolor     MACRO        1\color,2\colnumber
  417.     move    \1,-(sp)
  418.     move    \2,-(sp)
  419.     xbios    #7,#6
  420.     ENDM
  421.     
  422. floprd     MACRO        1\count,2\sideno,3\trackno,4\sectno,5\driveno,6\buffer
  423.     move    \1,-(sp)
  424.     move    \2,-(sp)
  425.     move    \3,-(sp)
  426.     move    \4,-(sp)
  427.     move    \5,-(sp)
  428.     clr.l    -(sp)    ; (filler)
  429.     move.l    \6,-(sp)
  430.     xbios    #8,#20
  431.     ENDM
  432.  
  433. flopwr     MACRO        1\count,2\sideno,3\trackno,4\sectno,5\driveno,6\buffer
  434.     move    \1,-(sp)
  435.     move    \2,-(sp)
  436.     move    \3,-(sp)
  437.     move    \4,-(sp)
  438.     move    \5,-(sp)
  439.     clr.l    -(sp)    ; (filler)
  440.     move.l    \6,-(sp)
  441.     xbios    #9,#20
  442.     ENDM
  443.  
  444. flopfmt     MACRO        1\newdata,2\magic,3\interlv,4\sideno,5\trackno,6\sector,7\driveno,8\buffer
  445.     move    \1,-(sp)
  446.     move.l    \2,-(sp)
  447.     move    \3,-(sp)
  448.     move    \4,-(sp)
  449.     move    \5,-(sp)
  450.     move    \6,-(sp)
  451.     move    \7,-(sp)
  452.     clr.l    -(sp)    ; (filler)
  453.     move.l    \8,-(sp)
  454.     xbios    #10,#26
  455.     ENDM
  456.  
  457. midiws     MACRO        1\pointer,2\count
  458.     move.l    \1,-(sp)
  459.     move    \2,-(sp)
  460.     xbios    #12,#8
  461.     ENDM
  462.  
  463. mfpint    MACRO        1\address,2\number
  464.     move.l    \1,-(sp)
  465.     move    \2,-(sp)
  466.     xbios    #13,#8
  467.     ENDM
  468.  
  469. iorec    MACRO        1\device
  470.     move    \1,-(sp)
  471.     xbios    #14,#4
  472.     ENDM
  473.  
  474. rsconf    MACRO        1\scr,2\tsr,3\rsr,4\ucr,5\ctrl,6\baud
  475.     move    \1,-(sp)
  476.     move    \2,-(sp)
  477.     move    \3,-(sp)
  478.     move    \4,-(sp)
  479.     move    \5,-(sp)
  480.     move    \6,-(sp)
  481.     xbios    #15,#14
  482.     ENDM
  483.  
  484. keytbl    MACRO        1\caps,2\shift,3\unshift
  485.     move.l    \1,-(sp)
  486.     move.l    \2,-(sp)
  487.     move.l    \3,-(sp)
  488.     xbios    #16,#14
  489.     ENDM
  490.  
  491. random    MACRO
  492.     xbios    #17,#2
  493.     ENDM
  494.  
  495. protobt     MACRO        1\execflag,2\disktype,3\serialno,4\buffer
  496.     move    \1,-(sp)
  497.     move    \2,-(sp)
  498.     move.l    \3,-(sp)
  499.     move.l    \4,-(sp)
  500.     xbios    #18,#14
  501.     ENDM
  502.  
  503. flopver     MACRO        1\count,2\sideno,3\trackno,4\sectno,5\driveno,6\buffer
  504.     move    \1,-(sp)
  505.     move    \2,-(sp)
  506.     move    \3,-(sp)
  507.     move    \4,-(sp)
  508.     move    \5,-(sp)
  509.     clr.l    -(sp)    ; (filler)
  510.     move.l    \6,-(sp)
  511.     xbios    #19,#20
  512.     ENDM
  513.  
  514. scrdmp    MACRO
  515.     xbios    #20,#2
  516.     ENDM
  517.  
  518. cursconf     MACRO        1\flash,2\function
  519.     move    \1,-(sp)
  520.     move    \2,-(sp)
  521.     xbios    #21,#6
  522.     ENDM
  523.  
  524. settime    MACRO        1\time
  525.     move.l    \1,-(sp)
  526.     xbios    #22,#6
  527.     ENDM
  528.  
  529. gettime    MACRO
  530.     xbios    #23,#2
  531.     ENDM
  532.  
  533. bioskeys    MACRO
  534.     xbios    #24,#2
  535.     ENDM
  536.  
  537. ikbdws    MACRO        1\pointer,2\number
  538.     move.l    \1,-(sp)
  539.     move    \2,-(sp)
  540.     xbios    #25,#8
  541.     ENDM
  542.  
  543. jdisint    MACRO        1\number
  544.     move    \1,-(sp)
  545.     xbios    #26,#4
  546.     ENDM
  547.  
  548. jenabint    MACRO        1\number
  549.     move    \1,-(sp)
  550.     xbios    #27,#4
  551.     ENDM
  552.  
  553. giaccess    MACRO        1\register,2\data
  554.     move    \1,-(sp)
  555.     move    \2,-(sp)
  556.     xbios    #28,#6
  557.     ENDM
  558.  
  559. offgbit    MACRO        1\bit_mask
  560.     move    \1,-(sp)
  561.     xbios    #29,#4
  562.     ENDM
  563.  
  564. ongibit    MACRO        1\bit_mask
  565.     move    \1,-(sp)
  566.     xbios    #30,#4
  567.     ENDM
  568.  
  569. xbtimer    MACRO        1\vector,2\data,3\cntrl,4\timer
  570.     move.l    \1,-(sp)
  571.     move    \2,-(sp)
  572.     move    \3,-(sp)
  573.     move    \4,-(sp)
  574.     xbios    #31,#12
  575.     ENDM
  576.  
  577. dosound    MACRO        1\pointer
  578.     move.l    \1,-(sp)
  579.     xbios    #32,#6
  580.     ENDM
  581.  
  582. setprt    MACRO        1\config
  583.     move    \1,-(sp)
  584.     xbios    #33,#4
  585.     ENDM
  586.  
  587. kbdvbase    MACRO
  588.     xbios    #34,#2
  589.     ENDM
  590.  
  591. kbrate    MACRO        1\repeat,2\delay
  592.     move    \1,-(sp)
  593.     move    \2,-(sp)
  594.     xbios    #35,#6
  595.     ENDM
  596.  
  597. prtblk    MACRO        1\pointer
  598.     move.l    \1,-(sp)
  599.     xbios    #36,#6
  600.     ENDM
  601.  
  602. vsync    MACRO
  603.     xbios    #37,#2
  604.     ENDM
  605.  
  606. supexec     MACRO        1\where
  607.     move.l    \1,-(sp)
  608.     xbios    #38,#6
  609.     ENDM
  610.  
  611. puntaes    MACRO
  612.     xbios    #39,#2
  613.     ENDM
  614.  
  615. ;floprate
  616.  
  617. ;dmaread
  618.  
  619. ;dmawrite
  620.  
  621. ;bconmap
  622.  
  623. ;nvmaccess
  624.  
  625. ;blitmode
  626.  
  627. ;esetshift
  628.  
  629. ;egetshift
  630.  
  631. ;esetbank
  632.  
  633. ;esetcolor
  634.  
  635. ;esetpalette
  636.  
  637. ;egetpalette
  638.  
  639. ;esetgray
  640.  
  641. ;esetsmear
  642.  
  643.