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