home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / gcc_9112.lzh / include20 / inline / asl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-15  |  2.4 KB  |  109 lines

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL extern struct AslBase * AslBase;
  4. #endif
  5. #ifndef BASE_PAR_DECL
  6. #define BASE_PAR_DECL
  7. #define BASE_PAR_DECL0 void
  8. #endif
  9. #ifndef BASE_NAME
  10. #define BASE_NAME AslBase
  11. #endif
  12. __inline static struct FileRequester* AllocFileRequest(BASE_PAR_DECL0)
  13. {
  14.     BASE_EXT_DECL
  15.     register struct FileRequester* res __asm("d0");
  16.     register void *a6 __asm ("a6");
  17.     a6 = BASE_NAME;
  18.     __asm volatile ("
  19.     jsr a6@(-0x1e)"
  20.     : "=g" (res)
  21.     : "g" (a6)
  22.     : "d0", "d1", "a0", "a1");
  23.     return res;
  24. }
  25. __inline static void FreeFileRequest(BASE_PAR_DECL struct FileRequester* fileReq)
  26. {
  27.     BASE_EXT_DECL
  28.     register void *a6 __asm ("a6");
  29.     register struct FileRequester* a0 __asm("a0");
  30.  
  31.     a6 = BASE_NAME;
  32.     a0 = fileReq;
  33.     __asm volatile ("
  34.     jsr a6@(-0x24)"
  35.     : /* no output */
  36.     : "g" (a6), "g" (a0)
  37.     : "d0", "d1", "a0", "a1");
  38. }
  39. __inline static BOOL RequestFile(BASE_PAR_DECL struct FileRequester* fileReq)
  40. {
  41.     BASE_EXT_DECL
  42.     register BOOL res __asm("d0");
  43.     register void *a6 __asm ("a6");
  44.     register struct FileRequester* a0 __asm("a0");
  45.  
  46.     a6 = BASE_NAME;
  47.     a0 = fileReq;
  48.     __asm volatile ("
  49.     jsr a6@(-0x2a)"
  50.     : "=g" (res)
  51.     : "g" (a6), "g" (a0)
  52.     : "d0", "d1", "a0", "a1");
  53.     return res;
  54. }
  55. __inline static APTR AllocAslRequest(BASE_PAR_DECL long unsigned int type, struct TagItem* tagList)
  56. {
  57.     BASE_EXT_DECL
  58.     register APTR res __asm("d0");
  59.     register void *a6 __asm ("a6");
  60.     register long unsigned int d0 __asm("d0");
  61.     register struct TagItem* a0 __asm("a0");
  62.  
  63.     a6 = BASE_NAME;
  64.     d0 = type;
  65.     a0 = tagList;
  66.     __asm volatile ("
  67.     jsr a6@(-0x30)"
  68.     : "=g" (res)
  69.     : "g" (a6), "g" (d0), "g" (a0)
  70.     : "d0", "d1", "a0", "a1");
  71.     return res;
  72. }
  73. __inline static void FreeAslRequest(BASE_PAR_DECL APTR request)
  74. {
  75.     BASE_EXT_DECL
  76.     register void *a6 __asm ("a6");
  77.     register APTR a0 __asm("a0");
  78.  
  79.     a6 = BASE_NAME;
  80.     a0 = request;
  81.     __asm volatile ("
  82.     jsr a6@(-0x36)"
  83.     : /* no output */
  84.     : "g" (a6), "g" (a0)
  85.     : "d0", "d1", "a0", "a1");
  86. }
  87. __inline static BOOL AslRequest(BASE_PAR_DECL APTR request, struct TagItem* tagList)
  88. {
  89.     BASE_EXT_DECL
  90.     register BOOL res __asm("d0");
  91.     register void *a6 __asm ("a6");
  92.     register APTR a0 __asm("a0");
  93.     register struct TagItem* a1 __asm("a1");
  94.  
  95.     a6 = BASE_NAME;
  96.     a0 = request;
  97.     a1 = tagList;
  98.     __asm volatile ("
  99.     jsr a6@(-0x3c)"
  100.     : "=g" (res)
  101.     : "g" (a6), "g" (a0), "g" (a1)
  102.     : "d0", "d1", "a0", "a1");
  103.     return res;
  104. }
  105. #undef BASE_EXT_DECL
  106. #undef BASE_PAR_DECL
  107. #undef BASE_PAR_DECL0
  108. #undef BASE_NAME
  109.