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

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL extern struct IFFParseBase * IFFParseBase;
  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 IFFParseBase
  11. #endif
  12. __inline static struct IFFHandle* AllocIFF(BASE_PAR_DECL0)
  13. {
  14.     BASE_EXT_DECL
  15.     register struct IFFHandle* 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 LONG OpenIFF(BASE_PAR_DECL struct IFFHandle* iff, long int rwMode)
  26. {
  27.     BASE_EXT_DECL
  28.     register LONG res __asm("d0");
  29.     register void *a6 __asm ("a6");
  30.     register struct IFFHandle* a0 __asm("a0");
  31.     register long int d0 __asm("d0");
  32.  
  33.     a6 = BASE_NAME;
  34.     a0 = iff;
  35.     d0 = rwMode;
  36.     __asm volatile ("
  37.     jsr a6@(-0x24)"
  38.     : "=g" (res)
  39.     : "g" (a6), "g" (a0), "g" (d0)
  40.     : "d0", "d1", "a0", "a1");
  41.     return res;
  42. }
  43. __inline static LONG ParseIFF(BASE_PAR_DECL struct IFFHandle* iff, long int control)
  44. {
  45.     BASE_EXT_DECL
  46.     register LONG res __asm("d0");
  47.     register void *a6 __asm ("a6");
  48.     register struct IFFHandle* a0 __asm("a0");
  49.     register long int d0 __asm("d0");
  50.  
  51.     a6 = BASE_NAME;
  52.     a0 = iff;
  53.     d0 = control;
  54.     __asm volatile ("
  55.     jsr a6@(-0x2a)"
  56.     : "=g" (res)
  57.     : "g" (a6), "g" (a0), "g" (d0)
  58.     : "d0", "d1", "a0", "a1");
  59.     return res;
  60. }
  61. __inline static void CloseIFF(BASE_PAR_DECL struct IFFHandle* iff)
  62. {
  63.     BASE_EXT_DECL
  64.     register void *a6 __asm ("a6");
  65.     register struct IFFHandle* a0 __asm("a0");
  66.  
  67.     a6 = BASE_NAME;
  68.     a0 = iff;
  69.     __asm volatile ("
  70.     jsr a6@(-0x30)"
  71.     : /* no output */
  72.     : "g" (a6), "g" (a0)
  73.     : "d0", "d1", "a0", "a1");
  74. }
  75. __inline static void FreeIFF(BASE_PAR_DECL struct IFFHandle* iff)
  76. {
  77.     BASE_EXT_DECL
  78.     register void *a6 __asm ("a6");
  79.     register struct IFFHandle* a0 __asm("a0");
  80.  
  81.     a6 = BASE_NAME;
  82.     a0 = iff;
  83.     __asm volatile ("
  84.     jsr a6@(-0x36)"
  85.     : /* no output */
  86.     : "g" (a6), "g" (a0)
  87.     : "d0", "d1", "a0", "a1");
  88. }
  89. __inline static LONG ReadChunkBytes(BASE_PAR_DECL struct IFFHandle* iff, APTR buf, long int size)
  90. {
  91.     BASE_EXT_DECL
  92.     register LONG res __asm("d0");
  93.     register void *a6 __asm ("a6");
  94.     register struct IFFHandle* a0 __asm("a0");
  95.     register APTR a1 __asm("a1");
  96.     register long int d0 __asm("d0");
  97.  
  98.     a6 = BASE_NAME;
  99.     a0 = iff;
  100.     a1 = buf;
  101.     d0 = size;
  102.     __asm volatile ("
  103.     jsr a6@(-0x3c)"
  104.     : "=g" (res)
  105.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  106.     : "d0", "d1", "a0", "a1");
  107.     return res;
  108. }
  109. __inline static LONG WriteChunkBytes(BASE_PAR_DECL struct IFFHandle* iff, APTR buf, long int size)
  110. {
  111.     BASE_EXT_DECL
  112.     register LONG res __asm("d0");
  113.     register void *a6 __asm ("a6");
  114.     register struct IFFHandle* a0 __asm("a0");
  115.     register APTR a1 __asm("a1");
  116.     register long int d0 __asm("d0");
  117.  
  118.     a6 = BASE_NAME;
  119.     a0 = iff;
  120.     a1 = buf;
  121.     d0 = size;
  122.     __asm volatile ("
  123.     jsr a6@(-0x42)"
  124.     : "=g" (res)
  125.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  126.     : "d0", "d1", "a0", "a1");
  127.     return res;
  128. }
  129. __inline static LONG ReadChunkRecords(BASE_PAR_DECL struct IFFHandle* iff, APTR buf, long int bytesPerRecord, long int nRecords)
  130. {
  131.     BASE_EXT_DECL
  132.     register LONG res __asm("d0");
  133.     register void *a6 __asm ("a6");
  134.     register struct IFFHandle* a0 __asm("a0");
  135.     register APTR a1 __asm("a1");
  136.     register long int d0 __asm("d0");
  137.     register long int d1 __asm("d1");
  138.  
  139.     a6 = BASE_NAME;
  140.     a0 = iff;
  141.     a1 = buf;
  142.     d0 = bytesPerRecord;
  143.     d1 = nRecords;
  144.     __asm volatile ("
  145.     jsr a6@(-0x48)"
  146.     : "=g" (res)
  147.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1)
  148.     : "d0", "d1", "a0", "a1");
  149.     return res;
  150. }
  151. __inline static LONG WriteChunkRecords(BASE_PAR_DECL struct IFFHandle* iff, APTR buf, long int bytesPerRecord, long int nRecords)
  152. {
  153.     BASE_EXT_DECL
  154.     register LONG res __asm("d0");
  155.     register void *a6 __asm ("a6");
  156.     register struct IFFHandle* a0 __asm("a0");
  157.     register APTR a1 __asm("a1");
  158.     register long int d0 __asm("d0");
  159.     register long int d1 __asm("d1");
  160.  
  161.     a6 = BASE_NAME;
  162.     a0 = iff;
  163.     a1 = buf;
  164.     d0 = bytesPerRecord;
  165.     d1 = nRecords;
  166.     __asm volatile ("
  167.     jsr a6@(-0x4e)"
  168.     : "=g" (res)
  169.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1)
  170.     : "d0", "d1", "a0", "a1");
  171.     return res;
  172. }
  173. __inline static LONG PushChunk(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id, long int size)
  174. {
  175.     BASE_EXT_DECL
  176.     register LONG res __asm("d0");
  177.     register void *a6 __asm ("a6");
  178.     register struct IFFHandle* a0 __asm("a0");
  179.     register long int d0 __asm("d0");
  180.     register long int d1 __asm("d1");
  181.     register long int d2 __asm("d2");
  182.  
  183.     a6 = BASE_NAME;
  184.     a0 = iff;
  185.     d0 = type;
  186.     d1 = id;
  187.     d2 = size;
  188.     __asm volatile ("
  189.     jsr a6@(-0x54)"
  190.     : "=g" (res)
  191.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (d2)
  192.     : "d0", "d1", "a0", "a1", "d2");
  193.     return res;
  194. }
  195. __inline static LONG PopChunk(BASE_PAR_DECL struct IFFHandle* iff)
  196. {
  197.     BASE_EXT_DECL
  198.     register LONG res __asm("d0");
  199.     register void *a6 __asm ("a6");
  200.     register struct IFFHandle* a0 __asm("a0");
  201.  
  202.     a6 = BASE_NAME;
  203.     a0 = iff;
  204.     __asm volatile ("
  205.     jsr a6@(-0x5a)"
  206.     : "=g" (res)
  207.     : "g" (a6), "g" (a0)
  208.     : "d0", "d1", "a0", "a1");
  209.     return res;
  210. }
  211. __inline static LONG EntryHandler(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id, long int position, struct Hook* handler, APTR object)
  212. {
  213.     BASE_EXT_DECL
  214.     register LONG res __asm("d0");
  215.     register void *a6 __asm ("a6");
  216.     register struct IFFHandle* a0 __asm("a0");
  217.     register long int d0 __asm("d0");
  218.     register long int d1 __asm("d1");
  219.     register long int d2 __asm("d2");
  220.     register struct Hook* a1 __asm("a1");
  221.     register APTR a2 __asm("a2");
  222.  
  223.     a6 = BASE_NAME;
  224.     a0 = iff;
  225.     d0 = type;
  226.     d1 = id;
  227.     d2 = position;
  228.     a1 = handler;
  229.     a2 = object;
  230.     __asm volatile ("
  231.     jsr a6@(-0x66)"
  232.     : "=g" (res)
  233.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (d2), "g" (a1), "g" (a2)
  234.     : "d0", "d1", "a0", "a1", "d2", "a2");
  235.     return res;
  236. }
  237. __inline static LONG ExitHandler(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id, long int position, struct Hook* handler, APTR object)
  238. {
  239.     BASE_EXT_DECL
  240.     register LONG res __asm("d0");
  241.     register void *a6 __asm ("a6");
  242.     register struct IFFHandle* a0 __asm("a0");
  243.     register long int d0 __asm("d0");
  244.     register long int d1 __asm("d1");
  245.     register long int d2 __asm("d2");
  246.     register struct Hook* a1 __asm("a1");
  247.     register APTR a2 __asm("a2");
  248.  
  249.     a6 = BASE_NAME;
  250.     a0 = iff;
  251.     d0 = type;
  252.     d1 = id;
  253.     d2 = position;
  254.     a1 = handler;
  255.     a2 = object;
  256.     __asm volatile ("
  257.     jsr a6@(-0x6c)"
  258.     : "=g" (res)
  259.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (d2), "g" (a1), "g" (a2)
  260.     : "d0", "d1", "a0", "a1", "d2", "a2");
  261.     return res;
  262. }
  263. __inline static LONG PropChunk(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  264. {
  265.     BASE_EXT_DECL
  266.     register LONG res __asm("d0");
  267.     register void *a6 __asm ("a6");
  268.     register struct IFFHandle* a0 __asm("a0");
  269.     register long int d0 __asm("d0");
  270.     register long int d1 __asm("d1");
  271.  
  272.     a6 = BASE_NAME;
  273.     a0 = iff;
  274.     d0 = type;
  275.     d1 = id;
  276.     __asm volatile ("
  277.     jsr a6@(-0x72)"
  278.     : "=g" (res)
  279.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  280.     : "d0", "d1", "a0", "a1");
  281.     return res;
  282. }
  283. __inline static LONG PropChunks(BASE_PAR_DECL struct IFFHandle* iff, LONG* propArray, long int nProps)
  284. {
  285.     BASE_EXT_DECL
  286.     register LONG res __asm("d0");
  287.     register void *a6 __asm ("a6");
  288.     register struct IFFHandle* a0 __asm("a0");
  289.     register LONG* a1 __asm("a1");
  290.     register long int d0 __asm("d0");
  291.  
  292.     a6 = BASE_NAME;
  293.     a0 = iff;
  294.     a1 = propArray;
  295.     d0 = nProps;
  296.     __asm volatile ("
  297.     jsr a6@(-0x78)"
  298.     : "=g" (res)
  299.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  300.     : "d0", "d1", "a0", "a1");
  301.     return res;
  302. }
  303. __inline static LONG StopChunk(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  304. {
  305.     BASE_EXT_DECL
  306.     register LONG res __asm("d0");
  307.     register void *a6 __asm ("a6");
  308.     register struct IFFHandle* a0 __asm("a0");
  309.     register long int d0 __asm("d0");
  310.     register long int d1 __asm("d1");
  311.  
  312.     a6 = BASE_NAME;
  313.     a0 = iff;
  314.     d0 = type;
  315.     d1 = id;
  316.     __asm volatile ("
  317.     jsr a6@(-0x7e)"
  318.     : "=g" (res)
  319.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  320.     : "d0", "d1", "a0", "a1");
  321.     return res;
  322. }
  323. __inline static LONG StopChunks(BASE_PAR_DECL struct IFFHandle* iff, LONG* propArray, long int nProps)
  324. {
  325.     BASE_EXT_DECL
  326.     register LONG res __asm("d0");
  327.     register void *a6 __asm ("a6");
  328.     register struct IFFHandle* a0 __asm("a0");
  329.     register LONG* a1 __asm("a1");
  330.     register long int d0 __asm("d0");
  331.  
  332.     a6 = BASE_NAME;
  333.     a0 = iff;
  334.     a1 = propArray;
  335.     d0 = nProps;
  336.     __asm volatile ("
  337.     jsr a6@(-0x84)"
  338.     : "=g" (res)
  339.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  340.     : "d0", "d1", "a0", "a1");
  341.     return res;
  342. }
  343. __inline static LONG CollectionChunk(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  344. {
  345.     BASE_EXT_DECL
  346.     register LONG res __asm("d0");
  347.     register void *a6 __asm ("a6");
  348.     register struct IFFHandle* a0 __asm("a0");
  349.     register long int d0 __asm("d0");
  350.     register long int d1 __asm("d1");
  351.  
  352.     a6 = BASE_NAME;
  353.     a0 = iff;
  354.     d0 = type;
  355.     d1 = id;
  356.     __asm volatile ("
  357.     jsr a6@(-0x8a)"
  358.     : "=g" (res)
  359.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  360.     : "d0", "d1", "a0", "a1");
  361.     return res;
  362. }
  363. __inline static LONG CollectionChunks(BASE_PAR_DECL struct IFFHandle* iff, LONG* propArray, long int nProps)
  364. {
  365.     BASE_EXT_DECL
  366.     register LONG res __asm("d0");
  367.     register void *a6 __asm ("a6");
  368.     register struct IFFHandle* a0 __asm("a0");
  369.     register LONG* a1 __asm("a1");
  370.     register long int d0 __asm("d0");
  371.  
  372.     a6 = BASE_NAME;
  373.     a0 = iff;
  374.     a1 = propArray;
  375.     d0 = nProps;
  376.     __asm volatile ("
  377.     jsr a6@(-0x90)"
  378.     : "=g" (res)
  379.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  380.     : "d0", "d1", "a0", "a1");
  381.     return res;
  382. }
  383. __inline static LONG StopOnExit(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  384. {
  385.     BASE_EXT_DECL
  386.     register LONG res __asm("d0");
  387.     register void *a6 __asm ("a6");
  388.     register struct IFFHandle* a0 __asm("a0");
  389.     register long int d0 __asm("d0");
  390.     register long int d1 __asm("d1");
  391.  
  392.     a6 = BASE_NAME;
  393.     a0 = iff;
  394.     d0 = type;
  395.     d1 = id;
  396.     __asm volatile ("
  397.     jsr a6@(-0x96)"
  398.     : "=g" (res)
  399.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  400.     : "d0", "d1", "a0", "a1");
  401.     return res;
  402. }
  403. __inline static struct StoredProperty* FindProp(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  404. {
  405.     BASE_EXT_DECL
  406.     register struct StoredProperty* res __asm("d0");
  407.     register void *a6 __asm ("a6");
  408.     register struct IFFHandle* a0 __asm("a0");
  409.     register long int d0 __asm("d0");
  410.     register long int d1 __asm("d1");
  411.  
  412.     a6 = BASE_NAME;
  413.     a0 = iff;
  414.     d0 = type;
  415.     d1 = id;
  416.     __asm volatile ("
  417.     jsr a6@(-0x9c)"
  418.     : "=g" (res)
  419.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  420.     : "d0", "d1", "a0", "a1");
  421.     return res;
  422. }
  423. __inline static struct CollectionItem* FindCollection(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id)
  424. {
  425.     BASE_EXT_DECL
  426.     register struct CollectionItem* res __asm("d0");
  427.     register void *a6 __asm ("a6");
  428.     register struct IFFHandle* a0 __asm("a0");
  429.     register long int d0 __asm("d0");
  430.     register long int d1 __asm("d1");
  431.  
  432.     a6 = BASE_NAME;
  433.     a0 = iff;
  434.     d0 = type;
  435.     d1 = id;
  436.     __asm volatile ("
  437.     jsr a6@(-0xa2)"
  438.     : "=g" (res)
  439.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  440.     : "d0", "d1", "a0", "a1");
  441.     return res;
  442. }
  443. __inline static struct ContextNode* FindPropContext(BASE_PAR_DECL struct IFFHandle* iff)
  444. {
  445.     BASE_EXT_DECL
  446.     register struct ContextNode* res __asm("d0");
  447.     register void *a6 __asm ("a6");
  448.     register struct IFFHandle* a0 __asm("a0");
  449.  
  450.     a6 = BASE_NAME;
  451.     a0 = iff;
  452.     __asm volatile ("
  453.     jsr a6@(-0xa8)"
  454.     : "=g" (res)
  455.     : "g" (a6), "g" (a0)
  456.     : "d0", "d1", "a0", "a1");
  457.     return res;
  458. }
  459. __inline static struct ContextNode* CurrentChunk(BASE_PAR_DECL struct IFFHandle* iff)
  460. {
  461.     BASE_EXT_DECL
  462.     register struct ContextNode* res __asm("d0");
  463.     register void *a6 __asm ("a6");
  464.     register struct IFFHandle* a0 __asm("a0");
  465.  
  466.     a6 = BASE_NAME;
  467.     a0 = iff;
  468.     __asm volatile ("
  469.     jsr a6@(-0xae)"
  470.     : "=g" (res)
  471.     : "g" (a6), "g" (a0)
  472.     : "d0", "d1", "a0", "a1");
  473.     return res;
  474. }
  475. __inline static struct ContextNode* ParentChunk(BASE_PAR_DECL struct ContextNode* contextNode)
  476. {
  477.     BASE_EXT_DECL
  478.     register struct ContextNode* res __asm("d0");
  479.     register void *a6 __asm ("a6");
  480.     register struct ContextNode* a0 __asm("a0");
  481.  
  482.     a6 = BASE_NAME;
  483.     a0 = contextNode;
  484.     __asm volatile ("
  485.     jsr a6@(-0xb4)"
  486.     : "=g" (res)
  487.     : "g" (a6), "g" (a0)
  488.     : "d0", "d1", "a0", "a1");
  489.     return res;
  490. }
  491. __inline static struct LocalContextItem* AllocLocalItem(BASE_PAR_DECL long int type, long int id, long int ident, long int dataSize)
  492. {
  493.     BASE_EXT_DECL
  494.     register struct LocalContextItem* res __asm("d0");
  495.     register void *a6 __asm ("a6");
  496.     register long int d0 __asm("d0");
  497.     register long int d1 __asm("d1");
  498.     register long int d2 __asm("d2");
  499.     register long int d3 __asm("d3");
  500.  
  501.     a6 = BASE_NAME;
  502.     d0 = type;
  503.     d1 = id;
  504.     d2 = ident;
  505.     d3 = dataSize;
  506.     __asm volatile ("
  507.     jsr a6@(-0xba)"
  508.     : "=g" (res)
  509.     : "g" (a6), "g" (d0), "g" (d1), "g" (d2), "g" (d3)
  510.     : "d0", "d1", "a0", "a1", "d2", "d3");
  511.     return res;
  512. }
  513. __inline static APTR LocalItemData(BASE_PAR_DECL struct LocalContextItem* localItem)
  514. {
  515.     BASE_EXT_DECL
  516.     register APTR res __asm("d0");
  517.     register void *a6 __asm ("a6");
  518.     register struct LocalContextItem* a0 __asm("a0");
  519.  
  520.     a6 = BASE_NAME;
  521.     a0 = localItem;
  522.     __asm volatile ("
  523.     jsr a6@(-0xc0)"
  524.     : "=g" (res)
  525.     : "g" (a6), "g" (a0)
  526.     : "d0", "d1", "a0", "a1");
  527.     return res;
  528. }
  529. __inline static void SetLocalItemPurge(BASE_PAR_DECL struct LocalContextItem* localItem, struct Hook* purgeHook)
  530. {
  531.     BASE_EXT_DECL
  532.     register void *a6 __asm ("a6");
  533.     register struct LocalContextItem* a0 __asm("a0");
  534.     register struct Hook* a1 __asm("a1");
  535.  
  536.     a6 = BASE_NAME;
  537.     a0 = localItem;
  538.     a1 = purgeHook;
  539.     __asm volatile ("
  540.     jsr a6@(-0xc6)"
  541.     : /* no output */
  542.     : "g" (a6), "g" (a0), "g" (a1)
  543.     : "d0", "d1", "a0", "a1");
  544. }
  545. __inline static void FreeLocalItem(BASE_PAR_DECL struct LocalContextItem* localItem)
  546. {
  547.     BASE_EXT_DECL
  548.     register void *a6 __asm ("a6");
  549.     register struct LocalContextItem* a0 __asm("a0");
  550.  
  551.     a6 = BASE_NAME;
  552.     a0 = localItem;
  553.     __asm volatile ("
  554.     jsr a6@(-0xcc)"
  555.     : /* no output */
  556.     : "g" (a6), "g" (a0)
  557.     : "d0", "d1", "a0", "a1");
  558. }
  559. __inline static struct LocalContextItem* FindLocalItem(BASE_PAR_DECL struct IFFHandle* iff, long int type, long int id, long int ident)
  560. {
  561.     BASE_EXT_DECL
  562.     register struct LocalContextItem* res __asm("d0");
  563.     register void *a6 __asm ("a6");
  564.     register struct IFFHandle* a0 __asm("a0");
  565.     register long int d0 __asm("d0");
  566.     register long int d1 __asm("d1");
  567.     register long int d2 __asm("d2");
  568.  
  569.     a6 = BASE_NAME;
  570.     a0 = iff;
  571.     d0 = type;
  572.     d1 = id;
  573.     d2 = ident;
  574.     __asm volatile ("
  575.     jsr a6@(-0xd2)"
  576.     : "=g" (res)
  577.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (d2)
  578.     : "d0", "d1", "a0", "a1", "d2");
  579.     return res;
  580. }
  581. __inline static LONG StoreLocalItem(BASE_PAR_DECL struct IFFHandle* iff, struct LocalContextItem* localItem, long int position)
  582. {
  583.     BASE_EXT_DECL
  584.     register LONG res __asm("d0");
  585.     register void *a6 __asm ("a6");
  586.     register struct IFFHandle* a0 __asm("a0");
  587.     register struct LocalContextItem* a1 __asm("a1");
  588.     register long int d0 __asm("d0");
  589.  
  590.     a6 = BASE_NAME;
  591.     a0 = iff;
  592.     a1 = localItem;
  593.     d0 = position;
  594.     __asm volatile ("
  595.     jsr a6@(-0xd8)"
  596.     : "=g" (res)
  597.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  598.     : "d0", "d1", "a0", "a1");
  599.     return res;
  600. }
  601. __inline static void StoreItemInContext(BASE_PAR_DECL struct IFFHandle* iff, struct LocalContextItem* localItem, struct ContextNode* contextNode)
  602. {
  603.     BASE_EXT_DECL
  604.     register void *a6 __asm ("a6");
  605.     register struct IFFHandle* a0 __asm("a0");
  606.     register struct LocalContextItem* a1 __asm("a1");
  607.     register struct ContextNode* a2 __asm("a2");
  608.  
  609.     a6 = BASE_NAME;
  610.     a0 = iff;
  611.     a1 = localItem;
  612.     a2 = contextNode;
  613.     __asm volatile ("
  614.     jsr a6@(-0xde)"
  615.     : /* no output */
  616.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2)
  617.     : "d0", "d1", "a0", "a1", "a2");
  618. }
  619. __inline static void InitIFF(BASE_PAR_DECL struct IFFHandle* iff, long int flags, struct Hook* streamHook)
  620. {
  621.     BASE_EXT_DECL
  622.     register void *a6 __asm ("a6");
  623.     register struct IFFHandle* a0 __asm("a0");
  624.     register long int d0 __asm("d0");
  625.     register struct Hook* a1 __asm("a1");
  626.  
  627.     a6 = BASE_NAME;
  628.     a0 = iff;
  629.     d0 = flags;
  630.     a1 = streamHook;
  631.     __asm volatile ("
  632.     jsr a6@(-0xe4)"
  633.     : /* no output */
  634.     : "g" (a6), "g" (a0), "g" (d0), "g" (a1)
  635.     : "d0", "d1", "a0", "a1");
  636. }
  637. __inline static void InitIFFasDOS(BASE_PAR_DECL struct IFFHandle* iff)
  638. {
  639.     BASE_EXT_DECL
  640.     register void *a6 __asm ("a6");
  641.     register struct IFFHandle* a0 __asm("a0");
  642.  
  643.     a6 = BASE_NAME;
  644.     a0 = iff;
  645.     __asm volatile ("
  646.     jsr a6@(-0xea)"
  647.     : /* no output */
  648.     : "g" (a6), "g" (a0)
  649.     : "d0", "d1", "a0", "a1");
  650. }
  651. __inline static void InitIFFasClip(BASE_PAR_DECL struct IFFHandle* iff)
  652. {
  653.     BASE_EXT_DECL
  654.     register void *a6 __asm ("a6");
  655.     register struct IFFHandle* a0 __asm("a0");
  656.  
  657.     a6 = BASE_NAME;
  658.     a0 = iff;
  659.     __asm volatile ("
  660.     jsr a6@(-0xf0)"
  661.     : /* no output */
  662.     : "g" (a6), "g" (a0)
  663.     : "d0", "d1", "a0", "a1");
  664. }
  665. __inline static struct ClipboardHandle* OpenClipboard(BASE_PAR_DECL long int unitNum)
  666. {
  667.     BASE_EXT_DECL
  668.     register struct ClipboardHandle* res __asm("d0");
  669.     register void *a6 __asm ("a6");
  670.     register long int d0 __asm("d0");
  671.  
  672.     a6 = BASE_NAME;
  673.     d0 = unitNum;
  674.     __asm volatile ("
  675.     jsr a6@(-0xf6)"
  676.     : "=g" (res)
  677.     : "g" (a6), "g" (d0)
  678.     : "d0", "d1", "a0", "a1");
  679.     return res;
  680. }
  681. __inline static void CloseClipboard(BASE_PAR_DECL struct ClipboardHandle* clipboard)
  682. {
  683.     BASE_EXT_DECL
  684.     register void *a6 __asm ("a6");
  685.     register struct ClipboardHandle* a0 __asm("a0");
  686.  
  687.     a6 = BASE_NAME;
  688.     a0 = clipboard;
  689.     __asm volatile ("
  690.     jsr a6@(-0xfc)"
  691.     : /* no output */
  692.     : "g" (a6), "g" (a0)
  693.     : "d0", "d1", "a0", "a1");
  694. }
  695. __inline static LONG GoodID(BASE_PAR_DECL long int id)
  696. {
  697.     BASE_EXT_DECL
  698.     register LONG res __asm("d0");
  699.     register void *a6 __asm ("a6");
  700.     register long int d0 __asm("d0");
  701.  
  702.     a6 = BASE_NAME;
  703.     d0 = id;
  704.     __asm volatile ("
  705.     jsr a6@(-0x102)"
  706.     : "=g" (res)
  707.     : "g" (a6), "g" (d0)
  708.     : "d0", "d1", "a0", "a1");
  709.     return res;
  710. }
  711. __inline static LONG GoodType(BASE_PAR_DECL long int type)
  712. {
  713.     BASE_EXT_DECL
  714.     register LONG res __asm("d0");
  715.     register void *a6 __asm ("a6");
  716.     register long int d0 __asm("d0");
  717.  
  718.     a6 = BASE_NAME;
  719.     d0 = type;
  720.     __asm volatile ("
  721.     jsr a6@(-0x108)"
  722.     : "=g" (res)
  723.     : "g" (a6), "g" (d0)
  724.     : "d0", "d1", "a0", "a1");
  725.     return res;
  726. }
  727. __inline static STRPTR IDtoStr(BASE_PAR_DECL long int id, STRPTR buf)
  728. {
  729.     BASE_EXT_DECL
  730.     register STRPTR res __asm("d0");
  731.     register void *a6 __asm ("a6");
  732.     register long int d0 __asm("d0");
  733.     register STRPTR a0 __asm("a0");
  734.  
  735.     a6 = BASE_NAME;
  736.     d0 = id;
  737.     a0 = buf;
  738.     __asm volatile ("
  739.     jsr a6@(-0x10e)"
  740.     : "=g" (res)
  741.     : "g" (a6), "g" (d0), "g" (a0)
  742.     : "d0", "d1", "a0", "a1");
  743.     return res;
  744. }
  745. #undef BASE_EXT_DECL
  746. #undef BASE_PAR_DECL
  747. #undef BASE_PAR_DECL0
  748. #undef BASE_NAME
  749.