home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct KeymapBase * KeymapBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME KeymapBase
- #endif
- __inline static void SetKeyMapDefault(BASE_PAR_DECL struct KeyMap* keyMap)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct KeyMap* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = keyMap;
- __asm volatile ("
- jsr a6@(-0x1e)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static struct KeyMap* AskKeyMapDefault(BASE_PAR_DECL0)
- {
- BASE_EXT_DECL
- register struct KeyMap* res __asm("d0");
- register void *a6 __asm ("a6");
- a6 = BASE_NAME;
- __asm volatile ("
- jsr a6@(-0x24)"
- : "=g" (res)
- : "g" (a6)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static WORD MapRawKey(BASE_PAR_DECL struct InputEvent* event, STRPTR buffer, long int length, struct KeyMap* keyMap)
- {
- BASE_EXT_DECL
- register WORD 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 = event;
- a1 = buffer;
- d1 = length;
- a2 = keyMap;
- __asm volatile ("
- jsr a6@(-0x2a)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1), "g" (d1), "g" (a2)
- : "d0", "d1", "a0", "a1", "a2");
- return res;
- }
- __inline static LONG MapANSI(BASE_PAR_DECL STRPTR string, long int count, STRPTR buffer, long int length, struct KeyMap* keyMap)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register STRPTR a0 __asm("a0");
- register long int d0 __asm("d0");
- register STRPTR a1 __asm("a1");
- register long int d1 __asm("d1");
- register struct KeyMap* a2 __asm("a2");
-
- a6 = BASE_NAME;
- a0 = string;
- d0 = count;
- a1 = buffer;
- d1 = length;
- a2 = keyMap;
- __asm volatile ("
- jsr a6@(-0x30)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (d0), "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
-