home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / rexxlib_393.lzh / RexxLib / C_Example / RexxInterface.asm < prev    next >
Assembly Source File  |  1990-10-28  |  1KB  |  79 lines

  1.     SECTION    rxcode,CODE
  2.     XREF    _RexxBase
  3.  
  4. _LVOSetRexxPort        equ    -30
  5. _LVOReceiveRexx        equ    -36
  6. _LVOFreeRexxPort    equ    -42
  7. _LVOSendRexxCmd        equ    -48
  8. _LVOASyncRexxCmd    equ    -54
  9. _LVOSyncRexxCmd        equ    -60
  10. _LVOSetupResults    equ    -66
  11.  
  12.     XDEF    _SetRexxPort
  13. _SetRexxPort:
  14.     movea.l    _RexxBase,a6
  15.     move.l    a5,-(sp)
  16.     movem.l    8(sp),a1/a5
  17.     jsr    _LVOSetRexxPort(a6)
  18.     movea.l    (sp)+,a5
  19.     rts
  20.  
  21.     XDEF    _FreeRexxPort
  22. _FreeRexxPort:
  23.     movea.l    _RexxBase,a6
  24.     move.l    a5,-(sp)
  25.     movea.l    8(sp),a5
  26.     jsr    _LVOFreeRexxPort(a6)
  27.     movea.l    (sp)+,a5
  28.     rts
  29.  
  30.     XDEF    _SetupResults
  31. _SetupResults:
  32.     movea.l    _RexxBase,a6
  33.     move.l    a5,-(sp)
  34.     movem.l    8(sp),d0/d1/a0/a1/a5
  35.     jsr    _LVOSetupResults(a6)
  36.     movea.l    (sp)+,a5
  37.     rts
  38.  
  39.     XDEF    _SendRexxCmd
  40. _SendRexxCmd:
  41.     movea.l    _RexxBase,a6
  42.     movem.l    a2/a5,-(sp)
  43.     movem.l    12(sp),d0/d1/a0/a1/a2/a5
  44.     jsr    _LVOSendRexxCmd(a6)
  45. dcmd    movem.l    (sp)+,a2/a5
  46. DCM    move.l    a0,_RexxErrMsg    ;store the returned msg (in case of error)
  47.     rts
  48.  
  49.     XDEF    _ASyncRexxCmd
  50. _ASyncRexxCmd:
  51.     movea.l    _RexxBase,a6
  52.     move.l    a5,-(sp)
  53.     movem.l    8(sp),a0/a5
  54.     jsr    _LVOASyncRexxCmd(a6)
  55.     movea.l    (sp)+,a5
  56.     bra.s    DCM
  57.  
  58.     XDEF    _SyncRexxCmd
  59. _SyncRexxCmd:
  60.     movea.l    _RexxBase,a6
  61.     movem.l    a2/a5,-(sp)
  62.     movem.l    12(sp),a0/a2/a5
  63.     jsr    _LVOSyncRexxCmd(a6)
  64.     bra.s    dcmd
  65.  
  66.     XDEF    _ReceiveRexx
  67. _ReceiveRexx:
  68.     movea.l    _RexxBase,a6
  69.     move.l    a5,-(sp)
  70.     movea.l    8(sp),a5
  71.     jsr    _LVOReceiveRexx(a6)
  72.     movea.l    (sp)+,a5
  73.     rts
  74.  
  75.     SECTION    rxerr,DATA
  76.  
  77.     XDEF    _RexxErrMsg
  78. _RexxErrMsg    dc.l    0
  79.