home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / gcc233.lha / os-include / inline / console.h < prev    next >
C/C++ Source or Header  |  1992-12-29  |  2KB  |  58 lines

  1. #ifndef _INLINE_CONSOLE_H
  2. #define _INLINE_CONSOLE_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL extern struct Device * ConsoleDevice;
  11. #endif
  12. #ifndef BASE_PAR_DECL
  13. #define BASE_PAR_DECL
  14. #define BASE_PAR_DECL0 void
  15. #endif
  16. #ifndef BASE_NAME
  17. #define BASE_NAME ConsoleDevice
  18. #endif
  19.  
  20. static __inline struct InputEvent *
  21. CDInputHandler (BASE_PAR_DECL struct InputEvent *events,struct Library *consoleDevice)
  22. {
  23.   BASE_EXT_DECL
  24.   register struct InputEvent * _res  __asm("d0");
  25.   register struct Device *a6 __asm("a6") = BASE_NAME;
  26.   register struct InputEvent *a0 __asm("a0") = events;
  27.   register struct Library *a1 __asm("a1") = consoleDevice;
  28.   __asm __volatile ("jsr a6@(-0x2a)"
  29.   : "=r" (_res)
  30.   : "r" (a6), "r" (a0), "r" (a1)
  31.   : "a0","a1","d0","d1", "memory");
  32.   return _res;
  33. }
  34. static __inline LONG 
  35. RawKeyConvert (BASE_PAR_DECL struct InputEvent *events,STRPTR buffer,long length,struct KeyMap *keyMap)
  36. {
  37.   BASE_EXT_DECL
  38.   register LONG  _res  __asm("d0");
  39.   register struct Device *a6 __asm("a6") = BASE_NAME;
  40.   register struct InputEvent *a0 __asm("a0") = events;
  41.   register STRPTR a1 __asm("a1") = buffer;
  42.   register long d1 __asm("d1") = length;
  43.   register struct KeyMap *a2 __asm("a2") = keyMap;
  44.   __asm __volatile ("jsr a6@(-0x30)"
  45.   : "=r" (_res)
  46.   : "r" (a6), "r" (a0), "r" (a1), "r" (d1), "r" (a2)
  47.   : "a0","a1","a2","d0","d1", "memory");
  48.   return _res;
  49. }
  50. #undef BASE_EXT_DECL
  51. #undef BASE_PAR_DECL
  52. #undef BASE_PAR_DECL0
  53. #undef BASE_NAME
  54.  
  55. __END_DECLS
  56.  
  57. #endif /* _INLINE_CONSOLE_H */
  58.