home *** CD-ROM | disk | FTP | other *** search
- #include <inline/stub.h>
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct UtilityBase * UtilityBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME UtilityBase
- #endif
- __inline static struct TagItem* FindTagItem(BASE_PAR_DECL Tag tagVal, struct TagItem* tagList)
- {
- BASE_EXT_DECL
- register struct TagItem* res __asm("d0");
- register void *a6 __asm ("a6");
- register Tag d0 __asm("d0");
- register struct TagItem* a0 __asm("a0");
-
- a6 = BASE_NAME;
- d0 = tagVal;
- a0 = tagList;
- __asm volatile ("
- jsr a6@(-0x1e)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG GetTagData(BASE_PAR_DECL Tag tagVal, long unsigned int defaultVal, struct TagItem* tagList)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register Tag d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
- register struct TagItem* a0 __asm("a0");
-
- a6 = BASE_NAME;
- d0 = tagVal;
- d1 = defaultVal;
- a0 = tagList;
- __asm volatile ("
- jsr a6@(-0x24)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG PackBoolTags(BASE_PAR_DECL long unsigned int initialFlags, struct TagItem* tagList, struct TagItem* boolMap)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register struct TagItem* a0 __asm("a0");
- register struct TagItem* a1 __asm("a1");
-
- a6 = BASE_NAME;
- d0 = initialFlags;
- a0 = tagList;
- a1 = boolMap;
- __asm volatile ("
- jsr a6@(-0x2a)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static struct TagItem* NextTagItem(BASE_PAR_DECL struct TagItem** tagListPtr)
- {
- BASE_EXT_DECL
- register struct TagItem* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct TagItem** a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = tagListPtr;
- __asm volatile ("
- jsr a6@(-0x30)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void FilterTagChanges(BASE_PAR_DECL struct TagItem* newTagList, struct TagItem* oldTagList, long int apply)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
- register struct TagItem* a1 __asm("a1");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = newTagList;
- a1 = oldTagList;
- d0 = apply;
- __asm volatile ("
- jsr a6@(-0x36)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void MapTags(BASE_PAR_DECL struct TagItem* tagList, struct TagItem* mapList, long int includeMiss)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
- register struct TagItem* a1 __asm("a1");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = tagList;
- a1 = mapList;
- d0 = includeMiss;
- __asm volatile ("
- jsr a6@(-0x3c)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static struct TagItem* AllocateTagItems(BASE_PAR_DECL long unsigned int numItems)
- {
- BASE_EXT_DECL
- register struct TagItem* res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = numItems;
- __asm volatile ("
- jsr a6@(-0x42)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static struct TagItem* CloneTagItems(BASE_PAR_DECL struct TagItem* tagList)
- {
- BASE_EXT_DECL
- register struct TagItem* res __asm("d0");
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = tagList;
- __asm volatile ("
- jsr a6@(-0x48)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static void FreeTagItems(BASE_PAR_DECL struct TagItem* tagList)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = tagList;
- __asm volatile ("
- jsr a6@(-0x4e)"
- : /* no output */
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static void RefreshTagItemClones(BASE_PAR_DECL struct TagItem* cloneList, struct TagItem* origList)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
- register struct TagItem* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = cloneList;
- a1 = origList;
- __asm volatile ("
- jsr a6@(-0x54)"
- : /* no output */
- : "g" (a6), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- }
- __inline static BOOL TagInArray(BASE_PAR_DECL Tag tagVal, Tag* tagArray)
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register void *a6 __asm ("a6");
- register Tag d0 __asm("d0");
- register Tag* a0 __asm("a0");
-
- a6 = BASE_NAME;
- d0 = tagVal;
- a0 = tagArray;
- __asm volatile ("
- jsr a6@(-0x5a)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG FilterTagItems(BASE_PAR_DECL struct TagItem* tagList, Tag* filterArray, long int logic)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct TagItem* a0 __asm("a0");
- register Tag* a1 __asm("a1");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = tagList;
- a1 = filterArray;
- d0 = logic;
- __asm volatile ("
- jsr a6@(-0x60)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG CallHookPkt(BASE_PAR_DECL struct Hook* hook, APTR object, APTR paramPacket)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct Hook* a0 __asm("a0");
- register APTR a2 __asm("a2");
- register APTR a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = hook;
- a2 = object;
- a1 = paramPacket;
- __asm volatile ("
- jsr a6@(-0x66)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a2), "g" (a1)
- : "d0", "d1", "a0", "a1", "a2");
- return res;
- }
- __inline static void Amiga2Date(BASE_PAR_DECL long unsigned int amigaTime, struct ClockData* date)
- {
- BASE_EXT_DECL
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register struct ClockData* a0 __asm("a0");
-
- a6 = BASE_NAME;
- d0 = amigaTime;
- a0 = date;
- __asm volatile ("
- jsr a6@(-0x78)"
- : /* no output */
- : "g" (a6), "g" (d0), "g" (a0)
- : "d0", "d1", "a0", "a1");
- }
- __inline static ULONG Date2Amiga(BASE_PAR_DECL struct ClockData* date)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct ClockData* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = date;
- __asm volatile ("
- jsr a6@(-0x7e)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG CheckDate(BASE_PAR_DECL struct ClockData* date)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register struct ClockData* a0 __asm("a0");
-
- a6 = BASE_NAME;
- a0 = date;
- __asm volatile ("
- jsr a6@(-0x84)"
- : "=g" (res)
- : "g" (a6), "g" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG SMult32(BASE_PAR_DECL long int factor1, long int factor2)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
- register long int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = factor1;
- d1 = factor2;
- __asm volatile ("
- jsr a6@(-0x8a)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG UMult32(BASE_PAR_DECL long unsigned int factor1, long unsigned int factor2)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = factor1;
- d1 = factor2;
- __asm volatile ("
- jsr a6@(-0x90)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG SDivMod32(BASE_PAR_DECL long int dividend, long int divisor)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long int d0 __asm("d0");
- register long int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = dividend;
- d1 = divisor;
- __asm volatile ("
- jsr a6@(-0x96)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static ULONG UDivMod32(BASE_PAR_DECL long unsigned int dividend, long unsigned int divisor)
- {
- BASE_EXT_DECL
- register ULONG res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
- register long unsigned int d1 __asm("d1");
-
- a6 = BASE_NAME;
- d0 = dividend;
- d1 = divisor;
- __asm volatile ("
- jsr a6@(-0x9c)"
- : "=g" (res)
- : "g" (a6), "g" (d0), "g" (d1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG Stricmp(BASE_PAR_DECL UBYTE* string1, UBYTE* string2)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register UBYTE* a0 __asm("a0");
- register UBYTE* a1 __asm("a1");
-
- a6 = BASE_NAME;
- a0 = string1;
- a1 = string2;
- __asm volatile ("
- jsr a6@(-0xa2)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static LONG Strnicmp(BASE_PAR_DECL UBYTE* string1, UBYTE* string2, long int length)
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register void *a6 __asm ("a6");
- register UBYTE* a0 __asm("a0");
- register UBYTE* a1 __asm("a1");
- register long int d0 __asm("d0");
-
- a6 = BASE_NAME;
- a0 = string1;
- a1 = string2;
- d0 = length;
- __asm volatile ("
- jsr a6@(-0xa8)"
- : "=g" (res)
- : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static UBYTE ToUpper(BASE_PAR_DECL long unsigned int character)
- {
- BASE_EXT_DECL
- register UBYTE res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = character;
- __asm volatile ("
- jsr a6@(-0xae)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- __inline static UBYTE ToLower(BASE_PAR_DECL long unsigned int character)
- {
- BASE_EXT_DECL
- register UBYTE res __asm("d0");
- register void *a6 __asm ("a6");
- register long unsigned int d0 __asm("d0");
-
- a6 = BASE_NAME;
- d0 = character;
- __asm volatile ("
- jsr a6@(-0xb4)"
- : "=g" (res)
- : "g" (a6), "g" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-