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

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL
  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 (*(void **)4)
  11. #endif
  12. __inline static ULONG Supervisor(BASE_PAR_DECL long unsigned int (*userFunction)())
  13. {
  14.     BASE_EXT_DECL
  15.     register ULONG res __asm("d0");
  16.     register void *a6 __asm ("a6");
  17.     register long unsigned int (*a4)() __asm("a4"); /* kludge ahead.. */
  18.  
  19.     a6 = BASE_NAME;
  20.     a4 = userFunction;
  21.     __asm volatile ("
  22.     exg a4,a5
  23.     jsr a6@(-0x1e)
  24.     exg a4,a5"
  25.     : "=g" (res)
  26.     : "g" (a6), "g" (a4)
  27.     : "d0", "d1", "a0", "a1", "a4");
  28.     return res;
  29. }
  30. #ifdef PRIVATE
  31. #endif
  32. __inline static void InitCode(BASE_PAR_DECL long unsigned int startClass, long unsigned int version)
  33. {
  34.     BASE_EXT_DECL
  35.     register void *a6 __asm ("a6");
  36.     register long unsigned int d0 __asm("d0");
  37.     register long unsigned int d1 __asm("d1");
  38.  
  39.     a6 = BASE_NAME;
  40.     d0 = startClass;
  41.     d1 = version;
  42.     __asm volatile ("
  43.     jsr a6@(-0x48)"
  44.     : /* no output */
  45.     : "g" (a6), "g" (d0), "g" (d1)
  46.     : "d0", "d1", "a0", "a1");
  47. }
  48. __inline static void InitStruct(BASE_PAR_DECL APTR initTable, APTR memory, long unsigned int size)
  49. {
  50.     BASE_EXT_DECL
  51.     register void *a6 __asm ("a6");
  52.     register APTR a1 __asm("a1");
  53.     register APTR a2 __asm("a2");
  54.     register long unsigned int d0 __asm("d0");
  55.  
  56.     a6 = BASE_NAME;
  57.     a1 = initTable;
  58.     a2 = memory;
  59.     d0 = size;
  60.     __asm volatile ("
  61.     jsr a6@(-0x4e)"
  62.     : /* no output */
  63.     : "g" (a6), "g" (a1), "g" (a2), "g" (d0)
  64.     : "d0", "d1", "a0", "a1", "a2");
  65. }
  66. __inline static struct Library* MakeLibrary(BASE_PAR_DECL APTR funcInit, APTR structInit, long unsigned int (*libInit)(), long unsigned int dataSize, long unsigned int segList)
  67. {
  68.     BASE_EXT_DECL
  69.     register struct Library* res __asm("d0");
  70.     register void *a6 __asm ("a6");
  71.     register APTR a0 __asm("a0");
  72.     register APTR a1 __asm("a1");
  73.     register long unsigned int (*a2)() __asm("a2");
  74.     register long unsigned int d0 __asm("d0");
  75.     register long unsigned int d1 __asm("d1");
  76.  
  77.     a6 = BASE_NAME;
  78.     a0 = funcInit;
  79.     a1 = structInit;
  80.     a2 = libInit;
  81.     d0 = dataSize;
  82.     d1 = segList;
  83.     __asm volatile ("
  84.     jsr a6@(-0x54)"
  85.     : "=g" (res)
  86.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2), "g" (d0), "g" (d1)
  87.     : "d0", "d1", "a0", "a1", "a2");
  88.     return res;
  89. }
  90. __inline static void MakeFunctions(BASE_PAR_DECL APTR target, APTR functionArray, long unsigned int funcDispBase)
  91. {
  92.     BASE_EXT_DECL
  93.     register void *a6 __asm ("a6");
  94.     register APTR a0 __asm("a0");
  95.     register APTR a1 __asm("a1");
  96.     register long unsigned int a2 __asm("a2");
  97.  
  98.     a6 = BASE_NAME;
  99.     a0 = target;
  100.     a1 = functionArray;
  101.     a2 = funcDispBase;
  102.     __asm volatile ("
  103.     jsr a6@(-0x5a)"
  104.     : /* no output */
  105.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2)
  106.     : "d0", "d1", "a0", "a1", "a2");
  107. }
  108. __inline static struct Resident* FindResident(BASE_PAR_DECL UBYTE* name)
  109. {
  110.     BASE_EXT_DECL
  111.     register struct Resident* res __asm("d0");
  112.     register void *a6 __asm ("a6");
  113.     register UBYTE* a1 __asm("a1");
  114.  
  115.     a6 = BASE_NAME;
  116.     a1 = name;
  117.     __asm volatile ("
  118.     jsr a6@(-0x60)"
  119.     : "=g" (res)
  120.     : "g" (a6), "g" (a1)
  121.     : "d0", "d1", "a0", "a1");
  122.     return res;
  123. }
  124. __inline static void InitResident(BASE_PAR_DECL struct Resident* resident, long unsigned int segList)
  125. {
  126.     BASE_EXT_DECL
  127.     register void *a6 __asm ("a6");
  128.     register struct Resident* a1 __asm("a1");
  129.     register long unsigned int d1 __asm("d1");
  130.  
  131.     a6 = BASE_NAME;
  132.     a1 = resident;
  133.     d1 = segList;
  134.     __asm volatile ("
  135.     jsr a6@(-0x66)"
  136.     : /* no output */
  137.     : "g" (a6), "g" (a1), "g" (d1)
  138.     : "d0", "d1", "a0", "a1");
  139. }
  140. __inline static void Alert(BASE_PAR_DECL long unsigned int alertNum)
  141. {
  142.     BASE_EXT_DECL
  143.     register void *a6 __asm ("a6");
  144.     register long unsigned int d7 __asm("d7");
  145.  
  146.     a6 = BASE_NAME;
  147.     d7 = alertNum;
  148.     __asm volatile ("
  149.     jsr a6@(-0x6c)"
  150.     : /* no output */
  151.     : "g" (a6), "g" (d7)
  152.     : "d0", "d1", "a0", "a1", "d7");
  153. }
  154. __inline static void Debug(BASE_PAR_DECL long unsigned int flags)
  155. {
  156.     BASE_EXT_DECL
  157.     register void *a6 __asm ("a6");
  158.     register long unsigned int d0 __asm("d0");
  159.  
  160.     a6 = BASE_NAME;
  161.     d0 = flags;
  162.     __asm volatile ("
  163.     jsr a6@(-0x72)"
  164.     : /* no output */
  165.     : "g" (a6), "g" (d0)
  166.     : "d0", "d1", "a0", "a1");
  167. }
  168. __inline static void Disable(BASE_PAR_DECL0)
  169. {
  170.     BASE_EXT_DECL
  171.     register void *a6 __asm ("a6");
  172.     a6 = BASE_NAME;
  173.     __asm volatile ("
  174.     jsr a6@(-0x78)"
  175.     : /* no output */
  176.     : "g" (a6)
  177.     : "d0", "d1", "a0", "a1");
  178. }
  179. __inline static void Enable(BASE_PAR_DECL0)
  180. {
  181.     BASE_EXT_DECL
  182.     register void *a6 __asm ("a6");
  183.     a6 = BASE_NAME;
  184.     __asm volatile ("
  185.     jsr a6@(-0x7e)"
  186.     : /* no output */
  187.     : "g" (a6)
  188.     : "d0", "d1", "a0", "a1");
  189. }
  190. __inline static void Forbid(BASE_PAR_DECL0)
  191. {
  192.     BASE_EXT_DECL
  193.     register void *a6 __asm ("a6");
  194.     a6 = BASE_NAME;
  195.     __asm volatile ("
  196.     jsr a6@(-0x84)"
  197.     : /* no output */
  198.     : "g" (a6)
  199.     : "d0", "d1", "a0", "a1");
  200. }
  201. __inline static void Permit(BASE_PAR_DECL0)
  202. {
  203.     BASE_EXT_DECL
  204.     register void *a6 __asm ("a6");
  205.     a6 = BASE_NAME;
  206.     __asm volatile ("
  207.     jsr a6@(-0x8a)"
  208.     : /* no output */
  209.     : "g" (a6)
  210.     : "d0", "d1", "a0", "a1");
  211. }
  212. __inline static ULONG SetSR(BASE_PAR_DECL long unsigned int newSR, long unsigned int mask)
  213. {
  214.     BASE_EXT_DECL
  215.     register ULONG res __asm("d0");
  216.     register void *a6 __asm ("a6");
  217.     register long unsigned int d0 __asm("d0");
  218.     register long unsigned int d1 __asm("d1");
  219.  
  220.     a6 = BASE_NAME;
  221.     d0 = newSR;
  222.     d1 = mask;
  223.     __asm volatile ("
  224.     jsr a6@(-0x90)"
  225.     : "=g" (res)
  226.     : "g" (a6), "g" (d0), "g" (d1)
  227.     : "d0", "d1", "a0", "a1");
  228.     return res;
  229. }
  230. __inline static APTR SuperState(BASE_PAR_DECL0)
  231. {
  232.     BASE_EXT_DECL
  233.     register APTR res __asm("d0");
  234.     register void *a6 __asm ("a6");
  235.     a6 = BASE_NAME;
  236.     __asm volatile ("
  237.     jsr a6@(-0x96)"
  238.     : "=g" (res)
  239.     : "g" (a6)
  240.     : "d0", "d1", "a0", "a1");
  241.     return res;
  242. }
  243. __inline static void UserState(BASE_PAR_DECL APTR sysStack)
  244. {
  245.     BASE_EXT_DECL
  246.     register void *a6 __asm ("a6");
  247.     register APTR d0 __asm("d0");
  248.  
  249.     a6 = BASE_NAME;
  250.     d0 = sysStack;
  251.     __asm volatile ("
  252.     jsr a6@(-0x9c)"
  253.     : /* no output */
  254.     : "g" (a6), "g" (d0)
  255.     : "d0", "d1", "a0", "a1");
  256. }
  257. __inline static struct Interrupt* SetIntVector(BASE_PAR_DECL long int intNumber, struct Interrupt* interrupt)
  258. {
  259.     BASE_EXT_DECL
  260.     register struct Interrupt* res __asm("d0");
  261.     register void *a6 __asm ("a6");
  262.     register long int d0 __asm("d0");
  263.     register struct Interrupt* a1 __asm("a1");
  264.  
  265.     a6 = BASE_NAME;
  266.     d0 = intNumber;
  267.     a1 = interrupt;
  268.     __asm volatile ("
  269.     jsr a6@(-0xa2)"
  270.     : "=g" (res)
  271.     : "g" (a6), "g" (d0), "g" (a1)
  272.     : "d0", "d1", "a0", "a1");
  273.     return res;
  274. }
  275. __inline static void AddIntServer(BASE_PAR_DECL long int intNumber, struct Interrupt* interrupt)
  276. {
  277.     BASE_EXT_DECL
  278.     register void *a6 __asm ("a6");
  279.     register long int d0 __asm("d0");
  280.     register struct Interrupt* a1 __asm("a1");
  281.  
  282.     a6 = BASE_NAME;
  283.     d0 = intNumber;
  284.     a1 = interrupt;
  285.     __asm volatile ("
  286.     jsr a6@(-0xa8)"
  287.     : /* no output */
  288.     : "g" (a6), "g" (d0), "g" (a1)
  289.     : "d0", "d1", "a0", "a1");
  290. }
  291. __inline static void RemIntServer(BASE_PAR_DECL long int intNumber, struct Interrupt* interrupt)
  292. {
  293.     BASE_EXT_DECL
  294.     register void *a6 __asm ("a6");
  295.     register long int d0 __asm("d0");
  296.     register struct Interrupt* a1 __asm("a1");
  297.  
  298.     a6 = BASE_NAME;
  299.     d0 = intNumber;
  300.     a1 = interrupt;
  301.     __asm volatile ("
  302.     jsr a6@(-0xae)"
  303.     : /* no output */
  304.     : "g" (a6), "g" (d0), "g" (a1)
  305.     : "d0", "d1", "a0", "a1");
  306. }
  307. __inline static void Cause(BASE_PAR_DECL struct Interrupt* interrupt)
  308. {
  309.     BASE_EXT_DECL
  310.     register void *a6 __asm ("a6");
  311.     register struct Interrupt* a1 __asm("a1");
  312.  
  313.     a6 = BASE_NAME;
  314.     a1 = interrupt;
  315.     __asm volatile ("
  316.     jsr a6@(-0xb4)"
  317.     : /* no output */
  318.     : "g" (a6), "g" (a1)
  319.     : "d0", "d1", "a0", "a1");
  320. }
  321. __inline static APTR Allocate(BASE_PAR_DECL struct MemHeader* freeList, long unsigned int byteSize)
  322. {
  323.     BASE_EXT_DECL
  324.     register APTR res __asm("d0");
  325.     register void *a6 __asm ("a6");
  326.     register struct MemHeader* a0 __asm("a0");
  327.     register long unsigned int d0 __asm("d0");
  328.  
  329.     a6 = BASE_NAME;
  330.     a0 = freeList;
  331.     d0 = byteSize;
  332.     __asm volatile ("
  333.     jsr a6@(-0xba)"
  334.     : "=g" (res)
  335.     : "g" (a6), "g" (a0), "g" (d0)
  336.     : "d0", "d1", "a0", "a1");
  337.     return res;
  338. }
  339. __inline static void Deallocate(BASE_PAR_DECL struct MemHeader* freeList, APTR memoryBlock, long unsigned int byteSize)
  340. {
  341.     BASE_EXT_DECL
  342.     register void *a6 __asm ("a6");
  343.     register struct MemHeader* a0 __asm("a0");
  344.     register APTR a1 __asm("a1");
  345.     register long unsigned int d0 __asm("d0");
  346.  
  347.     a6 = BASE_NAME;
  348.     a0 = freeList;
  349.     a1 = memoryBlock;
  350.     d0 = byteSize;
  351.     __asm volatile ("
  352.     jsr a6@(-0xc0)"
  353.     : /* no output */
  354.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  355.     : "d0", "d1", "a0", "a1");
  356. }
  357. __inline static APTR AllocMem(BASE_PAR_DECL long unsigned int byteSize, long unsigned int requirements)
  358. {
  359.     BASE_EXT_DECL
  360.     register APTR res __asm("d0");
  361.     register void *a6 __asm ("a6");
  362.     register long unsigned int d0 __asm("d0");
  363.     register long unsigned int d1 __asm("d1");
  364.  
  365.     a6 = BASE_NAME;
  366.     d0 = byteSize;
  367.     d1 = requirements;
  368.     __asm volatile ("
  369.     jsr a6@(-0xc6)"
  370.     : "=g" (res)
  371.     : "g" (a6), "g" (d0), "g" (d1)
  372.     : "d0", "d1", "a0", "a1");
  373.     return res;
  374. }
  375. __inline static APTR AllocAbs(BASE_PAR_DECL long unsigned int byteSize, APTR location)
  376. {
  377.     BASE_EXT_DECL
  378.     register APTR res __asm("d0");
  379.     register void *a6 __asm ("a6");
  380.     register long unsigned int d0 __asm("d0");
  381.     register APTR a1 __asm("a1");
  382.  
  383.     a6 = BASE_NAME;
  384.     d0 = byteSize;
  385.     a1 = location;
  386.     __asm volatile ("
  387.     jsr a6@(-0xcc)"
  388.     : "=g" (res)
  389.     : "g" (a6), "g" (d0), "g" (a1)
  390.     : "d0", "d1", "a0", "a1");
  391.     return res;
  392. }
  393. __inline static void FreeMem(BASE_PAR_DECL APTR memoryBlock, long unsigned int byteSize)
  394. {
  395.     BASE_EXT_DECL
  396.     register void *a6 __asm ("a6");
  397.     register APTR a1 __asm("a1");
  398.     register long unsigned int d0 __asm("d0");
  399.  
  400.     a6 = BASE_NAME;
  401.     a1 = memoryBlock;
  402.     d0 = byteSize;
  403.     __asm volatile ("
  404.     jsr a6@(-0xd2)"
  405.     : /* no output */
  406.     : "g" (a6), "g" (a1), "g" (d0)
  407.     : "d0", "d1", "a0", "a1");
  408. }
  409. __inline static ULONG AvailMem(BASE_PAR_DECL long unsigned int requirements)
  410. {
  411.     BASE_EXT_DECL
  412.     register ULONG res __asm("d0");
  413.     register void *a6 __asm ("a6");
  414.     register long unsigned int d1 __asm("d1");
  415.  
  416.     a6 = BASE_NAME;
  417.     d1 = requirements;
  418.     __asm volatile ("
  419.     jsr a6@(-0xd8)"
  420.     : "=g" (res)
  421.     : "g" (a6), "g" (d1)
  422.     : "d0", "d1", "a0", "a1");
  423.     return res;
  424. }
  425. __inline static struct MemList* AllocEntry(BASE_PAR_DECL struct MemList* entry)
  426. {
  427.     BASE_EXT_DECL
  428.     register struct MemList* res __asm("d0");
  429.     register void *a6 __asm ("a6");
  430.     register struct MemList* a0 __asm("a0");
  431.  
  432.     a6 = BASE_NAME;
  433.     a0 = entry;
  434.     __asm volatile ("
  435.     jsr a6@(-0xde)"
  436.     : "=g" (res)
  437.     : "g" (a6), "g" (a0)
  438.     : "d0", "d1", "a0", "a1");
  439.     return res;
  440. }
  441. __inline static void FreeEntry(BASE_PAR_DECL struct MemList* entry)
  442. {
  443.     BASE_EXT_DECL
  444.     register void *a6 __asm ("a6");
  445.     register struct MemList* a0 __asm("a0");
  446.  
  447.     a6 = BASE_NAME;
  448.     a0 = entry;
  449.     __asm volatile ("
  450.     jsr a6@(-0xe4)"
  451.     : /* no output */
  452.     : "g" (a6), "g" (a0)
  453.     : "d0", "d1", "a0", "a1");
  454. }
  455. __inline static void Insert(BASE_PAR_DECL struct List* list, struct Node* node, struct Node* pred)
  456. {
  457.     BASE_EXT_DECL
  458.     register void *a6 __asm ("a6");
  459.     register struct List* a0 __asm("a0");
  460.     register struct Node* a1 __asm("a1");
  461.     register struct Node* a2 __asm("a2");
  462.  
  463.     a6 = BASE_NAME;
  464.     a0 = list;
  465.     a1 = node;
  466.     a2 = pred;
  467.     __asm volatile ("
  468.     jsr a6@(-0xea)"
  469.     : /* no output */
  470.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2)
  471.     : "d0", "d1", "a0", "a1", "a2");
  472. }
  473. __inline static void AddHead(BASE_PAR_DECL struct List* list, struct Node* node)
  474. {
  475.     BASE_EXT_DECL
  476.     register void *a6 __asm ("a6");
  477.     register struct List* a0 __asm("a0");
  478.     register struct Node* a1 __asm("a1");
  479.  
  480.     a6 = BASE_NAME;
  481.     a0 = list;
  482.     a1 = node;
  483.     __asm volatile ("
  484.     jsr a6@(-0xf0)"
  485.     : /* no output */
  486.     : "g" (a6), "g" (a0), "g" (a1)
  487.     : "d0", "d1", "a0", "a1");
  488. }
  489. __inline static void AddTail(BASE_PAR_DECL struct List* list, struct Node* node)
  490. {
  491.     BASE_EXT_DECL
  492.     register void *a6 __asm ("a6");
  493.     register struct List* a0 __asm("a0");
  494.     register struct Node* a1 __asm("a1");
  495.  
  496.     a6 = BASE_NAME;
  497.     a0 = list;
  498.     a1 = node;
  499.     __asm volatile ("
  500.     jsr a6@(-0xf6)"
  501.     : /* no output */
  502.     : "g" (a6), "g" (a0), "g" (a1)
  503.     : "d0", "d1", "a0", "a1");
  504. }
  505. __inline static void Remove(BASE_PAR_DECL struct Node* node)
  506. {
  507.     BASE_EXT_DECL
  508.     register void *a6 __asm ("a6");
  509.     register struct Node* a1 __asm("a1");
  510.  
  511.     a6 = BASE_NAME;
  512.     a1 = node;
  513.     __asm volatile ("
  514.     jsr a6@(-0xfc)"
  515.     : /* no output */
  516.     : "g" (a6), "g" (a1)
  517.     : "d0", "d1", "a0", "a1");
  518. }
  519. __inline static struct Node* RemHead(BASE_PAR_DECL struct List* list)
  520. {
  521.     BASE_EXT_DECL
  522.     register struct Node* res __asm("d0");
  523.     register void *a6 __asm ("a6");
  524.     register struct List* a0 __asm("a0");
  525.  
  526.     a6 = BASE_NAME;
  527.     a0 = list;
  528.     __asm volatile ("
  529.     jsr a6@(-0x102)"
  530.     : "=g" (res)
  531.     : "g" (a6), "g" (a0)
  532.     : "d0", "d1", "a0", "a1");
  533.     return res;
  534. }
  535. __inline static struct Node* RemTail(BASE_PAR_DECL struct List* list)
  536. {
  537.     BASE_EXT_DECL
  538.     register struct Node* res __asm("d0");
  539.     register void *a6 __asm ("a6");
  540.     register struct List* a0 __asm("a0");
  541.  
  542.     a6 = BASE_NAME;
  543.     a0 = list;
  544.     __asm volatile ("
  545.     jsr a6@(-0x108)"
  546.     : "=g" (res)
  547.     : "g" (a6), "g" (a0)
  548.     : "d0", "d1", "a0", "a1");
  549.     return res;
  550. }
  551. __inline static void Enqueue(BASE_PAR_DECL struct List* list, struct Node* node)
  552. {
  553.     BASE_EXT_DECL
  554.     register void *a6 __asm ("a6");
  555.     register struct List* a0 __asm("a0");
  556.     register struct Node* a1 __asm("a1");
  557.  
  558.     a6 = BASE_NAME;
  559.     a0 = list;
  560.     a1 = node;
  561.     __asm volatile ("
  562.     jsr a6@(-0x10e)"
  563.     : /* no output */
  564.     : "g" (a6), "g" (a0), "g" (a1)
  565.     : "d0", "d1", "a0", "a1");
  566. }
  567. __inline static struct Node* FindName(BASE_PAR_DECL struct List* list, UBYTE* name)
  568. {
  569.     BASE_EXT_DECL
  570.     register struct Node* res __asm("d0");
  571.     register void *a6 __asm ("a6");
  572.     register struct List* a0 __asm("a0");
  573.     register UBYTE* a1 __asm("a1");
  574.  
  575.     a6 = BASE_NAME;
  576.     a0 = list;
  577.     a1 = name;
  578.     __asm volatile ("
  579.     jsr a6@(-0x114)"
  580.     : "=g" (res)
  581.     : "g" (a6), "g" (a0), "g" (a1)
  582.     : "d0", "d1", "a0", "a1");
  583.     return res;
  584. }
  585. __inline static APTR AddTask(BASE_PAR_DECL struct Task* task, APTR initPC, APTR finalPC)
  586. {
  587.     BASE_EXT_DECL
  588.     register APTR res __asm("d0");
  589.     register void *a6 __asm ("a6");
  590.     register struct Task* a1 __asm("a1");
  591.     register APTR a2 __asm("a2");
  592.     register APTR a3 __asm("a3");
  593.  
  594.     a6 = BASE_NAME;
  595.     a1 = task;
  596.     a2 = initPC;
  597.     a3 = finalPC;
  598.     __asm volatile ("
  599.     jsr a6@(-0x11a)"
  600.     : "=g" (res)
  601.     : "g" (a6), "g" (a1), "g" (a2), "g" (a3)
  602.     : "d0", "d1", "a0", "a1", "a2", "a3");
  603.     return res;
  604. }
  605. __inline static void RemTask(BASE_PAR_DECL struct Task* task)
  606. {
  607.     BASE_EXT_DECL
  608.     register void *a6 __asm ("a6");
  609.     register struct Task* a1 __asm("a1");
  610.  
  611.     a6 = BASE_NAME;
  612.     a1 = task;
  613.     __asm volatile ("
  614.     jsr a6@(-0x120)"
  615.     : /* no output */
  616.     : "g" (a6), "g" (a1)
  617.     : "d0", "d1", "a0", "a1");
  618. }
  619. __inline static struct Task* FindTask(BASE_PAR_DECL UBYTE* name)
  620. {
  621.     BASE_EXT_DECL
  622.     register struct Task* res __asm("d0");
  623.     register void *a6 __asm ("a6");
  624.     register UBYTE* a1 __asm("a1");
  625.  
  626.     a6 = BASE_NAME;
  627.     a1 = name;
  628.     __asm volatile ("
  629.     jsr a6@(-0x126)"
  630.     : "=g" (res)
  631.     : "g" (a6), "g" (a1)
  632.     : "d0", "d1", "a0", "a1");
  633.     return res;
  634. }
  635. __inline static BYTE SetTaskPri(BASE_PAR_DECL struct Task* task, long int priority)
  636. {
  637.     BASE_EXT_DECL
  638.     register BYTE res __asm("d0");
  639.     register void *a6 __asm ("a6");
  640.     register struct Task* a1 __asm("a1");
  641.     register long int d0 __asm("d0");
  642.  
  643.     a6 = BASE_NAME;
  644.     a1 = task;
  645.     d0 = priority;
  646.     __asm volatile ("
  647.     jsr a6@(-0x12c)"
  648.     : "=g" (res)
  649.     : "g" (a6), "g" (a1), "g" (d0)
  650.     : "d0", "d1", "a0", "a1");
  651.     return res;
  652. }
  653. __inline static ULONG SetSignal(BASE_PAR_DECL long unsigned int newSignals, long unsigned int signalSet)
  654. {
  655.     BASE_EXT_DECL
  656.     register ULONG res __asm("d0");
  657.     register void *a6 __asm ("a6");
  658.     register long unsigned int d0 __asm("d0");
  659.     register long unsigned int d1 __asm("d1");
  660.  
  661.     a6 = BASE_NAME;
  662.     d0 = newSignals;
  663.     d1 = signalSet;
  664.     __asm volatile ("
  665.     jsr a6@(-0x132)"
  666.     : "=g" (res)
  667.     : "g" (a6), "g" (d0), "g" (d1)
  668.     : "d0", "d1", "a0", "a1");
  669.     return res;
  670. }
  671. __inline static ULONG SetExcept(BASE_PAR_DECL long unsigned int newSignals, long unsigned int signalSet)
  672. {
  673.     BASE_EXT_DECL
  674.     register ULONG res __asm("d0");
  675.     register void *a6 __asm ("a6");
  676.     register long unsigned int d0 __asm("d0");
  677.     register long unsigned int d1 __asm("d1");
  678.  
  679.     a6 = BASE_NAME;
  680.     d0 = newSignals;
  681.     d1 = signalSet;
  682.     __asm volatile ("
  683.     jsr a6@(-0x138)"
  684.     : "=g" (res)
  685.     : "g" (a6), "g" (d0), "g" (d1)
  686.     : "d0", "d1", "a0", "a1");
  687.     return res;
  688. }
  689. __inline static ULONG Wait(BASE_PAR_DECL long unsigned int signalSet)
  690. {
  691.     BASE_EXT_DECL
  692.     register ULONG res __asm("d0");
  693.     register void *a6 __asm ("a6");
  694.     register long unsigned int d0 __asm("d0");
  695.  
  696.     a6 = BASE_NAME;
  697.     d0 = signalSet;
  698.     __asm volatile ("
  699.     jsr a6@(-0x13e)"
  700.     : "=g" (res)
  701.     : "g" (a6), "g" (d0)
  702.     : "d0", "d1", "a0", "a1");
  703.     return res;
  704. }
  705. __inline static void Signal(BASE_PAR_DECL struct Task* task, long unsigned int signalSet)
  706. {
  707.     BASE_EXT_DECL
  708.     register void *a6 __asm ("a6");
  709.     register struct Task* a1 __asm("a1");
  710.     register long unsigned int d0 __asm("d0");
  711.  
  712.     a6 = BASE_NAME;
  713.     a1 = task;
  714.     d0 = signalSet;
  715.     __asm volatile ("
  716.     jsr a6@(-0x144)"
  717.     : /* no output */
  718.     : "g" (a6), "g" (a1), "g" (d0)
  719.     : "d0", "d1", "a0", "a1");
  720. }
  721. __inline static BYTE AllocSignal(BASE_PAR_DECL long int signalNum)
  722. {
  723.     BASE_EXT_DECL
  724.     register BYTE res __asm("d0");
  725.     register void *a6 __asm ("a6");
  726.     register long int d0 __asm("d0");
  727.  
  728.     a6 = BASE_NAME;
  729.     d0 = signalNum;
  730.     __asm volatile ("
  731.     jsr a6@(-0x14a)"
  732.     : "=g" (res)
  733.     : "g" (a6), "g" (d0)
  734.     : "d0", "d1", "a0", "a1");
  735.     return res;
  736. }
  737. __inline static void FreeSignal(BASE_PAR_DECL long int signalNum)
  738. {
  739.     BASE_EXT_DECL
  740.     register void *a6 __asm ("a6");
  741.     register long int d0 __asm("d0");
  742.  
  743.     a6 = BASE_NAME;
  744.     d0 = signalNum;
  745.     __asm volatile ("
  746.     jsr a6@(-0x150)"
  747.     : /* no output */
  748.     : "g" (a6), "g" (d0)
  749.     : "d0", "d1", "a0", "a1");
  750. }
  751. __inline static LONG AllocTrap(BASE_PAR_DECL long int trapNum)
  752. {
  753.     BASE_EXT_DECL
  754.     register LONG res __asm("d0");
  755.     register void *a6 __asm ("a6");
  756.     register long int d0 __asm("d0");
  757.  
  758.     a6 = BASE_NAME;
  759.     d0 = trapNum;
  760.     __asm volatile ("
  761.     jsr a6@(-0x156)"
  762.     : "=g" (res)
  763.     : "g" (a6), "g" (d0)
  764.     : "d0", "d1", "a0", "a1");
  765.     return res;
  766. }
  767. __inline static void FreeTrap(BASE_PAR_DECL long int trapNum)
  768. {
  769.     BASE_EXT_DECL
  770.     register void *a6 __asm ("a6");
  771.     register long int d0 __asm("d0");
  772.  
  773.     a6 = BASE_NAME;
  774.     d0 = trapNum;
  775.     __asm volatile ("
  776.     jsr a6@(-0x15c)"
  777.     : /* no output */
  778.     : "g" (a6), "g" (d0)
  779.     : "d0", "d1", "a0", "a1");
  780. }
  781. __inline static void AddPort(BASE_PAR_DECL struct MsgPort* port)
  782. {
  783.     BASE_EXT_DECL
  784.     register void *a6 __asm ("a6");
  785.     register struct MsgPort* a1 __asm("a1");
  786.  
  787.     a6 = BASE_NAME;
  788.     a1 = port;
  789.     __asm volatile ("
  790.     jsr a6@(-0x162)"
  791.     : /* no output */
  792.     : "g" (a6), "g" (a1)
  793.     : "d0", "d1", "a0", "a1");
  794. }
  795. __inline static void RemPort(BASE_PAR_DECL struct MsgPort* port)
  796. {
  797.     BASE_EXT_DECL
  798.     register void *a6 __asm ("a6");
  799.     register struct MsgPort* a1 __asm("a1");
  800.  
  801.     a6 = BASE_NAME;
  802.     a1 = port;
  803.     __asm volatile ("
  804.     jsr a6@(-0x168)"
  805.     : /* no output */
  806.     : "g" (a6), "g" (a1)
  807.     : "d0", "d1", "a0", "a1");
  808. }
  809. __inline static void PutMsg(BASE_PAR_DECL struct MsgPort* port, struct Message* message)
  810. {
  811.     BASE_EXT_DECL
  812.     register void *a6 __asm ("a6");
  813.     register struct MsgPort* a0 __asm("a0");
  814.     register struct Message* a1 __asm("a1");
  815.  
  816.     a6 = BASE_NAME;
  817.     a0 = port;
  818.     a1 = message;
  819.     __asm volatile ("
  820.     jsr a6@(-0x16e)"
  821.     : /* no output */
  822.     : "g" (a6), "g" (a0), "g" (a1)
  823.     : "d0", "d1", "a0", "a1");
  824. }
  825. __inline static struct Message* GetMsg(BASE_PAR_DECL struct MsgPort* port)
  826. {
  827.     BASE_EXT_DECL
  828.     register struct Message* res __asm("d0");
  829.     register void *a6 __asm ("a6");
  830.     register struct MsgPort* a0 __asm("a0");
  831.  
  832.     a6 = BASE_NAME;
  833.     a0 = port;
  834.     __asm volatile ("
  835.     jsr a6@(-0x174)"
  836.     : "=g" (res)
  837.     : "g" (a6), "g" (a0)
  838.     : "d0", "d1", "a0", "a1");
  839.     return res;
  840. }
  841. __inline static void ReplyMsg(BASE_PAR_DECL struct Message* message)
  842. {
  843.     BASE_EXT_DECL
  844.     register void *a6 __asm ("a6");
  845.     register struct Message* a1 __asm("a1");
  846.  
  847.     a6 = BASE_NAME;
  848.     a1 = message;
  849.     __asm volatile ("
  850.     jsr a6@(-0x17a)"
  851.     : /* no output */
  852.     : "g" (a6), "g" (a1)
  853.     : "d0", "d1", "a0", "a1");
  854. }
  855. __inline static struct Message* WaitPort(BASE_PAR_DECL struct MsgPort* port)
  856. {
  857.     BASE_EXT_DECL
  858.     register struct Message* res __asm("d0");
  859.     register void *a6 __asm ("a6");
  860.     register struct MsgPort* a0 __asm("a0");
  861.  
  862.     a6 = BASE_NAME;
  863.     a0 = port;
  864.     __asm volatile ("
  865.     jsr a6@(-0x180)"
  866.     : "=g" (res)
  867.     : "g" (a6), "g" (a0)
  868.     : "d0", "d1", "a0", "a1");
  869.     return res;
  870. }
  871. __inline static struct MsgPort* FindPort(BASE_PAR_DECL UBYTE* name)
  872. {
  873.     BASE_EXT_DECL
  874.     register struct MsgPort* res __asm("d0");
  875.     register void *a6 __asm ("a6");
  876.     register UBYTE* a1 __asm("a1");
  877.  
  878.     a6 = BASE_NAME;
  879.     a1 = name;
  880.     __asm volatile ("
  881.     jsr a6@(-0x186)"
  882.     : "=g" (res)
  883.     : "g" (a6), "g" (a1)
  884.     : "d0", "d1", "a0", "a1");
  885.     return res;
  886. }
  887. __inline static void AddLibrary(BASE_PAR_DECL struct Library* library)
  888. {
  889.     BASE_EXT_DECL
  890.     register void *a6 __asm ("a6");
  891.     register struct Library* a1 __asm("a1");
  892.  
  893.     a6 = BASE_NAME;
  894.     a1 = library;
  895.     __asm volatile ("
  896.     jsr a6@(-0x18c)"
  897.     : /* no output */
  898.     : "g" (a6), "g" (a1)
  899.     : "d0", "d1", "a0", "a1");
  900. }
  901. __inline static void RemLibrary(BASE_PAR_DECL struct Library* library)
  902. {
  903.     BASE_EXT_DECL
  904.     register void *a6 __asm ("a6");
  905.     register struct Library* a1 __asm("a1");
  906.  
  907.     a6 = BASE_NAME;
  908.     a1 = library;
  909.     __asm volatile ("
  910.     jsr a6@(-0x192)"
  911.     : /* no output */
  912.     : "g" (a6), "g" (a1)
  913.     : "d0", "d1", "a0", "a1");
  914. }
  915. __inline static struct Library* OldOpenLibrary(BASE_PAR_DECL UBYTE* libName)
  916. {
  917.     BASE_EXT_DECL
  918.     register struct Library* res __asm("d0");
  919.     register void *a6 __asm ("a6");
  920.     register UBYTE* a1 __asm("a1");
  921.  
  922.     a6 = BASE_NAME;
  923.     a1 = libName;
  924.     __asm volatile ("
  925.     jsr a6@(-0x198)"
  926.     : "=g" (res)
  927.     : "g" (a6), "g" (a1)
  928.     : "d0", "d1", "a0", "a1");
  929.     return res;
  930. }
  931. __inline static void CloseLibrary(BASE_PAR_DECL struct Library* library)
  932. {
  933.     BASE_EXT_DECL
  934.     register void *a6 __asm ("a6");
  935.     register struct Library* a1 __asm("a1");
  936.  
  937.     a6 = BASE_NAME;
  938.     a1 = library;
  939.     __asm volatile ("
  940.     jsr a6@(-0x19e)"
  941.     : /* no output */
  942.     : "g" (a6), "g" (a1)
  943.     : "d0", "d1", "a0", "a1");
  944. }
  945. __inline static APTR SetFunction(BASE_PAR_DECL struct Library* library, long int funcOffset, long unsigned int (*newFunction)())
  946. {
  947.     BASE_EXT_DECL
  948.     register APTR res __asm("d0");
  949.     register void *a6 __asm ("a6");
  950.     register struct Library* a1 __asm("a1");
  951.     register long int a0 __asm("a0");
  952.     register long unsigned int (*d0)() __asm("d0");
  953.  
  954.     a6 = BASE_NAME;
  955.     a1 = library;
  956.     a0 = funcOffset;
  957.     d0 = newFunction;
  958.     __asm volatile ("
  959.     jsr a6@(-0x1a4)"
  960.     : "=g" (res)
  961.     : "g" (a6), "g" (a1), "g" (a0), "g" (d0)
  962.     : "d0", "d1", "a0", "a1");
  963.     return res;
  964. }
  965. __inline static void SumLibrary(BASE_PAR_DECL struct Library* library)
  966. {
  967.     BASE_EXT_DECL
  968.     register void *a6 __asm ("a6");
  969.     register struct Library* a1 __asm("a1");
  970.  
  971.     a6 = BASE_NAME;
  972.     a1 = library;
  973.     __asm volatile ("
  974.     jsr a6@(-0x1aa)"
  975.     : /* no output */
  976.     : "g" (a6), "g" (a1)
  977.     : "d0", "d1", "a0", "a1");
  978. }
  979. __inline static void AddDevice(BASE_PAR_DECL struct Device* device)
  980. {
  981.     BASE_EXT_DECL
  982.     register void *a6 __asm ("a6");
  983.     register struct Device* a1 __asm("a1");
  984.  
  985.     a6 = BASE_NAME;
  986.     a1 = device;
  987.     __asm volatile ("
  988.     jsr a6@(-0x1b0)"
  989.     : /* no output */
  990.     : "g" (a6), "g" (a1)
  991.     : "d0", "d1", "a0", "a1");
  992. }
  993. __inline static void RemDevice(BASE_PAR_DECL struct Device* device)
  994. {
  995.     BASE_EXT_DECL
  996.     register void *a6 __asm ("a6");
  997.     register struct Device* a1 __asm("a1");
  998.  
  999.     a6 = BASE_NAME;
  1000.     a1 = device;
  1001.     __asm volatile ("
  1002.     jsr a6@(-0x1b6)"
  1003.     : /* no output */
  1004.     : "g" (a6), "g" (a1)
  1005.     : "d0", "d1", "a0", "a1");
  1006. }
  1007. __inline static BYTE OpenDevice(BASE_PAR_DECL UBYTE* devName, long unsigned int unit, struct IORequest* ioRequest, long unsigned int flags)
  1008. {
  1009.     BASE_EXT_DECL
  1010.     register BYTE res __asm("d0");
  1011.     register void *a6 __asm ("a6");
  1012.     register UBYTE* a0 __asm("a0");
  1013.     register long unsigned int d0 __asm("d0");
  1014.     register struct IORequest* a1 __asm("a1");
  1015.     register long unsigned int d1 __asm("d1");
  1016.  
  1017.     a6 = BASE_NAME;
  1018.     a0 = devName;
  1019.     d0 = unit;
  1020.     a1 = ioRequest;
  1021.     d1 = flags;
  1022.     __asm volatile ("
  1023.     jsr a6@(-0x1bc)"
  1024.     : "=g" (res)
  1025.     : "g" (a6), "g" (a0), "g" (d0), "g" (a1), "g" (d1)
  1026.     : "d0", "d1", "a0", "a1");
  1027.     return res;
  1028. }
  1029. __inline static void CloseDevice(BASE_PAR_DECL struct IORequest* ioRequest)
  1030. {
  1031.     BASE_EXT_DECL
  1032.     register void *a6 __asm ("a6");
  1033.     register struct IORequest* a1 __asm("a1");
  1034.  
  1035.     a6 = BASE_NAME;
  1036.     a1 = ioRequest;
  1037.     __asm volatile ("
  1038.     jsr a6@(-0x1c2)"
  1039.     : /* no output */
  1040.     : "g" (a6), "g" (a1)
  1041.     : "d0", "d1", "a0", "a1");
  1042. }
  1043. __inline static BYTE DoIO(BASE_PAR_DECL struct IORequest* ioRequest)
  1044. {
  1045.     BASE_EXT_DECL
  1046.     register BYTE res __asm("d0");
  1047.     register void *a6 __asm ("a6");
  1048.     register struct IORequest* a1 __asm("a1");
  1049.  
  1050.     a6 = BASE_NAME;
  1051.     a1 = ioRequest;
  1052.     __asm volatile ("
  1053.     jsr a6@(-0x1c8)"
  1054.     : "=g" (res)
  1055.     : "g" (a6), "g" (a1)
  1056.     : "d0", "d1", "a0", "a1");
  1057.     return res;
  1058. }
  1059. __inline static void SendIO(BASE_PAR_DECL struct IORequest* ioRequest)
  1060. {
  1061.     BASE_EXT_DECL
  1062.     register void *a6 __asm ("a6");
  1063.     register struct IORequest* a1 __asm("a1");
  1064.  
  1065.     a6 = BASE_NAME;
  1066.     a1 = ioRequest;
  1067.     __asm volatile ("
  1068.     jsr a6@(-0x1ce)"
  1069.     : /* no output */
  1070.     : "g" (a6), "g" (a1)
  1071.     : "d0", "d1", "a0", "a1");
  1072. }
  1073. __inline static BOOL CheckIO(BASE_PAR_DECL struct IORequest* ioRequest)
  1074. {
  1075.     BASE_EXT_DECL
  1076.     register BOOL res __asm("d0");
  1077.     register void *a6 __asm ("a6");
  1078.     register struct IORequest* a1 __asm("a1");
  1079.  
  1080.     a6 = BASE_NAME;
  1081.     a1 = ioRequest;
  1082.     __asm volatile ("
  1083.     jsr a6@(-0x1d4)"
  1084.     : "=g" (res)
  1085.     : "g" (a6), "g" (a1)
  1086.     : "d0", "d1", "a0", "a1");
  1087.     return res;
  1088. }
  1089. __inline static BYTE WaitIO(BASE_PAR_DECL struct IORequest* ioRequest)
  1090. {
  1091.     BASE_EXT_DECL
  1092.     register BYTE res __asm("d0");
  1093.     register void *a6 __asm ("a6");
  1094.     register struct IORequest* a1 __asm("a1");
  1095.  
  1096.     a6 = BASE_NAME;
  1097.     a1 = ioRequest;
  1098.     __asm volatile ("
  1099.     jsr a6@(-0x1da)"
  1100.     : "=g" (res)
  1101.     : "g" (a6), "g" (a1)
  1102.     : "d0", "d1", "a0", "a1");
  1103.     return res;
  1104. }
  1105. __inline static void AbortIO(BASE_PAR_DECL struct IORequest* ioRequest)
  1106. {
  1107.     BASE_EXT_DECL
  1108.     register void *a6 __asm ("a6");
  1109.     register struct IORequest* a1 __asm("a1");
  1110.  
  1111.     a6 = BASE_NAME;
  1112.     a1 = ioRequest;
  1113.     __asm volatile ("
  1114.     jsr a6@(-0x1e0)"
  1115.     : /* no output */
  1116.     : "g" (a6), "g" (a1)
  1117.     : "d0", "d1", "a0", "a1");
  1118. }
  1119. __inline static void AddResource(BASE_PAR_DECL APTR resource)
  1120. {
  1121.     BASE_EXT_DECL
  1122.     register void *a6 __asm ("a6");
  1123.     register APTR a1 __asm("a1");
  1124.  
  1125.     a6 = BASE_NAME;
  1126.     a1 = resource;
  1127.     __asm volatile ("
  1128.     jsr a6@(-0x1e6)"
  1129.     : /* no output */
  1130.     : "g" (a6), "g" (a1)
  1131.     : "d0", "d1", "a0", "a1");
  1132. }
  1133. __inline static void RemResource(BASE_PAR_DECL APTR resource)
  1134. {
  1135.     BASE_EXT_DECL
  1136.     register void *a6 __asm ("a6");
  1137.     register APTR a1 __asm("a1");
  1138.  
  1139.     a6 = BASE_NAME;
  1140.     a1 = resource;
  1141.     __asm volatile ("
  1142.     jsr a6@(-0x1ec)"
  1143.     : /* no output */
  1144.     : "g" (a6), "g" (a1)
  1145.     : "d0", "d1", "a0", "a1");
  1146. }
  1147. __inline static APTR OpenResource(BASE_PAR_DECL UBYTE* resName)
  1148. {
  1149.     BASE_EXT_DECL
  1150.     register APTR res __asm("d0");
  1151.     register void *a6 __asm ("a6");
  1152.     register UBYTE* a1 __asm("a1");
  1153.  
  1154.     a6 = BASE_NAME;
  1155.     a1 = resName;
  1156.     __asm volatile ("
  1157.     jsr a6@(-0x1f2)"
  1158.     : "=g" (res)
  1159.     : "g" (a6), "g" (a1)
  1160.     : "d0", "d1", "a0", "a1");
  1161.     return res;
  1162. }
  1163. #ifdef PRIVATE
  1164. #endif
  1165. __inline static void RawDoFmt(BASE_PAR_DECL UBYTE* formatString, APTR dataStream, void (*putChProc)(), APTR putChData)
  1166. {
  1167.     BASE_EXT_DECL
  1168.     register void *a6 __asm ("a6");
  1169.     register UBYTE* a0 __asm("a0");
  1170.     register APTR a1 __asm("a1");
  1171.     register void (*a2)() __asm("a2");
  1172.     register APTR a3 __asm("a3");
  1173.  
  1174.     a6 = BASE_NAME;
  1175.     a0 = formatString;
  1176.     a1 = dataStream;
  1177.     a2 = putChProc;
  1178.     a3 = putChData;
  1179.     __asm volatile ("
  1180.     jsr a6@(-0x20a)"
  1181.     : /* no output */
  1182.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2), "g" (a3)
  1183.     : "d0", "d1", "a0", "a1", "a2", "a3");
  1184. }
  1185. __inline static ULONG GetCC(BASE_PAR_DECL0)
  1186. {
  1187.     BASE_EXT_DECL
  1188.     register ULONG res __asm("d0");
  1189.     register void *a6 __asm ("a6");
  1190.     a6 = BASE_NAME;
  1191.     __asm volatile ("
  1192.     jsr a6@(-0x210)"
  1193.     : "=g" (res)
  1194.     : "g" (a6)
  1195.     : "d0", "d1", "a0", "a1");
  1196.     return res;
  1197. }
  1198. __inline static ULONG TypeOfMem(BASE_PAR_DECL APTR address)
  1199. {
  1200.     BASE_EXT_DECL
  1201.     register ULONG res __asm("d0");
  1202.     register void *a6 __asm ("a6");
  1203.     register APTR a1 __asm("a1");
  1204.  
  1205.     a6 = BASE_NAME;
  1206.     a1 = address;
  1207.     __asm volatile ("
  1208.     jsr a6@(-0x216)"
  1209.     : "=g" (res)
  1210.     : "g" (a6), "g" (a1)
  1211.     : "d0", "d1", "a0", "a1");
  1212.     return res;
  1213. }
  1214. __inline static ULONG Procure(BASE_PAR_DECL struct Semaphore* semaport, struct Message* bidMsg)
  1215. {
  1216.     BASE_EXT_DECL
  1217.     register ULONG res __asm("d0");
  1218.     register void *a6 __asm ("a6");
  1219.     register struct Semaphore* a0 __asm("a0");
  1220.     register struct Message* a1 __asm("a1");
  1221.  
  1222.     a6 = BASE_NAME;
  1223.     a0 = semaport;
  1224.     a1 = bidMsg;
  1225.     __asm volatile ("
  1226.     jsr a6@(-0x21c)"
  1227.     : "=g" (res)
  1228.     : "g" (a6), "g" (a0), "g" (a1)
  1229.     : "d0", "d1", "a0", "a1");
  1230.     return res;
  1231. }
  1232. __inline static void Vacate(BASE_PAR_DECL struct Semaphore* semaport)
  1233. {
  1234.     BASE_EXT_DECL
  1235.     register void *a6 __asm ("a6");
  1236.     register struct Semaphore* a0 __asm("a0");
  1237.  
  1238.     a6 = BASE_NAME;
  1239.     a0 = semaport;
  1240.     __asm volatile ("
  1241.     jsr a6@(-0x222)"
  1242.     : /* no output */
  1243.     : "g" (a6), "g" (a0)
  1244.     : "d0", "d1", "a0", "a1");
  1245. }
  1246. __inline static struct Library* OpenLibrary(BASE_PAR_DECL UBYTE* libName, long unsigned int version)
  1247. {
  1248.     BASE_EXT_DECL
  1249.     register struct Library* res __asm("d0");
  1250.     register void *a6 __asm ("a6");
  1251.     register UBYTE* a1 __asm("a1");
  1252.     register long unsigned int d0 __asm("d0");
  1253.  
  1254.     a6 = BASE_NAME;
  1255.     a1 = libName;
  1256.     d0 = version;
  1257.     __asm volatile ("
  1258.     jsr a6@(-0x228)"
  1259.     : "=g" (res)
  1260.     : "g" (a6), "g" (a1), "g" (d0)
  1261.     : "d0", "d1", "a0", "a1");
  1262.     return res;
  1263. }
  1264. __inline static void InitSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1265. {
  1266.     BASE_EXT_DECL
  1267.     register void *a6 __asm ("a6");
  1268.     register struct SignalSemaphore* a0 __asm("a0");
  1269.  
  1270.     a6 = BASE_NAME;
  1271.     a0 = sigSem;
  1272.     __asm volatile ("
  1273.     jsr a6@(-0x22e)"
  1274.     : /* no output */
  1275.     : "g" (a6), "g" (a0)
  1276.     : "d0", "d1", "a0", "a1");
  1277. }
  1278. __inline static void ObtainSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1279. {
  1280.     BASE_EXT_DECL
  1281.     register void *a6 __asm ("a6");
  1282.     register struct SignalSemaphore* a0 __asm("a0");
  1283.  
  1284.     a6 = BASE_NAME;
  1285.     a0 = sigSem;
  1286.     __asm volatile ("
  1287.     jsr a6@(-0x234)"
  1288.     : /* no output */
  1289.     : "g" (a6), "g" (a0)
  1290.     : "d0", "d1", "a0", "a1");
  1291. }
  1292. __inline static void ReleaseSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1293. {
  1294.     BASE_EXT_DECL
  1295.     register void *a6 __asm ("a6");
  1296.     register struct SignalSemaphore* a0 __asm("a0");
  1297.  
  1298.     a6 = BASE_NAME;
  1299.     a0 = sigSem;
  1300.     __asm volatile ("
  1301.     jsr a6@(-0x23a)"
  1302.     : /* no output */
  1303.     : "g" (a6), "g" (a0)
  1304.     : "d0", "d1", "a0", "a1");
  1305. }
  1306. __inline static ULONG AttemptSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1307. {
  1308.     BASE_EXT_DECL
  1309.     register ULONG res __asm("d0");
  1310.     register void *a6 __asm ("a6");
  1311.     register struct SignalSemaphore* a0 __asm("a0");
  1312.  
  1313.     a6 = BASE_NAME;
  1314.     a0 = sigSem;
  1315.     __asm volatile ("
  1316.     jsr a6@(-0x240)"
  1317.     : "=g" (res)
  1318.     : "g" (a6), "g" (a0)
  1319.     : "d0", "d1", "a0", "a1");
  1320.     return res;
  1321. }
  1322. __inline static void ObtainSemaphoreList(BASE_PAR_DECL struct List* sigSem)
  1323. {
  1324.     BASE_EXT_DECL
  1325.     register void *a6 __asm ("a6");
  1326.     register struct List* a0 __asm("a0");
  1327.  
  1328.     a6 = BASE_NAME;
  1329.     a0 = sigSem;
  1330.     __asm volatile ("
  1331.     jsr a6@(-0x246)"
  1332.     : /* no output */
  1333.     : "g" (a6), "g" (a0)
  1334.     : "d0", "d1", "a0", "a1");
  1335. }
  1336. __inline static void ReleaseSemaphoreList(BASE_PAR_DECL struct List* sigSem)
  1337. {
  1338.     BASE_EXT_DECL
  1339.     register void *a6 __asm ("a6");
  1340.     register struct List* a0 __asm("a0");
  1341.  
  1342.     a6 = BASE_NAME;
  1343.     a0 = sigSem;
  1344.     __asm volatile ("
  1345.     jsr a6@(-0x24c)"
  1346.     : /* no output */
  1347.     : "g" (a6), "g" (a0)
  1348.     : "d0", "d1", "a0", "a1");
  1349. }
  1350. __inline static struct SignalSemaphore* FindSemaphore(BASE_PAR_DECL UBYTE* sigSem)
  1351. {
  1352.     BASE_EXT_DECL
  1353.     register struct SignalSemaphore* res __asm("d0");
  1354.     register void *a6 __asm ("a6");
  1355.     register UBYTE* a1 __asm("a1");
  1356.  
  1357.     a6 = BASE_NAME;
  1358.     a1 = sigSem;
  1359.     __asm volatile ("
  1360.     jsr a6@(-0x252)"
  1361.     : "=g" (res)
  1362.     : "g" (a6), "g" (a1)
  1363.     : "d0", "d1", "a0", "a1");
  1364.     return res;
  1365. }
  1366. __inline static void AddSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1367. {
  1368.     BASE_EXT_DECL
  1369.     register void *a6 __asm ("a6");
  1370.     register struct SignalSemaphore* a1 __asm("a1");
  1371.  
  1372.     a6 = BASE_NAME;
  1373.     a1 = sigSem;
  1374.     __asm volatile ("
  1375.     jsr a6@(-0x258)"
  1376.     : /* no output */
  1377.     : "g" (a6), "g" (a1)
  1378.     : "d0", "d1", "a0", "a1");
  1379. }
  1380. __inline static void RemSemaphore(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1381. {
  1382.     BASE_EXT_DECL
  1383.     register void *a6 __asm ("a6");
  1384.     register struct SignalSemaphore* a1 __asm("a1");
  1385.  
  1386.     a6 = BASE_NAME;
  1387.     a1 = sigSem;
  1388.     __asm volatile ("
  1389.     jsr a6@(-0x25e)"
  1390.     : /* no output */
  1391.     : "g" (a6), "g" (a1)
  1392.     : "d0", "d1", "a0", "a1");
  1393. }
  1394. __inline static ULONG SumKickData(BASE_PAR_DECL0)
  1395. {
  1396.     BASE_EXT_DECL
  1397.     register ULONG res __asm("d0");
  1398.     register void *a6 __asm ("a6");
  1399.     a6 = BASE_NAME;
  1400.     __asm volatile ("
  1401.     jsr a6@(-0x264)"
  1402.     : "=g" (res)
  1403.     : "g" (a6)
  1404.     : "d0", "d1", "a0", "a1");
  1405.     return res;
  1406. }
  1407. __inline static ULONG AddMemList(BASE_PAR_DECL long unsigned int size, long unsigned int attributes, long unsigned int pri, APTR base, UBYTE* name)
  1408. {
  1409.     BASE_EXT_DECL
  1410.     register ULONG res __asm("d0");
  1411.     register void *a6 __asm ("a6");
  1412.     register long unsigned int d0 __asm("d0");
  1413.     register long unsigned int d1 __asm("d1");
  1414.     register long unsigned int d2 __asm("d2");
  1415.     register APTR a0 __asm("a0");
  1416.     register UBYTE* a1 __asm("a1");
  1417.  
  1418.     a6 = BASE_NAME;
  1419.     d0 = size;
  1420.     d1 = attributes;
  1421.     d2 = pri;
  1422.     a0 = base;
  1423.     a1 = name;
  1424.     __asm volatile ("
  1425.     jsr a6@(-0x26a)"
  1426.     : "=g" (res)
  1427.     : "g" (a6), "g" (d0), "g" (d1), "g" (d2), "g" (a0), "g" (a1)
  1428.     : "d0", "d1", "a0", "a1", "d2");
  1429.     return res;
  1430. }
  1431. __inline static void CopyMem(BASE_PAR_DECL APTR source, APTR dest, long unsigned int size)
  1432. {
  1433.     BASE_EXT_DECL
  1434.     register void *a6 __asm ("a6");
  1435.     register APTR a0 __asm("a0");
  1436.     register APTR a1 __asm("a1");
  1437.     register long unsigned int d0 __asm("d0");
  1438.  
  1439.     a6 = BASE_NAME;
  1440.     a0 = source;
  1441.     a1 = dest;
  1442.     d0 = size;
  1443.     __asm volatile ("
  1444.     jsr a6@(-0x270)"
  1445.     : /* no output */
  1446.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  1447.     : "d0", "d1", "a0", "a1");
  1448. }
  1449. __inline static void CopyMemQuick(BASE_PAR_DECL APTR source, APTR dest, long unsigned int size)
  1450. {
  1451.     BASE_EXT_DECL
  1452.     register void *a6 __asm ("a6");
  1453.     register APTR a0 __asm("a0");
  1454.     register APTR a1 __asm("a1");
  1455.     register long unsigned int d0 __asm("d0");
  1456.  
  1457.     a6 = BASE_NAME;
  1458.     a0 = source;
  1459.     a1 = dest;
  1460.     d0 = size;
  1461.     __asm volatile ("
  1462.     jsr a6@(-0x276)"
  1463.     : /* no output */
  1464.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  1465.     : "d0", "d1", "a0", "a1");
  1466. }
  1467. __inline static void CacheClearU(BASE_PAR_DECL0)
  1468. {
  1469.     BASE_EXT_DECL
  1470.     register void *a6 __asm ("a6");
  1471.     a6 = BASE_NAME;
  1472.     __asm volatile ("
  1473.     jsr a6@(-0x27c)"
  1474.     : /* no output */
  1475.     : "g" (a6)
  1476.     : "d0", "d1", "a0", "a1");
  1477. }
  1478. __inline static void CacheClearE(BASE_PAR_DECL APTR address, long unsigned int length, long unsigned int caches)
  1479. {
  1480.     BASE_EXT_DECL
  1481.     register void *a6 __asm ("a6");
  1482.     register APTR a0 __asm("a0");
  1483.     register long unsigned int d0 __asm("d0");
  1484.     register long unsigned int d1 __asm("d1");
  1485.  
  1486.     a6 = BASE_NAME;
  1487.     a0 = address;
  1488.     d0 = length;
  1489.     d1 = caches;
  1490.     __asm volatile ("
  1491.     jsr a6@(-0x282)"
  1492.     : /* no output */
  1493.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  1494.     : "d0", "d1", "a0", "a1");
  1495. }
  1496. __inline static ULONG CacheControl(BASE_PAR_DECL long unsigned int cacheBits, long unsigned int cacheMask)
  1497. {
  1498.     BASE_EXT_DECL
  1499.     register ULONG res __asm("d0");
  1500.     register void *a6 __asm ("a6");
  1501.     register long unsigned int d0 __asm("d0");
  1502.     register long unsigned int d1 __asm("d1");
  1503.  
  1504.     a6 = BASE_NAME;
  1505.     d0 = cacheBits;
  1506.     d1 = cacheMask;
  1507.     __asm volatile ("
  1508.     jsr a6@(-0x288)"
  1509.     : "=g" (res)
  1510.     : "g" (a6), "g" (d0), "g" (d1)
  1511.     : "d0", "d1", "a0", "a1");
  1512.     return res;
  1513. }
  1514. __inline static APTR CreateIORequest(BASE_PAR_DECL struct MsgPort* port, long unsigned int size)
  1515. {
  1516.     BASE_EXT_DECL
  1517.     register APTR res __asm("d0");
  1518.     register void *a6 __asm ("a6");
  1519.     register struct MsgPort* a0 __asm("a0");
  1520.     register long unsigned int d0 __asm("d0");
  1521.  
  1522.     a6 = BASE_NAME;
  1523.     a0 = port;
  1524.     d0 = size;
  1525.     __asm volatile ("
  1526.     jsr a6@(-0x28e)"
  1527.     : "=g" (res)
  1528.     : "g" (a6), "g" (a0), "g" (d0)
  1529.     : "d0", "d1", "a0", "a1");
  1530.     return res;
  1531. }
  1532. __inline static void DeleteIORequest(BASE_PAR_DECL APTR iorequest)
  1533. {
  1534.     BASE_EXT_DECL
  1535.     register void *a6 __asm ("a6");
  1536.     register APTR a0 __asm("a0");
  1537.  
  1538.     a6 = BASE_NAME;
  1539.     a0 = iorequest;
  1540.     __asm volatile ("
  1541.     jsr a6@(-0x294)"
  1542.     : /* no output */
  1543.     : "g" (a6), "g" (a0)
  1544.     : "d0", "d1", "a0", "a1");
  1545. }
  1546. __inline static struct MsgPort* CreateMsgPort(BASE_PAR_DECL0)
  1547. {
  1548.     BASE_EXT_DECL
  1549.     register struct MsgPort* res __asm("d0");
  1550.     register void *a6 __asm ("a6");
  1551.     a6 = BASE_NAME;
  1552.     __asm volatile ("
  1553.     jsr a6@(-0x29a)"
  1554.     : "=g" (res)
  1555.     : "g" (a6)
  1556.     : "d0", "d1", "a0", "a1");
  1557.     return res;
  1558. }
  1559. __inline static void DeleteMsgPort(BASE_PAR_DECL struct MsgPort* port)
  1560. {
  1561.     BASE_EXT_DECL
  1562.     register void *a6 __asm ("a6");
  1563.     register struct MsgPort* a0 __asm("a0");
  1564.  
  1565.     a6 = BASE_NAME;
  1566.     a0 = port;
  1567.     __asm volatile ("
  1568.     jsr a6@(-0x2a0)"
  1569.     : /* no output */
  1570.     : "g" (a6), "g" (a0)
  1571.     : "d0", "d1", "a0", "a1");
  1572. }
  1573. __inline static void ObtainSemaphoreShared(BASE_PAR_DECL struct SignalSemaphore* sigSem)
  1574. {
  1575.     BASE_EXT_DECL
  1576.     register void *a6 __asm ("a6");
  1577.     register struct SignalSemaphore* a0 __asm("a0");
  1578.  
  1579.     a6 = BASE_NAME;
  1580.     a0 = sigSem;
  1581.     __asm volatile ("
  1582.     jsr a6@(-0x2a6)"
  1583.     : /* no output */
  1584.     : "g" (a6), "g" (a0)
  1585.     : "d0", "d1", "a0", "a1");
  1586. }
  1587. __inline static APTR AllocVec(BASE_PAR_DECL long unsigned int byteSize, long unsigned int requirements)
  1588. {
  1589.     BASE_EXT_DECL
  1590.     register APTR res __asm("d0");
  1591.     register void *a6 __asm ("a6");
  1592.     register long unsigned int d0 __asm("d0");
  1593.     register long unsigned int d1 __asm("d1");
  1594.  
  1595.     a6 = BASE_NAME;
  1596.     d0 = byteSize;
  1597.     d1 = requirements;
  1598.     __asm volatile ("
  1599.     jsr a6@(-0x2ac)"
  1600.     : "=g" (res)
  1601.     : "g" (a6), "g" (d0), "g" (d1)
  1602.     : "d0", "d1", "a0", "a1");
  1603.     return res;
  1604. }
  1605. __inline static void FreeVec(BASE_PAR_DECL APTR memoryBlock)
  1606. {
  1607.     BASE_EXT_DECL
  1608.     register void *a6 __asm ("a6");
  1609.     register APTR a1 __asm("a1");
  1610.  
  1611.     a6 = BASE_NAME;
  1612.     a1 = memoryBlock;
  1613.     __asm volatile ("
  1614.     jsr a6@(-0x2b2)"
  1615.     : /* no output */
  1616.     : "g" (a6), "g" (a1)
  1617.     : "d0", "d1", "a0", "a1");
  1618. }
  1619. __inline static APTR CreatePrivatePool(BASE_PAR_DECL long unsigned int requirements, long unsigned int puddleSize, long unsigned int puddleThresh)
  1620. {
  1621.     BASE_EXT_DECL
  1622.     register APTR res __asm("d0");
  1623.     register void *a6 __asm ("a6");
  1624.     register long unsigned int d0 __asm("d0");
  1625.     register long unsigned int d1 __asm("d1");
  1626.     register long unsigned int d2 __asm("d2");
  1627.  
  1628.     a6 = BASE_NAME;
  1629.     d0 = requirements;
  1630.     d1 = puddleSize;
  1631.     d2 = puddleThresh;
  1632.     __asm volatile ("
  1633.     jsr a6@(-0x2b8)"
  1634.     : "=g" (res)
  1635.     : "g" (a6), "g" (d0), "g" (d1), "g" (d2)
  1636.     : "d0", "d1", "a0", "a1", "d2");
  1637.     return res;
  1638. }
  1639. __inline static void DeletePrivatePool(BASE_PAR_DECL APTR poolHeader)
  1640. {
  1641.     BASE_EXT_DECL
  1642.     register void *a6 __asm ("a6");
  1643.     register APTR a0 __asm("a0");
  1644.  
  1645.     a6 = BASE_NAME;
  1646.     a0 = poolHeader;
  1647.     __asm volatile ("
  1648.     jsr a6@(-0x2be)"
  1649.     : /* no output */
  1650.     : "g" (a6), "g" (a0)
  1651.     : "d0", "d1", "a0", "a1");
  1652. }
  1653. __inline static APTR AllocPooled(BASE_PAR_DECL long unsigned int memSize, APTR poolHeader)
  1654. {
  1655.     BASE_EXT_DECL
  1656.     register APTR res __asm("d0");
  1657.     register void *a6 __asm ("a6");
  1658.     register long unsigned int d0 __asm("d0");
  1659.     register APTR a0 __asm("a0");
  1660.  
  1661.     a6 = BASE_NAME;
  1662.     d0 = memSize;
  1663.     a0 = poolHeader;
  1664.     __asm volatile ("
  1665.     jsr a6@(-0x2c4)"
  1666.     : "=g" (res)
  1667.     : "g" (a6), "g" (d0), "g" (a0)
  1668.     : "d0", "d1", "a0", "a1");
  1669.     return res;
  1670. }
  1671. __inline static void FreePooled(BASE_PAR_DECL APTR memory, APTR poolHeader)
  1672. {
  1673.     BASE_EXT_DECL
  1674.     register void *a6 __asm ("a6");
  1675.     register APTR a1 __asm("a1");
  1676.     register APTR a0 __asm("a0");
  1677.  
  1678.     a6 = BASE_NAME;
  1679.     a1 = memory;
  1680.     a0 = poolHeader;
  1681.     __asm volatile ("
  1682.     jsr a6@(-0x2ca)"
  1683.     : /* no output */
  1684.     : "g" (a6), "g" (a1), "g" (a0)
  1685.     : "d0", "d1", "a0", "a1");
  1686. }
  1687. __inline static void ColdReboot(BASE_PAR_DECL0)
  1688. {
  1689.     BASE_EXT_DECL
  1690.     register void *a6 __asm ("a6");
  1691.     a6 = BASE_NAME;
  1692.     __asm volatile ("
  1693.     jsr a6@(-0x2d6)"
  1694.     : /* no output */
  1695.     : "g" (a6)
  1696.     : "d0", "d1", "a0", "a1");
  1697. }
  1698. __inline static void StackSwap(BASE_PAR_DECL APTR newSize, APTR newSP, APTR newStack)
  1699. {
  1700.     BASE_EXT_DECL
  1701.     register void *a6 __asm ("a6");
  1702.     register APTR d0 __asm("d0");
  1703.     register APTR d1 __asm("d1");
  1704.     register APTR a0 __asm("a0");
  1705.  
  1706.     a6 = BASE_NAME;
  1707.     d0 = newSize;
  1708.     d1 = newSP;
  1709.     a0 = newStack;
  1710.     __asm volatile ("
  1711.     jsr a6@(-0x2dc)"
  1712.     : /* no output */
  1713.     : "g" (a6), "g" (d0), "g" (d1), "g" (a0)
  1714.     : "d0", "d1", "a0", "a1");
  1715. }
  1716. __inline static void ChildFree(BASE_PAR_DECL APTR tid)
  1717. {
  1718.     BASE_EXT_DECL
  1719.     register void *a6 __asm ("a6");
  1720.     register APTR d0 __asm("d0");
  1721.  
  1722.     a6 = BASE_NAME;
  1723.     d0 = tid;
  1724.     __asm volatile ("
  1725.     jsr a6@(-0x2e2)"
  1726.     : /* no output */
  1727.     : "g" (a6), "g" (d0)
  1728.     : "d0", "d1", "a0", "a1");
  1729. }
  1730. __inline static void ChildOrphan(BASE_PAR_DECL APTR tid)
  1731. {
  1732.     BASE_EXT_DECL
  1733.     register void *a6 __asm ("a6");
  1734.     register APTR d0 __asm("d0");
  1735.  
  1736.     a6 = BASE_NAME;
  1737.     d0 = tid;
  1738.     __asm volatile ("
  1739.     jsr a6@(-0x2e8)"
  1740.     : /* no output */
  1741.     : "g" (a6), "g" (d0)
  1742.     : "d0", "d1", "a0", "a1");
  1743. }
  1744. __inline static void ChildStatus(BASE_PAR_DECL APTR tid)
  1745. {
  1746.     BASE_EXT_DECL
  1747.     register void *a6 __asm ("a6");
  1748.     register APTR d0 __asm("d0");
  1749.  
  1750.     a6 = BASE_NAME;
  1751.     d0 = tid;
  1752.     __asm volatile ("
  1753.     jsr a6@(-0x2ee)"
  1754.     : /* no output */
  1755.     : "g" (a6), "g" (d0)
  1756.     : "d0", "d1", "a0", "a1");
  1757. }
  1758. __inline static void ChildWait(BASE_PAR_DECL APTR tid)
  1759. {
  1760.     BASE_EXT_DECL
  1761.     register void *a6 __asm ("a6");
  1762.     register APTR d0 __asm("d0");
  1763.  
  1764.     a6 = BASE_NAME;
  1765.     d0 = tid;
  1766.     __asm volatile ("
  1767.     jsr a6@(-0x2f4)"
  1768.     : /* no output */
  1769.     : "g" (a6), "g" (d0)
  1770.     : "d0", "d1", "a0", "a1");
  1771. }
  1772. #ifdef PRIVATE
  1773. #endif
  1774. __inline static struct List *NewList(struct List *list)
  1775. {
  1776.   list->lh_Tail = NULL;
  1777.   list->lh_TailPred = (struct Node *)list;
  1778.   list->lh_Head = (struct Node *)&list->lh_Tail;
  1779. }
  1780. #undef BASE_EXT_DECL
  1781. #undef BASE_PAR_DECL
  1782. #undef BASE_PAR_DECL0
  1783. #undef BASE_NAME
  1784.