home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct RexxSysBase * RexxSysBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME RexxSysBase
- #endif
- #ifdef PRIVATE
- #endif
- __inline static UBYTE* CreateArgstring(BASE_PAR_DECL UBYTE* string, long unsigned int length)
- {
- BASE_EXT_DECL
- register UBYTE* res __asm("d0");
- register void *a6 __asm ("a6");
- register UBYTE* a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = string;
- d0 = length;
- __asm volatile ("
- jsr a6@(-0x7e)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void DeleteArgstring(BASE_PAR_DECL UBYTE* argstring)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register UBYTE* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = argstring;
- __asm volatile ("
- jsr a6@(-0x84)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static ULONG LengthArgstring(BASE_PAR_DECL UBYTE* argstring)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register UBYTE* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = argstring;
- __asm volatile ("
- jsr a6@(-0x8a)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static struct RexxMsg* CreateRexxMsg(BASE_PAR_DECL struct MsgPort* port, UBYTE* extension, UBYTE* host)
- {
- BASE_EXT_DECL
- register struct RexxMsg* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct MsgPort* a0 __asm("a0");
- register UBYTE* a1 __asm("a1");
- register UBYTE* d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = port;
- a1 = extension;
- d0 = host;
- __asm volatile ("
- jsr a6@(-0x90)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void DeleteRexxMsg(BASE_PAR_DECL struct RexxMsg* packet)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct RexxMsg* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = packet;
- __asm volatile ("
- jsr a6@(-0x96)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void ClearRexxMsg(BASE_PAR_DECL struct RexxMsg* msgptr, long unsigned int count)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct RexxMsg* a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = msgptr;
- d0 = count;
- __asm volatile ("
- jsr a6@(-0x9c)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static BOOL FillRexxMsg(BASE_PAR_DECL struct RexxMsg* msgptr, long unsigned int count, long unsigned int mask)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register struct RexxMsg* a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- a0 = msgptr;
- d0 = count;
- d1 = mask;
- __asm volatile ("
- jsr a6@(-0xa2)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static BOOL IsRexxMsg(BASE_PAR_DECL struct RexxMsg* msgptr)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register struct RexxMsg* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = msgptr;
- __asm volatile ("
- jsr a6@(-0xa8)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- #ifdef PRIVATE
- #endif
- __inline static void LockRexxBase(BASE_PAR_DECL long unsigned int resource)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = resource;
- __asm volatile ("
- jsr a6@(-0x1c2)"
- : /* no output */
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void UnlockRexxBase(BASE_PAR_DECL long unsigned int resource)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = resource;
- __asm volatile ("
- jsr a6@(-0x1c8)"
- : /* no output */
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-