home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct ExpansionBase * ExpansionBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME ExpansionBase
- #endif
- __inline static void AddConfigDev(BASE_PAR_DECL struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct ConfigDev* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = configDev;
- __asm volatile ("
- jsr a6@(-0x1e)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static BOOL AddBootNode(BASE_PAR_DECL long int bootPri, long unsigned int flags, struct DeviceNode* deviceNode, struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
- register struct DeviceNode* a0 __asm("a0");
- register struct ConfigDev* a1 __asm("a1");
-
- a6 = BASE_NAME;
- d0 = bootPri;
- d1 = flags;
- a0 = deviceNode;
- a1 = configDev;
- __asm volatile ("
- jsr a6@(-0x24)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void AllocBoardMem(BASE_PAR_DECL long unsigned int slotSpec)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = slotSpec;
- __asm volatile ("
- jsr a6@(-0x2a)"
- : /* no output */
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static struct ConfigDev* AllocConfigDev(BASE_PAR_DECL0)
- {
- BASE_EXT_DECL
- register struct ConfigDev* res __asm("d0");
- register void *a6 __asm ("a6");
- a6 = BASE_NAME;
- __asm volatile ("
- jsr a6@(-0x30)"
- : "=g" (res)
- : "g" (a6)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static APTR AllocExpansionMem(BASE_PAR_DECL long unsigned int numSlots, long unsigned int slotAlign)
- {
- BASE_EXT_DECL
- register APTR res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = numSlots;
- d1 = slotAlign;
- __asm volatile ("
- jsr a6@(-0x36)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void ConfigBoard(BASE_PAR_DECL APTR board, struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
- register struct ConfigDev* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = board;
- a1 = configDev;
- __asm volatile ("
- jsr a6@(-0x3c)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void ConfigChain(BASE_PAR_DECL APTR baseAddr)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = baseAddr;
- __asm volatile ("
- jsr a6@(-0x42)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static struct ConfigDev* FindConfigDev(BASE_PAR_DECL struct ConfigDev* oldConfigDev, long int manufacturer, long int product)
- {
- BASE_EXT_DECL
- register struct ConfigDev* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct ConfigDev* a0 __asm("a0");
- register long int d0 __asm("d0");
- register long int d1 __asm("d1");
-
- a6 = BASE_NAME;
- a0 = oldConfigDev;
- d0 = manufacturer;
- d1 = product;
- __asm volatile ("
- jsr a6@(-0x48)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void FreeBoardMem(BASE_PAR_DECL long unsigned int startSlot, long unsigned int slotSpec)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = startSlot;
- d1 = slotSpec;
- __asm volatile ("
- jsr a6@(-0x4e)"
- : /* no output */
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void FreeConfigDev(BASE_PAR_DECL struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct ConfigDev* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = configDev;
- __asm volatile ("
- jsr a6@(-0x54)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void FreeExpansionMem(BASE_PAR_DECL long unsigned int startSlot, long unsigned int numSlots)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = startSlot;
- d1 = numSlots;
- __asm volatile ("
- jsr a6@(-0x5a)"
- : /* no output */
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static UBYTE ReadExpansionByte(BASE_PAR_DECL APTR board, long unsigned int offset)
- {
- BASE_EXT_DECL
- register UBYTE res __asm("d0");
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = board;
- d0 = offset;
- __asm volatile ("
- jsr a6@(-0x60)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void ReadExpansionRom(BASE_PAR_DECL APTR board, struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
- register struct ConfigDev* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = board;
- a1 = configDev;
- __asm volatile ("
- jsr a6@(-0x66)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void RemConfigDev(BASE_PAR_DECL struct ConfigDev* configDev)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct ConfigDev* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = configDev;
- __asm volatile ("
- jsr a6@(-0x6c)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void WriteExpansionByte(BASE_PAR_DECL APTR board, long unsigned int offset, long unsigned int byte)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- a0 = board;
- d0 = offset;
- d1 = byte;
- __asm volatile ("
- jsr a6@(-0x72)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void ObtainConfigBinding(BASE_PAR_DECL0)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- a6 = BASE_NAME;
- __asm volatile ("
- jsr a6@(-0x78)"
- : /* no output */
- : "g" (a6)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void ReleaseConfigBinding(BASE_PAR_DECL0)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- a6 = BASE_NAME;
- __asm volatile ("
- jsr a6@(-0x7e)"
- : /* no output */
- : "g" (a6)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void SetCurrentBinding(BASE_PAR_DECL struct CurrentBinding* currentBinding, long unsigned int bindingSize)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct CurrentBinding* a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = currentBinding;
- d0 = bindingSize;
- __asm volatile ("
- jsr a6@(-0x84)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static ULONG GetCurrentBinding(BASE_PAR_DECL struct CurrentBinding* currentBinding, long unsigned int bindingSize)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct CurrentBinding* a0 __asm("a0");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = currentBinding;
- d0 = bindingSize;
- __asm volatile ("
- jsr a6@(-0x8a)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static struct DeviceNode* MakeDosNode(BASE_PAR_DECL APTR parmPacket)
- {
- BASE_EXT_DECL
- register struct DeviceNode* res __asm("d0");
- register void *a6 __asm ("a6");
- register APTR a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = parmPacket;
- __asm volatile ("
- jsr a6@(-0x90)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static BOOL AddDosNode(BASE_PAR_DECL long int bootPri, long unsigned int flags, struct DeviceNode* deviceNode)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
- register struct DeviceNode* a0 __asm("a0");
-
- a6 = BASE_NAME;
- d0 = bootPri;
- d1 = flags;
- a0 = deviceNode;
- __asm volatile ("
- jsr a6@(-0x96)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-