home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 100-199 / ff153.lzh / Dme / src / rexxbind.asm < prev    next >
Assembly Source File  |  1987-06-15  |  2KB  |  108 lines

  1. * === rexxbind.asm =====================================================
  2. *
  3. * Copyright (c) 1986, 1987 by William S. Hawes (All Rights Reserved)
  4. *
  5. * ======================================================================
  6. * "Glue" routines for calling functions in the ARexx Systems Library.
  7. * All calls assume that the external _RexxSysBase has been set to the
  8. * ARexx SYstems library base by a call to OpenLibrary.
  9.  
  10.          INCLUDE  "rexx/storage.i"
  11.          INCLUDE  "rexx/rxslib.i"
  12.  
  13.          XREF     _RexxSysBase
  14.  
  15. * First calling convention:
  16. * 1, 2, or 3 parameters in (A0,A1,D0), return value in D0.
  17.  
  18.          ; msgptr = CreateRexxMsg(&replyport,&fileext,&hostname)
  19.  
  20.          XDEF     _CreateRexxMsg
  21. _CreateRexxMsg:
  22.          move.w   #_LVOCreateRexxMsg,d1
  23.          bra.s    CallSeq1
  24.  
  25.  
  26.          ; DeleteArgstring(argptr)
  27.  
  28.          XDEF     _DeleteArgstring
  29. _DeleteArgstring:
  30.          move.w   #_LVODeleteArgstring,d1
  31.          bra.s    CallSeq1
  32.  
  33.  
  34.          ; DeleteRexxMsg(msgptr)
  35.  
  36.          XDEF     _DeleteRexxMsg
  37. _DeleteRexxMsg:
  38.          move.w   #_LVODeleteRexxMsg,d1
  39.          bra.s    CallSeq1
  40.  
  41.  
  42.          ; FreePort(&msgport)
  43.  
  44.          XDEF     _FreePort
  45. _FreePort:
  46.          move.w   #_LVOFreePort,d1
  47.          bra.s    CallSeq1
  48.  
  49.  
  50.          ; signal = InitPort(&replyport)
  51.  
  52.          XDEF     _InitPort
  53. _InitPort:
  54.          move.w   #_LVOInitPort,d1
  55.          bra.s    CallSeq1
  56.  
  57.  
  58.          ; boolean = IsRexxMsg(msgptr)
  59.  
  60.          XDEF     _IsRexxMsg
  61. _IsRexxMsg:
  62.          move.w   #_LVOIsRexxMsg,d1
  63.          bra.s    CallSeq1
  64.  
  65.  
  66.          ; Load three arguments into (A0,A1,D0)
  67.  
  68. CallSeq1 movea.l  4(sp),a0
  69.          movea.l  8(sp),a1
  70.          move.l   12(sp),d0
  71.  
  72.  
  73.          ; Call the library function
  74.  
  75. CallFunc move.l   a6,-(sp)
  76.          movea.l  _RexxSysBase,a6
  77.          jsr      0(a6,d1.w)
  78.          movea.l  (sp)+,a6
  79.          rts
  80.  
  81.  
  82. * Second calling convention:  2 parameters in (A0,D0), return value in D0.
  83.  
  84.          ; argptr = CreateArgstring(&string,length)
  85.  
  86.          XDEF     _CreateArgstring
  87. _CreateArgstring:
  88.          moveq    #_LVOCreateArgstring,d1
  89.          bra.s    CallSeq2
  90.  
  91.  
  92.          ; ClearMem(address,length)
  93.  
  94.          XDEF     _ClearMem
  95. _ClearMem:
  96.          move.w   #_LVOClearMem,d1
  97.          bra.s    CallSeq2
  98.  
  99.  
  100.          ; Load two arguments (A0,D0)
  101.  
  102. CallSeq2 movea.l  4(sp),a0
  103.          move.l   8(sp),d0
  104.          bra      CallFunc
  105.  
  106.          END
  107.  
  108.