;Interface routines for AMOS functions, and other miscellaneous AMOS stuff. ;The interface routines are here because the calling conventions for AMOS ;functions changed between Creator and Pro. include "offsets.i" include "defs.i" include "errordefs.i" include "macros.i" include "macros2.i" ifd CREATOR incdir "/AMOS1.3" else incdir "/AMOS" endc ; include "equ.s" ;PhxAss is buggy... L_Bnk_GetAdr equ 1100 L_Bnk_Reserve equ 1103 Bnk_BitData equ 0 Bnk_BitChip equ 1 Bnk_BitBob equ 2 Bnk_BitIcon equ 3 ABanks equ 1252 ExtAdr equ 62*4 EcNumber equ 188 C_Code1 equ $FE C_Code2 equ $01 C_CodeJ equ $F7 Rjmp MACRO dc.b C_Code1,0*16+C_Code2 dc.b C_CodeJ,0 dc.w \1 ENDM Rjsr MACRO dc.b C_Code1,1*16+C_Code2 dc.b C_CodeJ,0 dc.w \1 ENDM section text,code xdef GetBankAdr xdef CreateBank xdef FindAscr xdef FindSprite xdef FindIcon xdef ReturnString xdef GetRetStr xdef FlushRetStr xref DataBase xref Ascr0to7 xref NoObjBank xref NoIconBank xref IllFunc xref NoMem xref LongMul xref StrAlloc xref StrFree xref StrLen GetBankAdr: ;Get address of bank D0 to A0, return bank flags in ; D0.w. If bank does not exist, D0/A0 undefined and ; Z set on return; otherwise, Z clear. ifd CREATOR pstart2 tst.l d0 beq IllFunc cmp.l #16,d0 bhi IllFunc movem.l d2/a5,-(a7) dmove.l SavedA5,a5 move.l ABanks(a5),a0 subq.w #1,d0 lsl.w #3,d0 move.l 4(a0,d0.w),d1 move.l 0(a0,d0.w),a0 move.l a0,d0 beq .nobank moveq #0,d2 btst #31,d1 sne d0 and.b #1<