passport/src/apidefs.a

320 lines
14 KiB
Plaintext

;-------------------------------
; Global constants, addresses, and other sundries
;
; /!\ Everything after APIEND must be kept in sync
; with apidefs.a!
;
; /!\ NO CODE IN THIS FILE, NO EXCEPTIONS
;-------------------------------
TRUE = $00 ; Lots of code assumes this is zero
; so it can branch with BEQ, so
; don't change it!
FALSE = $01
;-------------------------------
;Keys recognized on main menu
;-------------------------------
k_verify = "V"
k_crack = "C"
k_slot = "S"
k_quit = "Q"
k_redo = "2" ;for some side 'B'
k_redo_with_ignore = $92; <Ctrl-R>
k_left = $88
k_right = $95
k_up = $8B
k_down = $8A
; <Esc> will also quit
;-------------------------------
;Standard Delivery table indexes
;-------------------------------
ID_DOS33p = $00
ID_DOS32 = $01
ID_DOS32LO = $02
ID_RDOS13 = $03
;-------------------------------
;MECC fast-load variants
;-------------------------------
ID_MECC1 = $01
ID_MECC2 = $02
ID_MECC3 = $03
ID_MECC4 = $04
ID_MECC_UNK = $FF
;-------------------------------
;target types (for gTargetType)
;-------------------------------
ID_DISK_II = %00000000 ; BIT + BPL + BVC -> target is Disk II drive
ID_CFFA_VIRTUAL_DISK = %01000000 ; BIT + BPL + BVS -> target is a CFFA3000-managed virtual disk drive
ID_FILE_ON_HARD_DISK = %10000000 ; BIT + BMI -> target is a file on a hard disk
; Standard zero-page addresses
TEXTTOP = $22
HPOS = $24
VPOS = $25
; Standard addresses
PRODOSMLI= $BF00
KEY = $C000
STROBE = $C010
TEXT = $FB2F
HOME = $FC58
WAIT = $FCA8
PRBYTE = $FDDA
COUT = $FDED
; Zero-page addresses we use for temporary variables
nibsrcindex = $EC ; byte
nibdestindex = $ED ; byte
prbuf = $EE ; word
unform = $F0 ; word
nibcount = $F2 ; byte
modtmp = $F3 ; byte
modsrc = $F4 ; word
moddest = $F6 ; word
cmp1 = $F8 ; word
cmp2 = $FA ; word
counter = $FC ; byte
tmp = $FC ; byte
iunit = $FC ; byte
tmpa = $FC ; byte
tmpx = $FD ; byte
tmpy = $FE ; byte
flag = $FF ; byte
; Other application-specific constants and assembler magic
!ifdef RELBASE {
!set VERBOSE = $00 ; override for make script
} else {
RELBASE = $2000 ; dummy assignment for first build
; to allow calculation of proper value
}
LOWPOINT = $4000 ; lowest available address for code
HIGHPOINT = $B200 ; highest available address+1 for code
PREFSBUFFER = $B600
PREFSREADLEN = $0003
BASEPAGE = $10 ; high byte of $1000-byte buffer that
; holds sector data for current track
; Special Delivery tracer assumes this
; is $10, so don't change it!
; Universal RWTS-specific addresses
UNIV_A1 = $B956 ; must LSR before setting
UNIV_A2 = $B95F
UNIV_A3 = $B968
UNIV_D1 = $B8E7
UNIV_D2 = $B8F1
UNIV_D3 = $B8FC
;-------------------------------
; globally-accessible variables
; in fixed position to allow
; compressed code to work
;-------------------------------
APIEND = HIGHPOINT
gTrack = APIEND-$01 ; byte
gSector = gTrack-$01 ; byte
mliparam = gSector-26 ; 26 bytes
access = mliparam + 3 ; access privileges (set by MLI get_file_info)
filetype = access + 1 ; file type (set by MLI get_file_info)
auxtype = filetype + 1 ; auxiliary file type (2 bytes, set by MLI get_file_info)
refnum = auxtype ; file refnum (set by MLI open)
mlilen = refnum + 1 ; file length (set by MLI read)
blocks = mlilen + 2 ; blocks used (set by getvolumeinfo)
; member is also used by createfile
; !fill 8 ; used by get_file_info
VolumeName = mliparam-15 ; 15 bytes
OnlineReturn = VolumeName-1 ; byte
kForceLower = OnlineReturn-1 ; byte
T00PakPtr = kForceLower-2 ; 2 bytes
DiskIIArray = T00PakPtr-7 ; 7 bytes
HardDiskArray = DiskIIArray-15 ; 15 bytes
RAMDiskImagePath = HardDiskArray-21 ; 21 bytes
HardDiskImagePath = RAMDiskImagePath-37 ; 37 bytes
gMode = HardDiskImagePath-$01 ; byte
gPatchCount = gMode-$01 ; byte
gTriedUniv = gPatchCount-$01 ; byte
gSaidWriting = gTriedUniv-$01 ; byte
gChangedPrefs = gSaidWriting-$01 ; byte
gLastTrack = gChangedPrefs-$01 ; byte
gDiskVolumeNumber = gLastTrack-$01 ; byte
;FIRSTFILTER ; add new gIs* below this line
gIsDOS32 = gDiskVolumeNumber-$01 ; byte
gIsBoot0 = gIsDOS32-$01 ; byte
gCapturedDiskVolumeNumber = gIsBoot0-$01 ; byte
gIsProDOS = gCapturedDiskVolumeNumber-$01 ; byte
gIsDinkeyDOS = gIsProDOS-$01 ; byte
gIsPascal = gIsDinkeyDOS-$01 ; byte
gIsProtDOS = gIsPascal-$01 ; byte
gIsDavidDOS = gIsProtDOS-$01 ; byte
gIsEA = gIsDavidDOS-$01 ; byte
gPossibleGamco = gIsEA-$01 ; byte
gIsOptimum = gPossibleGamco-$01 ; byte
gIs8b3 = gIsOptimum-$01 ; byte
gIsMilliken1 = gIs8b3-$01 ; byte
gAdventureInternational = gIsMilliken1-$01 ; byte
gIsLaureate = gAdventureInternational-$01 ; byte
gIsDatasoft = gIsLaureate-$01 ; byte
gIsSierra = gIsDatasoft-$01 ; byte
gIsSierra13 = gIsSierra-$01 ; byte
gIsF7F6 = gIsSierra13-$01 ; byte
gIsTrillium = gIsF7F6-$01 ; byte
gPolarwareTamperCheck = gIsTrillium-$01 ; byte
gForceDiskVol = gPolarwareTamperCheck-$01 ; byte
gIsAdvent = gForceDiskVol-$01 ; byte
gIsPanglosDOS = gIsAdvent-$01 ; byte
gIsDavidson = gIsPanglosDOS-$01 ; byte
gIsRDOS13 = gIsDavidson-$01 ; byte
gIsMUSERWTS = gIsRDOS13-$01 ; byte
gIsHolle = gIsMUSERWTS-$01 ; byte
gIsPhoenix = gIsHolle-$01 ; byte
gIsDiversi = gIsPhoenix-$01 ; byte
gIsTSR = gIsDiversi-$01 ; byte
gPossibleMECCSwapper = gIsTSR-$01 ; byte
gPossibleWoodbury = gPossibleMECCSwapper-$01 ; byte
gPossibleB4BBBasic = gPossibleWoodbury-$01 ; byte
gIsLowDOS = gPossibleB4BBBasic-$01 ; byte
gIsBaudville = gIsLowDOS-$01 ; byte
gIsEnlightenment = gIsBaudville-$01 ; byte
gIsDidatech = gIsEnlightenment-$01 ; byte
gIsJMP600 = gIsDidatech-$01 ; byte
;LASTFILTER ; add new gIs* above this line
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
gIsInfocom18 = gIsJMP600-$01 ; byte
;gIs13Sector is a special case whose ID is not in the regular inspection path
gIs13Sector = gIsInfocom18-$01 ; byte
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
gMECCFastloadType = gIs13Sector-$01 ; byte
;gIsRW18 is a special case whose ID is not in the regular inspection path
gIsRW18 = gMECCFastloadType-$01 ; byte
gTargetType = gIsRW18-$01 ; byte
gRAMDiskRef = gTargetType-$01 ; byte
gHardDiskRef = gRAMDiskRef-$01 ; byte
gDisplayBytes = gHardDiskRef-$0A ; 10 bytes
jcompare3 = gDisplayBytes-$03 ; 3-byte
jcompare2 = jcompare3-$03 ; 3-byte
jcompare1 = jcompare2-$03 ; 3-byte
jcompare = jcompare1-$03 ; 3-byte
jmultimodify = jcompare-$03 ; 3-byte
jmodify3 = jmultimodify-$03 ; 3-byte
jmodify2 = jmodify3-$03 ; 3-byte
jmodify1 = jmodify2-$03 ; 3-byte
jmodify = jmodify1-$03 ; 3-byte
jPrintByID = jmodify-$03 ; 3-byte
jSearchTrack = jPrintByID-$03 ; 3-byte
jCallRWTS = jSearchTrack-$03 ; 3-byte
jCopyMemory = jCallRWTS-$03 ; 3-byte
jCopyUniversalAnywhere = jCopyMemory-$03 ; 3-byte
jConstructStandardDelivery = jCopyUniversalAnywhere-$03 ; 3-byte
gNIBTableFF = jConstructStandardDelivery-1 ; 1 byte
gNIBTable = gNIBTableFF-$FF ; accessed by +$80
gNIBTableBase = gNIBTableFF-$7F ; 127 bytes
!ifdef MODULE {
compare = jcompare
compare1 = jcompare1
compare2 = jcompare2
compare3 = jcompare3
modify = jmodify
modify1 = jmodify1
modify2 = jmodify2
modify3 = jmodify3
multimodify = jmultimodify
PrintByID = jPrintByID
SearchTrack = jSearchTrack
CallRWTS = jCallRWTS
CopyMemory = jCopyMemory
CopyUniversalAnywhere = jCopyUniversalAnywhere
ConstructStandardDelivery = jConstructStandardDelivery
}
!ifdef VERBOSE {
!if VERBOSE=1 {
!warn "gTrack=",gTrack
!warn "gSector=",gSector
!warn "mliparam=",mliparam
!warn "access=",access
!warn "filetype=",filetype
!warn "auxtype=",auxtype
!warn "refnum=",refnum
!warn "mlilen=",mlilen
!warn "blocks=",blocks
!warn "OnlineReturn=",OnlineReturn
!warn "VolumeName=",VolumeName
!warn "kForceLower=",kForceLower
!warn "T00PakPtr=",T00PakPtr
!warn "DiskIIArray=",DiskIIArray
!warn "HardDiskArray=",HardDiskArray
!warn "RAMDiskImagePath=",RAMDiskImagePath
!warn "HardDiskImagePath=",HardDiskImagePath
!warn "gMode=",gMode
!warn "gPatchCount=",gPatchCount
!warn "gTriedUniv=",gTriedUniv
!warn "gSaidWriting=",gSaidWriting
!warn "gChangedPrefs=",gChangedPrefs
!warn "gLastTrack=",gLastTrack
!warn "gIsDOS32=",gIsDOS32
!warn "gIsBoot0=",gIsBoot0
!warn "gCapturedDiskVolumeNumber=",gCapturedDiskVolumeNumber
!warn "gIsProDOS=",gIsProDOS
!warn "gIsDinkeyDOS=",gIsDinkeyDOS
!warn "gIsPascal=",gIsPascal
!warn "gIsProtDOS=",gIsProtDOS
!warn "gIsDavidDOS=",gIsDavidDOS
!warn "gIsEA=",gIsEA
!warn "gPossibleGamco=",gPossibleGamco
!warn "gIsOptimum=",gIsOptimum
!warn "gMECCFastloadType=",gMECCFastloadType
!warn "gIs8b3=",gIs8b3
!warn "gIsMilliken1=",gIsMilliken1
!warn "gAdventureInternational=",gAdventureInternational
!warn "gIsLaureate=",gIsLaureate
!warn "gIsDatasoft=",gIsDatasoft
!warn "gIsSierra=",gIsSierra
!warn "gissierra13=",gissierra13
!warn "gIsF7F6=",gIsF7F6
!warn "gIsTrillium=",gIsTrillium
!warn "gPolarwareTamperCheck=",gPolarwareTamperCheck
!warn "gForceDiskVol=",gIsForceDiskVol
!warn "gIsAdvent=",gIsAdvent
!warn "gIsPanglosDOS=",gIsPanglosDOS
!warn "gIsDavidson=",gIsDavidson
!warn "gIsMUSERWTS=",gIsMUSERWTS
!warn "gIsHolle=",gIsHolle
!warn "gIsPhoenix=",gIsPhoenix
!warn "gIsDiversi=",gIsDiversi
!warn "gIsTSR=",gIsTSR
!warn "gPossibleMECCSwpper",gPossibleMECCSwapper
!warn "gPossibleWoodbury",gPossibleWoodbury
!warn "gIsRDOS13=",gIsRDOS13
!warn "gIsInfocom18=",gIsInfocom18
!warn "gIs13Sector=",gIs13Sector
!warn "gIsRW18=",gIsRW18
!warn "gTargetType=",gTargetType
!warn "gRAMDiskRef=",gRAMDiskRef
!warn "gHardDiskRef=",gHardDiskRef
!warn "gDisplayBytes=",gDisplayBytes
!warn "jcompare=",jcompare
!warn "jmodify=",jmodify
!warn "jmultimodify=",jmultimodify
!warn "jPrintByID=",jPrintByID
!warn "jSearchTrack=",jSearchTrack
!warn "jCallRWTS=",jCallRWTS
!warn "jCopyMemory=",jCopyMemory
!warn "jCopyUniversalAnywhere=",jCopyUniversalAnywhere
!warn "jConstructStandardDelivery=",jConstructStandardDelivery
!warn "gNIBTableFF=",gNIBTableFF
!warn "gNIBTable=",gNIBTable
!warn "gNIBTableBase=",gNIBTableBase
}
}