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

  1. #ifndef _INLINE_IFFPARSE_H
  2. #define _INLINE_IFFPARSE_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 Library*  IFFParseBase;
  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 IFFParseBase
  18. #endif
  19.  
  20. static __inline struct IFFHandle *
  21. AllocIFF (BASE_PAR_DECL0)
  22. {
  23.   BASE_EXT_DECL
  24.   register struct IFFHandle * _res  __asm("d0");
  25.   register struct Library* a6 __asm("a6") = BASE_NAME;
  26.   __asm __volatile ("jsr a6@(-0x1e)"
  27.   : "=r" (_res)
  28.   : "r" (a6)
  29.   : "a0","a1","d0","d1", "memory");
  30.   return _res;
  31. }
  32. static __inline struct LocalContextItem *
  33. AllocLocalItem (BASE_PAR_DECL long type,long id,long ident,long dataSize)
  34. {
  35.   BASE_EXT_DECL
  36.   register struct LocalContextItem * _res  __asm("d0");
  37.   register struct Library* a6 __asm("a6") = BASE_NAME;
  38.   register long d0 __asm("d0") = type;
  39.   register long d1 __asm("d1") = id;
  40.   register long d2 __asm("d2") = ident;
  41.   register long d3 __asm("d3") = dataSize;
  42.   __asm __volatile ("jsr a6@(-0xba)"
  43.   : "=r" (_res)
  44.   : "r" (a6), "r" (d0), "r" (d1), "r" (d2), "r" (d3)
  45.   : "a0","a1","d0","d1","d2","d3", "memory");
  46.   return _res;
  47. }
  48. static __inline void 
  49. CloseClipboard (BASE_PAR_DECL struct ClipboardHandle *clipHandle)
  50. {
  51.   BASE_EXT_DECL
  52.   register struct Library* a6 __asm("a6") = BASE_NAME;
  53.   register struct ClipboardHandle *a0 __asm("a0") = clipHandle;
  54.   __asm __volatile ("jsr a6@(-0xfc)"
  55.   : /* no output */
  56.   : "r" (a6), "r" (a0)
  57.   : "a0","a1","d0","d1", "memory");
  58. }
  59. static __inline void 
  60. CloseIFF (BASE_PAR_DECL struct IFFHandle *iff)
  61. {
  62.   BASE_EXT_DECL
  63.   register struct Library* a6 __asm("a6") = BASE_NAME;
  64.   register struct IFFHandle *a0 __asm("a0") = iff;
  65.   __asm __volatile ("jsr a6@(-0x30)"
  66.   : /* no output */
  67.   : "r" (a6), "r" (a0)
  68.   : "a0","a1","d0","d1", "memory");
  69. }
  70. static __inline LONG 
  71. CollectionChunk (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  72. {
  73.   BASE_EXT_DECL
  74.   register LONG  _res  __asm("d0");
  75.   register struct Library* a6 __asm("a6") = BASE_NAME;
  76.   register struct IFFHandle *a0 __asm("a0") = iff;
  77.   register long d0 __asm("d0") = type;
  78.   register long d1 __asm("d1") = id;
  79.   __asm __volatile ("jsr a6@(-0x8a)"
  80.   : "=r" (_res)
  81.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  82.   : "a0","a1","d0","d1", "memory");
  83.   return _res;
  84. }
  85. static __inline LONG 
  86. CollectionChunks (BASE_PAR_DECL struct IFFHandle *iff,LONG *propArray,long numPairs)
  87. {
  88.   BASE_EXT_DECL
  89.   register LONG  _res  __asm("d0");
  90.   register struct Library* a6 __asm("a6") = BASE_NAME;
  91.   register struct IFFHandle *a0 __asm("a0") = iff;
  92.   register LONG *a1 __asm("a1") = propArray;
  93.   register long d0 __asm("d0") = numPairs;
  94.   __asm __volatile ("jsr a6@(-0x90)"
  95.   : "=r" (_res)
  96.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  97.   : "a0","a1","d0","d1", "memory");
  98.   return _res;
  99. }
  100. static __inline struct ContextNode *
  101. CurrentChunk (BASE_PAR_DECL struct IFFHandle *iff)
  102. {
  103.   BASE_EXT_DECL
  104.   register struct ContextNode * _res  __asm("d0");
  105.   register struct Library* a6 __asm("a6") = BASE_NAME;
  106.   register struct IFFHandle *a0 __asm("a0") = iff;
  107.   __asm __volatile ("jsr a6@(-0xae)"
  108.   : "=r" (_res)
  109.   : "r" (a6), "r" (a0)
  110.   : "a0","a1","d0","d1", "memory");
  111.   return _res;
  112. }
  113. static __inline LONG 
  114. EntryHandler (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long position,struct Hook *handler,APTR object)
  115. {
  116.   BASE_EXT_DECL
  117.   register LONG  _res  __asm("d0");
  118.   register struct Library* a6 __asm("a6") = BASE_NAME;
  119.   register struct IFFHandle *a0 __asm("a0") = iff;
  120.   register long d0 __asm("d0") = type;
  121.   register long d1 __asm("d1") = id;
  122.   register long d2 __asm("d2") = position;
  123.   register struct Hook *a1 __asm("a1") = handler;
  124.   register APTR a2 __asm("a2") = object;
  125.   __asm __volatile ("jsr a6@(-0x66)"
  126.   : "=r" (_res)
  127.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2), "r" (a1), "r" (a2)
  128.   : "a0","a1","a2","d0","d1","d2", "memory");
  129.   return _res;
  130. }
  131. static __inline LONG 
  132. ExitHandler (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long position,struct Hook *handler,APTR object)
  133. {
  134.   BASE_EXT_DECL
  135.   register LONG  _res  __asm("d0");
  136.   register struct Library* a6 __asm("a6") = BASE_NAME;
  137.   register struct IFFHandle *a0 __asm("a0") = iff;
  138.   register long d0 __asm("d0") = type;
  139.   register long d1 __asm("d1") = id;
  140.   register long d2 __asm("d2") = position;
  141.   register struct Hook *a1 __asm("a1") = handler;
  142.   register APTR a2 __asm("a2") = object;
  143.   __asm __volatile ("jsr a6@(-0x6c)"
  144.   : "=r" (_res)
  145.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2), "r" (a1), "r" (a2)
  146.   : "a0","a1","a2","d0","d1","d2", "memory");
  147.   return _res;
  148. }
  149. static __inline struct CollectionItem *
  150. FindCollection (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  151. {
  152.   BASE_EXT_DECL
  153.   register struct CollectionItem * _res  __asm("d0");
  154.   register struct Library* a6 __asm("a6") = BASE_NAME;
  155.   register struct IFFHandle *a0 __asm("a0") = iff;
  156.   register long d0 __asm("d0") = type;
  157.   register long d1 __asm("d1") = id;
  158.   __asm __volatile ("jsr a6@(-0xa2)"
  159.   : "=r" (_res)
  160.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  161.   : "a0","a1","d0","d1", "memory");
  162.   return _res;
  163. }
  164. static __inline struct LocalContextItem *
  165. FindLocalItem (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long ident)
  166. {
  167.   BASE_EXT_DECL
  168.   register struct LocalContextItem * _res  __asm("d0");
  169.   register struct Library* a6 __asm("a6") = BASE_NAME;
  170.   register struct IFFHandle *a0 __asm("a0") = iff;
  171.   register long d0 __asm("d0") = type;
  172.   register long d1 __asm("d1") = id;
  173.   register long d2 __asm("d2") = ident;
  174.   __asm __volatile ("jsr a6@(-0xd2)"
  175.   : "=r" (_res)
  176.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2)
  177.   : "a0","a1","d0","d1","d2", "memory");
  178.   return _res;
  179. }
  180. static __inline struct StoredProperty *
  181. FindProp (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  182. {
  183.   BASE_EXT_DECL
  184.   register struct StoredProperty * _res  __asm("d0");
  185.   register struct Library* a6 __asm("a6") = BASE_NAME;
  186.   register struct IFFHandle *a0 __asm("a0") = iff;
  187.   register long d0 __asm("d0") = type;
  188.   register long d1 __asm("d1") = id;
  189.   __asm __volatile ("jsr a6@(-0x9c)"
  190.   : "=r" (_res)
  191.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  192.   : "a0","a1","d0","d1", "memory");
  193.   return _res;
  194. }
  195. static __inline struct ContextNode *
  196. FindPropContext (BASE_PAR_DECL struct IFFHandle *iff)
  197. {
  198.   BASE_EXT_DECL
  199.   register struct ContextNode * _res  __asm("d0");
  200.   register struct Library* a6 __asm("a6") = BASE_NAME;
  201.   register struct IFFHandle *a0 __asm("a0") = iff;
  202.   __asm __volatile ("jsr a6@(-0xa8)"
  203.   : "=r" (_res)
  204.   : "r" (a6), "r" (a0)
  205.   : "a0","a1","d0","d1", "memory");
  206.   return _res;
  207. }
  208. static __inline void 
  209. FreeIFF (BASE_PAR_DECL struct IFFHandle *iff)
  210. {
  211.   BASE_EXT_DECL
  212.   register struct Library* a6 __asm("a6") = BASE_NAME;
  213.   register struct IFFHandle *a0 __asm("a0") = iff;
  214.   __asm __volatile ("jsr a6@(-0x36)"
  215.   : /* no output */
  216.   : "r" (a6), "r" (a0)
  217.   : "a0","a1","d0","d1", "memory");
  218. }
  219. static __inline void 
  220. FreeLocalItem (BASE_PAR_DECL struct LocalContextItem *localItem)
  221. {
  222.   BASE_EXT_DECL
  223.   register struct Library* a6 __asm("a6") = BASE_NAME;
  224.   register struct LocalContextItem *a0 __asm("a0") = localItem;
  225.   __asm __volatile ("jsr a6@(-0xcc)"
  226.   : /* no output */
  227.   : "r" (a6), "r" (a0)
  228.   : "a0","a1","d0","d1", "memory");
  229. }
  230. static __inline LONG 
  231. GoodID (BASE_PAR_DECL long id)
  232. {
  233.   BASE_EXT_DECL
  234.   register LONG  _res  __asm("d0");
  235.   register struct Library* a6 __asm("a6") = BASE_NAME;
  236.   register long d0 __asm("d0") = id;
  237.   __asm __volatile ("jsr a6@(-0x102)"
  238.   : "=r" (_res)
  239.   : "r" (a6), "r" (d0)
  240.   : "a0","a1","d0","d1", "memory");
  241.   return _res;
  242. }
  243. static __inline LONG 
  244. GoodType (BASE_PAR_DECL long type)
  245. {
  246.   BASE_EXT_DECL
  247.   register LONG  _res  __asm("d0");
  248.   register struct Library* a6 __asm("a6") = BASE_NAME;
  249.   register long d0 __asm("d0") = type;
  250.   __asm __volatile ("jsr a6@(-0x108)"
  251.   : "=r" (_res)
  252.   : "r" (a6), "r" (d0)
  253.   : "a0","a1","d0","d1", "memory");
  254.   return _res;
  255. }
  256. static __inline STRPTR 
  257. IDtoStr (BASE_PAR_DECL long id,STRPTR buf)
  258. {
  259.   BASE_EXT_DECL
  260.   register STRPTR  _res  __asm("d0");
  261.   register struct Library* a6 __asm("a6") = BASE_NAME;
  262.   register long d0 __asm("d0") = id;
  263.   register STRPTR a0 __asm("a0") = buf;
  264.   __asm __volatile ("jsr a6@(-0x10e)"
  265.   : "=r" (_res)
  266.   : "r" (a6), "r" (d0), "r" (a0)
  267.   : "a0","a1","d0","d1", "memory");
  268.   return _res;
  269. }
  270. static __inline void 
  271. InitIFF (BASE_PAR_DECL struct IFFHandle *iff,long flags,struct Hook *streamHook)
  272. {
  273.   BASE_EXT_DECL
  274.   register struct Library* a6 __asm("a6") = BASE_NAME;
  275.   register struct IFFHandle *a0 __asm("a0") = iff;
  276.   register long d0 __asm("d0") = flags;
  277.   register struct Hook *a1 __asm("a1") = streamHook;
  278.   __asm __volatile ("jsr a6@(-0xe4)"
  279.   : /* no output */
  280.   : "r" (a6), "r" (a0), "r" (d0), "r" (a1)
  281.   : "a0","a1","d0","d1", "memory");
  282. }
  283. static __inline void 
  284. InitIFFasClip (BASE_PAR_DECL struct IFFHandle *iff)
  285. {
  286.   BASE_EXT_DECL
  287.   register struct Library* a6 __asm("a6") = BASE_NAME;
  288.   register struct IFFHandle *a0 __asm("a0") = iff;
  289.   __asm __volatile ("jsr a6@(-0xf0)"
  290.   : /* no output */
  291.   : "r" (a6), "r" (a0)
  292.   : "a0","a1","d0","d1", "memory");
  293. }
  294. static __inline void 
  295. InitIFFasDOS (BASE_PAR_DECL struct IFFHandle *iff)
  296. {
  297.   BASE_EXT_DECL
  298.   register struct Library* a6 __asm("a6") = BASE_NAME;
  299.   register struct IFFHandle *a0 __asm("a0") = iff;
  300.   __asm __volatile ("jsr a6@(-0xea)"
  301.   : /* no output */
  302.   : "r" (a6), "r" (a0)
  303.   : "a0","a1","d0","d1", "memory");
  304. }
  305. static __inline APTR 
  306. LocalItemData (BASE_PAR_DECL struct LocalContextItem *localItem)
  307. {
  308.   BASE_EXT_DECL
  309.   register APTR  _res  __asm("d0");
  310.   register struct Library* a6 __asm("a6") = BASE_NAME;
  311.   register struct LocalContextItem *a0 __asm("a0") = localItem;
  312.   __asm __volatile ("jsr a6@(-0xc0)"
  313.   : "=r" (_res)
  314.   : "r" (a6), "r" (a0)
  315.   : "a0","a1","d0","d1", "memory");
  316.   return _res;
  317. }
  318. static __inline struct ClipboardHandle *
  319. OpenClipboard (BASE_PAR_DECL long unitNumber)
  320. {
  321.   BASE_EXT_DECL
  322.   register struct ClipboardHandle * _res  __asm("d0");
  323.   register struct Library* a6 __asm("a6") = BASE_NAME;
  324.   register long d0 __asm("d0") = unitNumber;
  325.   __asm __volatile ("jsr a6@(-0xf6)"
  326.   : "=r" (_res)
  327.   : "r" (a6), "r" (d0)
  328.   : "a0","a1","d0","d1", "memory");
  329.   return _res;
  330. }
  331. static __inline LONG 
  332. OpenIFF (BASE_PAR_DECL struct IFFHandle *iff,long rwMode)
  333. {
  334.   BASE_EXT_DECL
  335.   register LONG  _res  __asm("d0");
  336.   register struct Library* a6 __asm("a6") = BASE_NAME;
  337.   register struct IFFHandle *a0 __asm("a0") = iff;
  338.   register long d0 __asm("d0") = rwMode;
  339.   __asm __volatile ("jsr a6@(-0x24)"
  340.   : "=r" (_res)
  341.   : "r" (a6), "r" (a0), "r" (d0)
  342.   : "a0","a1","d0","d1", "memory");
  343.   return _res;
  344. }
  345. static __inline struct ContextNode *
  346. ParentChunk (BASE_PAR_DECL struct ContextNode *contextNode)
  347. {
  348.   BASE_EXT_DECL
  349.   register struct ContextNode * _res  __asm("d0");
  350.   register struct Library* a6 __asm("a6") = BASE_NAME;
  351.   register struct ContextNode *a0 __asm("a0") = contextNode;
  352.   __asm __volatile ("jsr a6@(-0xb4)"
  353.   : "=r" (_res)
  354.   : "r" (a6), "r" (a0)
  355.   : "a0","a1","d0","d1", "memory");
  356.   return _res;
  357. }
  358. static __inline LONG 
  359. ParseIFF (BASE_PAR_DECL struct IFFHandle *iff,long control)
  360. {
  361.   BASE_EXT_DECL
  362.   register LONG  _res  __asm("d0");
  363.   register struct Library* a6 __asm("a6") = BASE_NAME;
  364.   register struct IFFHandle *a0 __asm("a0") = iff;
  365.   register long d0 __asm("d0") = control;
  366.   __asm __volatile ("jsr a6@(-0x2a)"
  367.   : "=r" (_res)
  368.   : "r" (a6), "r" (a0), "r" (d0)
  369.   : "a0","a1","d0","d1", "memory");
  370.   return _res;
  371. }
  372. static __inline LONG 
  373. PopChunk (BASE_PAR_DECL struct IFFHandle *iff)
  374. {
  375.   BASE_EXT_DECL
  376.   register LONG  _res  __asm("d0");
  377.   register struct Library* a6 __asm("a6") = BASE_NAME;
  378.   register struct IFFHandle *a0 __asm("a0") = iff;
  379.   __asm __volatile ("jsr a6@(-0x5a)"
  380.   : "=r" (_res)
  381.   : "r" (a6), "r" (a0)
  382.   : "a0","a1","d0","d1", "memory");
  383.   return _res;
  384. }
  385. static __inline LONG 
  386. PropChunk (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  387. {
  388.   BASE_EXT_DECL
  389.   register LONG  _res  __asm("d0");
  390.   register struct Library* a6 __asm("a6") = BASE_NAME;
  391.   register struct IFFHandle *a0 __asm("a0") = iff;
  392.   register long d0 __asm("d0") = type;
  393.   register long d1 __asm("d1") = id;
  394.   __asm __volatile ("jsr a6@(-0x72)"
  395.   : "=r" (_res)
  396.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  397.   : "a0","a1","d0","d1", "memory");
  398.   return _res;
  399. }
  400. static __inline LONG 
  401. PropChunks (BASE_PAR_DECL struct IFFHandle *iff,LONG *propArray,long numPairs)
  402. {
  403.   BASE_EXT_DECL
  404.   register LONG  _res  __asm("d0");
  405.   register struct Library* a6 __asm("a6") = BASE_NAME;
  406.   register struct IFFHandle *a0 __asm("a0") = iff;
  407.   register LONG *a1 __asm("a1") = propArray;
  408.   register long d0 __asm("d0") = numPairs;
  409.   __asm __volatile ("jsr a6@(-0x78)"
  410.   : "=r" (_res)
  411.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  412.   : "a0","a1","d0","d1", "memory");
  413.   return _res;
  414. }
  415. static __inline LONG 
  416. PushChunk (BASE_PAR_DECL struct IFFHandle *iff,long type,long id,long size)
  417. {
  418.   BASE_EXT_DECL
  419.   register LONG  _res  __asm("d0");
  420.   register struct Library* a6 __asm("a6") = BASE_NAME;
  421.   register struct IFFHandle *a0 __asm("a0") = iff;
  422.   register long d0 __asm("d0") = type;
  423.   register long d1 __asm("d1") = id;
  424.   register long d2 __asm("d2") = size;
  425.   __asm __volatile ("jsr a6@(-0x54)"
  426.   : "=r" (_res)
  427.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1), "r" (d2)
  428.   : "a0","a1","d0","d1","d2", "memory");
  429.   return _res;
  430. }
  431. static __inline LONG 
  432. ReadChunkBytes (BASE_PAR_DECL struct IFFHandle *iff,APTR buf,long numBytes)
  433. {
  434.   BASE_EXT_DECL
  435.   register LONG  _res  __asm("d0");
  436.   register struct Library* a6 __asm("a6") = BASE_NAME;
  437.   register struct IFFHandle *a0 __asm("a0") = iff;
  438.   register APTR a1 __asm("a1") = buf;
  439.   register long d0 __asm("d0") = numBytes;
  440.   __asm __volatile ("jsr a6@(-0x3c)"
  441.   : "=r" (_res)
  442.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  443.   : "a0","a1","d0","d1", "memory");
  444.   return _res;
  445. }
  446. static __inline LONG 
  447. ReadChunkRecords (BASE_PAR_DECL struct IFFHandle *iff,APTR buf,long bytesPerRecord,long numRecords)
  448. {
  449.   BASE_EXT_DECL
  450.   register LONG  _res  __asm("d0");
  451.   register struct Library* a6 __asm("a6") = BASE_NAME;
  452.   register struct IFFHandle *a0 __asm("a0") = iff;
  453.   register APTR a1 __asm("a1") = buf;
  454.   register long d0 __asm("d0") = bytesPerRecord;
  455.   register long d1 __asm("d1") = numRecords;
  456.   __asm __volatile ("jsr a6@(-0x48)"
  457.   : "=r" (_res)
  458.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
  459.   : "a0","a1","d0","d1", "memory");
  460.   return _res;
  461. }
  462. static __inline void 
  463. SetLocalItemPurge (BASE_PAR_DECL struct LocalContextItem *localItem,struct Hook *purgeHook)
  464. {
  465.   BASE_EXT_DECL
  466.   register struct Library* a6 __asm("a6") = BASE_NAME;
  467.   register struct LocalContextItem *a0 __asm("a0") = localItem;
  468.   register struct Hook *a1 __asm("a1") = purgeHook;
  469.   __asm __volatile ("jsr a6@(-0xc6)"
  470.   : /* no output */
  471.   : "r" (a6), "r" (a0), "r" (a1)
  472.   : "a0","a1","d0","d1", "memory");
  473. }
  474. static __inline LONG 
  475. StopChunk (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  476. {
  477.   BASE_EXT_DECL
  478.   register LONG  _res  __asm("d0");
  479.   register struct Library* a6 __asm("a6") = BASE_NAME;
  480.   register struct IFFHandle *a0 __asm("a0") = iff;
  481.   register long d0 __asm("d0") = type;
  482.   register long d1 __asm("d1") = id;
  483.   __asm __volatile ("jsr a6@(-0x7e)"
  484.   : "=r" (_res)
  485.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  486.   : "a0","a1","d0","d1", "memory");
  487.   return _res;
  488. }
  489. static __inline LONG 
  490. StopChunks (BASE_PAR_DECL struct IFFHandle *iff,LONG *propArray,long numPairs)
  491. {
  492.   BASE_EXT_DECL
  493.   register LONG  _res  __asm("d0");
  494.   register struct Library* a6 __asm("a6") = BASE_NAME;
  495.   register struct IFFHandle *a0 __asm("a0") = iff;
  496.   register LONG *a1 __asm("a1") = propArray;
  497.   register long d0 __asm("d0") = numPairs;
  498.   __asm __volatile ("jsr a6@(-0x84)"
  499.   : "=r" (_res)
  500.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  501.   : "a0","a1","d0","d1", "memory");
  502.   return _res;
  503. }
  504. static __inline LONG 
  505. StopOnExit (BASE_PAR_DECL struct IFFHandle *iff,long type,long id)
  506. {
  507.   BASE_EXT_DECL
  508.   register LONG  _res  __asm("d0");
  509.   register struct Library* a6 __asm("a6") = BASE_NAME;
  510.   register struct IFFHandle *a0 __asm("a0") = iff;
  511.   register long d0 __asm("d0") = type;
  512.   register long d1 __asm("d1") = id;
  513.   __asm __volatile ("jsr a6@(-0x96)"
  514.   : "=r" (_res)
  515.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  516.   : "a0","a1","d0","d1", "memory");
  517.   return _res;
  518. }
  519. static __inline void 
  520. StoreItemInContext (BASE_PAR_DECL struct IFFHandle *iff,struct LocalContextItem *localItem,struct ContextNode *contextNode)
  521. {
  522.   BASE_EXT_DECL
  523.   register struct Library* a6 __asm("a6") = BASE_NAME;
  524.   register struct IFFHandle *a0 __asm("a0") = iff;
  525.   register struct LocalContextItem *a1 __asm("a1") = localItem;
  526.   register struct ContextNode *a2 __asm("a2") = contextNode;
  527.   __asm __volatile ("jsr a6@(-0xde)"
  528.   : /* no output */
  529.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2)
  530.   : "a0","a1","a2","d0","d1", "memory");
  531. }
  532. static __inline LONG 
  533. StoreLocalItem (BASE_PAR_DECL struct IFFHandle *iff,struct LocalContextItem *localItem,long position)
  534. {
  535.   BASE_EXT_DECL
  536.   register LONG  _res  __asm("d0");
  537.   register struct Library* a6 __asm("a6") = BASE_NAME;
  538.   register struct IFFHandle *a0 __asm("a0") = iff;
  539.   register struct LocalContextItem *a1 __asm("a1") = localItem;
  540.   register long d0 __asm("d0") = position;
  541.   __asm __volatile ("jsr a6@(-0xd8)"
  542.   : "=r" (_res)
  543.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  544.   : "a0","a1","d0","d1", "memory");
  545.   return _res;
  546. }
  547. static __inline LONG 
  548. WriteChunkBytes (BASE_PAR_DECL struct IFFHandle *iff,APTR buf,long numBytes)
  549. {
  550.   BASE_EXT_DECL
  551.   register LONG  _res  __asm("d0");
  552.   register struct Library* a6 __asm("a6") = BASE_NAME;
  553.   register struct IFFHandle *a0 __asm("a0") = iff;
  554.   register APTR a1 __asm("a1") = buf;
  555.   register long d0 __asm("d0") = numBytes;
  556.   __asm __volatile ("jsr a6@(-0x42)"
  557.   : "=r" (_res)
  558.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  559.   : "a0","a1","d0","d1", "memory");
  560.   return _res;
  561. }
  562. static __inline LONG 
  563. WriteChunkRecords (BASE_PAR_DECL struct IFFHandle *iff,APTR buf,long bytesPerRecord,long numRecords)
  564. {
  565.   BASE_EXT_DECL
  566.   register LONG  _res  __asm("d0");
  567.   register struct Library* a6 __asm("a6") = BASE_NAME;
  568.   register struct IFFHandle *a0 __asm("a0") = iff;
  569.   register APTR a1 __asm("a1") = buf;
  570.   register long d0 __asm("d0") = bytesPerRecord;
  571.   register long d1 __asm("d1") = numRecords;
  572.   __asm __volatile ("jsr a6@(-0x4e)"
  573.   : "=r" (_res)
  574.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0), "r" (d1)
  575.   : "a0","a1","d0","d1", "memory");
  576.   return _res;
  577. }
  578. #undef BASE_EXT_DECL
  579. #undef BASE_PAR_DECL
  580. #undef BASE_PAR_DECL0
  581. #undef BASE_NAME
  582.  
  583. __END_DECLS
  584.  
  585. #endif /* _INLINE_IFFPARSE_H */
  586.