home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct DiskBase * DiskBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME DiskBase
- #endif
- __inline static BOOL AllocUnit(BASE_PAR_DECL long int unitNum)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = unitNum;
- __asm volatile ("
- jsr a6@(-0x6)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void FreeUnit(BASE_PAR_DECL long int unitNum)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = unitNum;
- __asm volatile ("
- jsr a6@(-0xc)"
- : /* no output */
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static struct DiskResourceUnit* GetUnit(BASE_PAR_DECL struct DiskResourceUnit* unitPointer)
- {
- BASE_EXT_DECL
- register struct DiskResourceUnit* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct DiskResourceUnit* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a1 = unitPointer;
- __asm volatile ("
- jsr a6@(-0x12)"
- : "=g" (res)
- : "g" (a6), "g" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void GiveUnit(BASE_PAR_DECL0)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- a6 = BASE_NAME;
- __asm volatile ("
- jsr a6@(-0x18)"
- : /* no output */
- : "g" (a6)
- : "d0", "d1", "a0", "a1");
- }
- __inline static LONG GetUnitID(BASE_PAR_DECL long int unitNum)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = unitNum;
- __asm volatile ("
- jsr a6@(-0x1e)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG ReadUnitID(BASE_PAR_DECL long int unitNum)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = unitNum;
- __asm volatile ("
- jsr a6@(-0x24)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-