home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / achlib / achslib.s < prev    next >
Encoding:
Text File  |  1988-03-22  |  17.5 KB  |  741 lines

  1. ;*** achslib.s
  2. ;
  3. ;    880103
  4.  
  5. ;*** ASCII Code Equates
  6.  
  7. BS        ==        $08
  8. HT        ==        $09
  9. LF        ==        $0a
  10. VT        ==        $0b
  11. FF        ==        $0c
  12. CR        ==        $0d
  13. ZEOF      ==        $1a
  14. ESC       ==        $1b
  15. SPACE     ==        $20
  16.  
  17. ;*** Atari ST Key Equates
  18.  
  19. ;    Shift Bits
  20. KRSHIFT   ==        $01
  21. KLSHIFT   ==        $02
  22. KCTRL     ==        $04
  23. KALT      ==        $08
  24. KCAPS     ==        $10
  25. KRMOUSE   ==        $20
  26. KLMOUSE   ==        $40
  27.  
  28. ;    Function Keys
  29. KF1       ==        $003b0000
  30. KF2       ==        $003c0000
  31. KF3       ==        $003d0000
  32. KF4       ==        $003e0000
  33. KF5       ==        $003f0000
  34. KF6       ==        $00400000
  35. KF7       ==        $00410000
  36. KF8       ==        $00420000
  37. KF9       ==        $00430000
  38. KF10      ==        $00440000
  39.  
  40. KESC      ==        $0001001b
  41. KRETURN   ==        $001c000d
  42. KENTER    ==        $0072000d
  43. KBS       ==        $000e0008
  44. KDEL      ==        $0053007f
  45.  
  46. KCTLDEL   ==        $0053001f
  47. KCTLLEFT  ==        $00730000
  48. KCTLRIGHT ==        $00740000
  49.  
  50. KHOME     ==        $00470000
  51. KUP       ==        $00480000          
  52. KLEFT     ==        $004b0000
  53. KRIGHT    ==        $004d0000
  54. KDOWN     ==        $00500000
  55. KTAB      ==        $000f0009
  56.  
  57. KINSERT   ==        $00520000
  58. KUNDO     ==        $00610000
  59. KHELP     ==        $00620000
  60.  
  61. ;*** GEMDOS Equates
  62.  
  63. CCONIN    ==        1    ; standard console in       
  64. CCONOUT   ==        2    ; standard console out
  65. CAUXIN    ==        3    ; auxilary in
  66. CAUXOUT   ==        4    ; auxilary out
  67. CPRNOUT   ==        5    ; standard printer out
  68. CRAWIO    ==        6    ; Raw I/O to standard I/O
  69. CRAWIN    ==        7    ; Raw console in, no echo, no ctrl interpret
  70. CNECIN    ==        8    ; Raw console in, no echo, ctrl interpreted
  71. CCONWS    ==        9    ; write NULL terminated string to standard output 
  72. CCONRS    ==        10   ; read edited string from standard input   
  73. CCONIS    ==        11   ; check status of standard input
  74.  
  75.  
  76. ;*** Atari System Variables
  77. ;
  78. ;    NOTE: must be in Supervisor mode to modify.
  79.  
  80. _DEFRES   ==        $44a      ; default monitor resolution
  81. _MONITOR  ==        $44c      ; monitor type
  82. _CONTERM  ==        $484      ; attributes for the console system
  83.  
  84.  
  85. ;*** Terminal Definition Area
  86.  
  87.           .data
  88.           .even
  89. _TERM::
  90. bell:     .dc.b     7,0            ; bell code string
  91.           .dc.b     0,0,0,0,0,0
  92.  
  93. tset:     .dc.b     0,0,0,0,0,0,0,0     ; terminal init
  94.  
  95. trst:     .dc.b     0,0,0,0,0,0,0,0     ;terminal de-init
  96.                      
  97. curhome:  .dc.b     ESC,'H',0      ; cursor home
  98.           .dc.b     0,0,0,0,0
  99.  
  100. clrscr:   .dc.b     ESC,'E',0      ; clear screen
  101.           .dc.b     0,0,0,0,0
  102.  
  103. clreol:   .dc.b     ESC,'K',0      ; clear to EOL
  104.           .dc.b     0,0,0,0,0
  105.  
  106. clreop:   .dc.b     ESC,'J',0      ; clear to EOP
  107.           .dc.b     0,0,0,0,0
  108.  
  109. curon:    .dc.b     ESC,'e',0      ; cursor on
  110.           .dc.b     0,0,0,0,0
  111.  
  112. curoff:   .dc.b     ESC,'f',0      ; cursor off
  113.           .dc.b     0,0,0,0,0
  114.  
  115. hilite:   .dc.b     ESC,'p',0      ; inverse on
  116.           .dc.b     0,0,0,0,0
  117.  
  118. lolite:   .dc.b     ESC,'q',0      ; inverse off
  119.           .dc.b     0,0,0,0,0
  120.  
  121. insline:  .dc.b     ESC,'L',0      ; insert line
  122.           .dc.b     0,0,0,0,0
  123.  
  124. delline:  .dc.b     ESC,'M',0      ; delete line
  125.           .dc.b     0,0,0,0,0
  126.  
  127. curup:    .dc.b     ESC,'A',0      ; cursor up
  128.           .dc.b     0,0,0,0,0
  129.  
  130. curdn:    .dc.b     ESC,'B',0      ; cursor down
  131.           .dc.b     0,0,0,0,0
  132.  
  133. currt:    .dc.b     ESC,'C',0      ; cursor right
  134.           .dc.b     0,0,0,0,0
  135.  
  136. curlt:    .dc.b     ESC,'D',0      ; cursor left
  137.           .dc.b     0,0,0,0,0
  138.  
  139.  
  140.  
  141. ;*** GotoXY for VT-52 terminal
  142. ;
  143. ; e  short X coord
  144. ;    short Y coord
  145. ;
  146. ; x  none
  147. ;
  148. ;    Position cursor at .text coords (X,Y).
  149.  
  150.           .data
  151.           .even
  152.      
  153. curaddr:  .dc.b     ESC,'Y',0      ; cursor addressing lead in
  154.           .dcb.b    5,0
  155.  
  156. cursep:   .dcb.b    8,0            ; cursor coord separator
  157.  
  158. curend:   .dcb.b    8,0            ; cursor addressing terminate
  159.  
  160. _XMAX::   .dc.w     80             ; max number of columns
  161. _YMAX::   .dc.w     25             ; max number of rows
  162. xoff:     .dc.w     32             ; x offset for columns
  163. yoff:     .dc.w     32             ; y offset for rows
  164.  
  165. _TABLEN:: .dc.w     4              ; tab length to use
  166. rows:     .dc.b     1              ; true if rows sent first
  167. binary:   .dc.b     1              ; true if .data sent in binary 
  168.      
  169.           .text
  170. _GOTOXY:: 
  171.           link      a6,#0
  172.           movea.l   #curaddr,a0    ; pnt to cursor addressing string
  173.           move.l    a0,-(sp)       ; put on stack
  174.           move.w    #CCONWS,-(sp)  ; send string to terminal
  175.           trap      #1             ;   do GEMDOS call
  176.           addq.l    #6,sp          ; correct stack
  177.  
  178.           move.w    _YMAX,d1       ; point to ymax value
  179.           move.w    10(a6),d0      ; get y argument
  180.           bsr.s     GOTOXY1
  181.  
  182.           move.w    _XMAX,d1       ; point to xmax value
  183.           move.w    8(a6),d0       ; get x argument
  184.           bsr.s     GOTOXY1
  185.           unlk      a6
  186.           rts
  187. GOTOXY1:
  188.           ext.l     d0
  189.           divu      d1,d0
  190.           swap      d0             ; q = q mod max
  191.           addi.w    #32,d0         ; q = q + offset
  192.  
  193.           move.w    d0,-(sp)
  194.           move.w    #CCONOUT,-(sp)
  195.           trap      #1
  196.           addq.l    #4,sp
  197.           rts
  198.  
  199.  
  200.  
  201. ;*** Move Memory
  202. ;
  203. ; e  long source pointer to char
  204. ;    long target pointer to char
  205. ;    long length of source
  206. ;
  207. ; x  none
  208. ;
  209. ;    Move a block of Length from Source to Target.
  210.  
  211.           .text 
  212.           .globl    _MOVEMEM
  213. _MOVEMEM:
  214.           movea.l   4(sp),a0       ; get source
  215.           movea.l   8(sp),a1       ; get target
  216.           move.l    12(sp),d0      ; get length
  217.           beq.s     MOVEMX         ; exit if length is zero 
  218.           cmpa.l    a1,a0          ; check  for s < t
  219.           blt.s     MOVEMT         ; move tail first
  220. MOVEMH:   
  221.           move.b    (a0)+,(a1)+    ; move source byte to target
  222.           subq.l    #1,d0          ; decrement length
  223.           bne       MOVEMH         ; loop till zero
  224.           bra.s     MOVEMX
  225. MOVEMT:
  226.           adda.l    d0,a0          ; do tail first
  227.           adda.l    d0,a1
  228. MOVEMTT:
  229.           move.b    -(a0),-(a1)
  230.           subq.l    #1,d0
  231.           bne       MOVEMTT
  232. MOVEMX:
  233.           rts
  234.           
  235.  
  236.  
  237. ;***String N Put
  238. ;
  239. ; e  long pointer to string
  240. ;    short n
  241. ;
  242. ; x  none 
  243. ;
  244. ;    Print n characters of a string
  245.  
  246.           .text
  247. _STRNPUT::
  248.           link      a6,#0
  249.           movem.l   d3/a3, -(sp)
  250.           movea.l   8(a6), a3
  251.           adda.w    12(a6), a3
  252.           cmpa.l    8(a6), a3
  253.           beq.s     STRNPUT1
  254.           move.b    (a3), d3
  255.           clr.b     (a3)
  256. STRNPUT1:
  257.           move.l    8(a6), -(sp)
  258.           move.w    #CCONWS, -(sp)
  259.           trap      #1
  260.           addq.l    #6, sp
  261.           cmpa.l    8(a6), a3
  262.           beq.s     STRNPUT2
  263.           move.b    d3, (a3)
  264. STRNPUT2:
  265.           movem.l   (sp)+, d3/a3
  266.           unlk      a6
  267.           rts
  268.  
  269.  
  270.  
  271. ;*** String N Copy
  272. ;
  273. ; e  long pointer source string
  274. ;    long pointer target string
  275. ;    short count
  276. ;
  277. ; x  none
  278. ;
  279. ;    Copy max n bytes of string 1 to string 2.
  280. ;    String 2 is NULL terminated.
  281.  
  282.           .text
  283. _STRNCPY::      
  284.           movea.l   4(sp),a0            ; get source
  285.           movea.l   8(sp),a1            ; get target
  286.           move.w    12(sp),d0           ; get count
  287.           beq.s     .X                  ; count = 0?
  288. .1:
  289.           tst.b     (a0)                ; EOS on s1
  290.           beq.s     .X
  291.           move.b    (a0)+,(a1)+         ; copy char s1 to s2
  292.           subq.w    #1,d0               ; --count
  293.           bne       .1                  ; if count not zero
  294. .X:
  295.           clr.b     (a1)
  296.           rts
  297.  
  298.  
  299.  
  300. ;*** String Concatination
  301. ;
  302. ; e  long pointer to string 1
  303. ;    long pointer to string 2
  304. ; x  none
  305. ;
  306. ;    Append string two to the end of one.
  307.  
  308.           .text
  309. _STRCAT::
  310.           move.l    4(sp),a0
  311. .1:
  312.           tst.b     (a0)+
  313.           bne       .1
  314.           subq.l    #1,a0
  315.           movea.l   8(sp),a1
  316. .2:
  317.           move.b    (a1)+,(a0)+
  318.           bne       .2
  319.           rts
  320.  
  321.  
  322. ;*** Length of NULL terminated string
  323. ;
  324. ; e  long pointer to string
  325. ;
  326. ; x  D0.L = length of string up to NULL (but not including)
  327.  
  328.           .text
  329. _STRLEN::
  330.           moveq.l   #-1,d0
  331.           movea.l   4(sp),a0
  332. .1:
  333.           addq.l    #1,d0
  334.           tst.b     (a0)+
  335.           bne       .1
  336.           rts
  337.  
  338.  
  339.  
  340.  
  341. ;*** Find next token in string.
  342. ;
  343. ; e  long pointer to string / NULL to continue with last string
  344. ;    long pointer to delimeter string / NULL use default delimeters
  345. ;
  346. ; x  long pointer to start of token / NULL if no tokens left
  347. ;
  348. ;    Note: a) original string will be modified.
  349. ;          b) leading spaces are skipped.
  350.  
  351.           .data
  352. DEFDELIM: .dc.b     SPACE, ',', 0
  353.  
  354.           .bss
  355. _NEXTTOK::
  356.           .ds.l     1
  357.  
  358.           .text
  359. _STRTOK::
  360.           move.l    4(sp), d0           ;get string
  361.           bne.s     .1                  ;if NULL then
  362.           move.l    _NEXTTOK, d0        ; continue with previous
  363.           beq.s     .X                  ; string, return NULL if EOS
  364. .1:
  365.           movea.l   d0, a0
  366. .2:
  367.           cmpi.b    #SPACE, (a0)+       ;skip leading spaces
  368.           beq       .2
  369.           subq.l    #1, a0
  370.           move.l    a0, d0              ;start of token to return
  371.           move.l    8(sp), d1           ;get delimeter string
  372.           bne.s     .3                  ;if NULL then use default
  373.           move.l    #DEFDELIM, d1
  374. .3:
  375.           movea.l   d1, a1              ;reset delimeter string
  376.           move.b    (a0)+, d2           ;get char in token
  377. .4:
  378.           cmp.b     (a1), d2            ;check against delims
  379.           beq.s     .5
  380.           tst.b     (a1)+   
  381.           bne       .4                  ;end of delim string?
  382.           bra       .3
  383. .5:
  384.           clr.b     -1(a0)              ;terminate token at delim
  385.           tst.b     d2                  ;was it end of search string
  386.           bne.s     .6
  387.           suba.l    a0, a0              ;save NULL for next search
  388. .6:
  389.           move.l    a0, _NEXTTOK        ;remember current position
  390. .X:
  391.           rts
  392.  
  393.  
  394. ;*** Find index of character in string
  395. ;
  396. ; e  long pointer to string
  397. ;    word character value
  398. ;
  399. ; x  D0.L = index into string if character is found else -1
  400.  
  401.           .text
  402. _FINDI::   
  403.           move.l    4(sp),a0       ;pointer to string
  404.           moveq.l   #-1, d0
  405.           move.w    8(sp),d1       ;character
  406. .1:
  407.           tst.b     (a0)           ;EOS?
  408.           beq.s     .X
  409.           cmp.b     (a0)+, d1      ;check character
  410.           bne       .1
  411.           move.l    a0, d0
  412.           sub.l     4(sp), d0      ;current - original
  413.           subq.l    #1, d0         ;adjust overrun -1
  414. .X:
  415.           rts
  416.  
  417.  
  418. ;*** Find index of last occurence of character in string
  419. ;
  420. ; e  long pointer to string
  421. ;    word character value
  422. ;
  423. ; x  D0.L = index into string if character is found else -1
  424.  
  425.           .text
  426. _LFINDI::
  427.           movea.l   4(sp), a0
  428.           moveq.l   #-1, d0
  429.           move.w    8(sp), d1
  430.           bra.s     .2
  431. .1:
  432.           cmp.b     (a0)+, d1
  433.           bne.s     .2
  434.           move.l    a0, d0
  435.           sub.l     4(sp), d0
  436.           subq.l    #1, d0
  437. .2:
  438.           tst.b     (a0)
  439.           bne       .1
  440.           rts
  441.  
  442.  
  443. ;*** Deque Rouitines
  444.  
  445. ;*** Make Deque
  446. ;
  447. ; e  long      # of long words for deque
  448. ;
  449. ; x  D0.L =    ptr to deque structure / NULL unsuccessful
  450.  
  451.           .text
  452. _MKDEQ::
  453.           link      a6, #0
  454.           movem.l   a3-a4, -(sp)
  455.           move.l    8(a6), d1
  456.           lsl.l     #2, d1
  457.           addi.l    #16, d1
  458.           move.l    d1, -(sp)
  459.           move.w    #$48, -(sp)
  460.           trap      #1
  461.           addq.l    #6, sp
  462.           tst.l     d0
  463.           beq.s     .X
  464.           movea.l   d0, a0
  465.           movea.l   d0, a1
  466.           adda.l    #16, a1             ;base of deque
  467.           movea.l   a1, a2              ;left pointer
  468.           movea.l   a1, a3              ;right pointer
  469.           movea.l   a1, a4              
  470.           adda.l    d1, a4              ;end of deque +1
  471.           movem.l   a1-a4, (a0)         ;save deque structure
  472. .X:
  473.           movem.l   (sp), a3-a4
  474.           unlk      a6
  475.           rts     
  476.  
  477.  
  478. ;*** Remove Deque
  479. ;
  480. ; e  long      ptr to deque structure
  481. ;
  482. ; x  D0.W =    NULL for success / error code
  483.  
  484.           .text
  485. _RMDEQ::
  486.           move.l    4(sp), -(sp)
  487.           move.w    #$49, -(sp)
  488.           trap      #1
  489.           addq.l    #6, sp
  490.           rts
  491.  
  492.  
  493. ;*** Add an element to deque
  494. ;
  495. ; e  long      ptr to deque structure
  496. ;    word      0 left / 1 right 
  497. ;    long      value to store
  498.  
  499.           .text
  500. _DEQADD::
  501.           link      a6, #0
  502.           movem.l   a3-a4, -(sp)
  503.           movea.l   8(a6), a0           ;ptr to deque structure
  504.           movem.l   (a0), a1-a4         ;fetch deque structure
  505.           move.l    14(a6), d0          ;value
  506.           move.w    12(a6), d1          ;if adding to the right
  507.           bne.s     .2
  508.           cmpa.l    a1, a2
  509.           bhi.s     .1                  ;if begin < left then
  510.           movea.l   a4, a2              ;wrap deque to end
  511. .1:
  512.           move.l    d0, -(a2)           ;save value
  513.           bra.s     .X
  514. .2:
  515.           move.l    d0, (a3)+           ;save value
  516.           cmpa.l    a3, a4              ;if right < end then
  517.           bhi.s     .X
  518.           movea.l   a1, a3              ;wrap deque to beginning
  519. .X:
  520.           movem.l   a1-a4, (a0)         ;update deque structure
  521.           movem.l   (sp), a3-a4
  522.           unlk      a6
  523.           rts
  524.  
  525.  
  526. ;*** Delete value from deque
  527. ;
  528. ; e  long      ptr to deque structure
  529. ;    word      0 left / 1 right
  530. ;
  531. ; x  D0.L      value
  532.  
  533.           .text
  534. _DEQDEL::
  535.           link      a6, #0
  536.           movem.l   a3-a4, -(sp)
  537.           movea.l   8(a6), a0
  538.           movem.l   (a0), a1-a4
  539.           move.w    12(a6), d1
  540.           bne.s     .1
  541.           move.l    (a2)+, d0           ;get value
  542.           cmpa.l    a2, a4              ;if left < end then
  543.           bhi.s     .X
  544.           movea.l   a1, a2              ;wrap deque to beginning
  545.           bra.s     .X
  546. .1:
  547.           cmpa.l    a1, a3              ;if begin < right then
  548.           bhi.s     .2
  549.           movea.l   a4, a3              ;wrap deque to end
  550. .2:
  551.           move.l    -(a3), d0           ;get value
  552. .X:
  553.           movem.l   a1-a4, (a0)         ;update deque structure
  554.           movem.l   (sp), a3-a4
  555.           unlk      a6
  556.           rts
  557.           
  558.  
  559.           .globl    _PUTDEC
  560.           .globl    PUTDEC
  561.  
  562. ;*** Print Unsigned Decimal (0-65535)
  563. ;
  564. ; _PUTDEC      e    word value
  565. ; PUTDEC       e    D0.W value
  566. ;              x    none
  567.  
  568.           .text
  569. _PUTDEC:
  570.           move.w    4(sp),d0
  571. PUTDEC:          
  572.           ext.l     d0
  573.           divu      #10,d0
  574.           beq.s     PUTDEC1
  575.           move.l    d0,-(sp)
  576.           bsr       PUTDEC
  577.           move.l    (sp)+,d0
  578. PUTDEC1:
  579.           swap      d0
  580.           addi.w    #$30,d0
  581.           move.w    d0,-(sp)
  582.           move.w    #CCONOUT,-(sp)
  583.           trap      #1
  584.           addq.l    #4,sp
  585.           rts
  586.  
  587.             
  588. ;*** Print Unsigned Decimal
  589. ;
  590. ; _PUTLONG     e    long value
  591. ; PUTLONG      e    D0.L value
  592. ;              x    none
  593.  
  594.           .text
  595. _PUTLONG::
  596.           move.l    4(sp),d0
  597. PUTLONG::        
  598.           move.l    #10, -(sp)
  599.           move.l    d0, -(sp)
  600.           bsr.s     _ULD
  601.           addq.l    #8, sp
  602.           tst.l     d0
  603.           beq.s     .1
  604.           movem.l   d0-d1,-(sp)
  605.           bsr       PUTLONG
  606.           movem.l   (sp)+, d0-d1
  607. .1:
  608.           addi.w    #$30, d1
  609.           move.w    d1,-(sp)
  610.           move.w    #CCONOUT,-(sp)
  611.           trap      #1
  612.           addq.l    #4,sp
  613.           rts
  614.  
  615.  
  616.  
  617. ;*** Unsigned Long to ASCII
  618. ;
  619. ; e  long value
  620. ;    long pointer to string buffer
  621. ;
  622. ; x  ASCIIZ string in buffer
  623.  
  624.           .text
  625. _ULTOA::
  626.           move.l    4(sp),d0
  627.           movea.l   8(sp), a0
  628. ULTOA::
  629.           move.l    #10, -(sp)
  630.           move.l    d0, -(sp)
  631.           bsr.s     _ULD
  632.           addq.l    #8, sp
  633.           tst.l     d0
  634.           beq.s     .1
  635.           movem.l   d0-d1,-(sp)
  636.           bsr       ULTOA
  637.           movem.l   (sp)+, d0-d1
  638. .1:
  639.           addi.w    #$30, d1
  640.           move.b    d1, (a0)+
  641.           clr.b     (a0)   
  642.           rts
  643.  
  644.             
  645. ;*** Unsigned long division
  646. ;
  647. ; e  long dividend
  648. ;    long divisor
  649. ;
  650. ; x  D0.L = quoitent
  651. ;    D1.L = remainder
  652.           
  653.           .text
  654. _ULD::
  655.           move.l    4(sp), d0           ;dividend
  656.           move.l    8(sp), d2           ;divisor
  657.           move.w    d3, -(sp)
  658.           move.w    #31, d3             ;bit count
  659.           clr.l     d1                  ;remainder
  660. .1:
  661.           add.l     d0, d0
  662.           addx.l    d1, d1
  663.           sub.l     d2, d1
  664.           bcc.s     .2
  665.           add.l     d2, d1
  666.           bra.s     .3
  667. .2:
  668.           addq.l    #1, d0
  669. .3:
  670.           dbf       d3, .1
  671.           move.w    (sp)+, d3
  672.           rts
  673.  
  674.  
  675.           .globl    _DOS
  676.           .globl    ___BDOS
  677.  
  678. ;*** DOS Function Call (CP/M-68k)
  679. ;
  680. ; e  word function number
  681. ;    long parameter
  682. ;
  683. ; x  D0.L = returned value
  684.      
  685.           .text
  686. _DOS:
  687. ___BDOS:
  688.           move.w    4(sp),d0       ; get function number
  689.           move.l    8(sp),d1       ; get parameter
  690.           trap      #2             ; call DOS
  691.           rts      
  692.      
  693.  
  694.           .globl    _gemdos
  695.  
  696. ;*** GEM Dos Function Call
  697. ;
  698. ; e  word function number
  699. ;    word / long parameters
  700. ;
  701. ; x  D0 = return value if any
  702. ;
  703. ;    See GEM Dos notes
  704.      
  705.           .text
  706. _gemdos:
  707.           move.l    (sp)+, GEMRET
  708.           trap      #1
  709.           move.l    GEMRET, -(sp)
  710.           rts
  711.  
  712.           .bss
  713. GEMRET:   .ds.l     1
  714.  
  715.  
  716.  
  717.           .globl    _xbios
  718.  
  719. ;*** XBIOS Function Call
  720. ;
  721. ; e  word function number
  722. ;    word / long parameters
  723. ;
  724. ; x  D0 = return value if any
  725. ;
  726. ;    See XBIOS notes
  727.      
  728.           .text
  729. _xbios:
  730.           move.l    (sp)+, XBRET
  731.           trap      #14
  732.           move.l    XBRET, -(sp)
  733.           rts
  734.  
  735.           .bss
  736. XBRET:    .ds.l     1
  737.  
  738.  
  739.  
  740.