home *** CD-ROM | disk | FTP | other *** search
- * === rexxbind.asm =====================================================
- *
- * Copyright (c) 1986, 1987 by William S. Hawes (All Rights Reserved)
- *
- * ======================================================================
- * "Glue" routines for calling functions in the ARexx Systems Library.
- * All calls assume that the external _RexxSysBase has been set to the
- * ARexx SYstems library base by a call to OpenLibrary.
-
- INCLUDE "rexx/storage.i"
- INCLUDE "rexx/rxslib.i"
-
- XREF _RexxSysBase
-
- * First calling convention:
- * 1, 2, or 3 parameters in (A0,A1,D0), return value in D0.
-
- ; msgptr = CreateRexxMsg(&replyport,&fileext,&hostname)
-
- XDEF _CreateRexxMsg
- _CreateRexxMsg:
- move.w #_LVOCreateRexxMsg,d1
- bra.s CallSeq1
-
-
- ; DeleteArgstring(argptr)
-
- XDEF _DeleteArgstring
- _DeleteArgstring:
- move.w #_LVODeleteArgstring,d1
- bra.s CallSeq1
-
-
- ; DeleteRexxMsg(msgptr)
-
- XDEF _DeleteRexxMsg
- _DeleteRexxMsg:
- move.w #_LVODeleteRexxMsg,d1
- bra.s CallSeq1
-
-
- ; FreePort(&msgport)
-
- XDEF _FreePort
- _FreePort:
- move.w #_LVOFreePort,d1
- bra.s CallSeq1
-
-
- ; signal = InitPort(&replyport)
-
- XDEF _InitPort
- _InitPort:
- move.w #_LVOInitPort,d1
- bra.s CallSeq1
-
-
- ; boolean = IsRexxMsg(msgptr)
-
- XDEF _IsRexxMsg
- _IsRexxMsg:
- move.w #_LVOIsRexxMsg,d1
- bra.s CallSeq1
-
-
- ; Load three arguments into (A0,A1,D0)
-
- CallSeq1 movea.l 4(sp),a0
- movea.l 8(sp),a1
- move.l 12(sp),d0
-
-
- ; Call the library function
-
- CallFunc move.l a6,-(sp)
- movea.l _RexxSysBase,a6
- jsr 0(a6,d1.w)
- movea.l (sp)+,a6
- rts
-
-
- * Second calling convention: 2 parameters in (A0,D0), return value in D0.
-
- ; argptr = CreateArgstring(&string,length)
-
- XDEF _CreateArgstring
- _CreateArgstring:
- moveq #_LVOCreateArgstring,d1
- bra.s CallSeq2
-
-
- ; ClearMem(address,length)
-
- XDEF _ClearMem
- _ClearMem:
- move.w #_LVOClearMem,d1
- bra.s CallSeq2
-
-
- ; Load two arguments (A0,D0)
-
- CallSeq2 movea.l 4(sp),a0
- move.l 8(sp),d0
- bra CallFunc
-
- END
-
-