home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct Device * ConsoleDevice;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME ConsoleDevice
- #endif
- __inline static struct InputEvent* CDInputHandler(BASE_PAR_DECL struct InputEvent* events, struct Library* consoleDevice)
- {
- BASE_EXT_DECL
- register struct InputEvent* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct InputEvent* a0 __asm("a0");
- register struct Library* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = events;
- a1 = consoleDevice;
- __asm volatile ("
- jsr a6@(-0x2a)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG RawKeyConvert(BASE_PAR_DECL struct InputEvent* events, STRPTR buffer, long int length, struct KeyMap* keyMap)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct InputEvent* a0 __asm("a0");
- register STRPTR a1 __asm("a1");
- register long int d1 __asm("d1");
- register struct KeyMap* a2 __asm("a2");
-
- a6 = BASE_NAME;
- a0 = events;
- a1 = buffer;
- d1 = length;
- a2 = keyMap;
- __asm volatile ("
- jsr a6@(-0x30)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1), "g" (d1), "g" (a2)
- : "d0", "d1", "a0", "a1", "a2");
- return res;
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-