home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct Library * PotgoBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME PotgoBase
- #endif
- __inline static UWORD AllocPotBits(BASE_PAR_DECL long unsigned int bits)
- {
- BASE_EXT_DECL
- register UWORD res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = bits;
- __asm volatile ("
- jsr a6@(-0x6)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void FreePotBits(BASE_PAR_DECL long unsigned int bits)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = bits;
- __asm volatile ("
- jsr a6@(-0xc)"
- : /* no output */
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void WritePotgo(BASE_PAR_DECL long unsigned int word, long unsigned int mask)
- {
- 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 = word;
- d1 = mask;
- __asm volatile ("
- jsr a6@(-0x12)"
- : /* no output */
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-