passport/src/apidefs.a

317 lines
14 KiB
Plaintext
Raw Normal View History

2021-07-07 16:01:15 +00:00
;-------------------------------
; Global constants, addresses, and other sundries
;
; /!\ Everything after APIEND must be kept in sync
; with apidefs.a!
;
; /!\ NO CODE IN THIS FILE, NO EXCEPTIONS
;-------------------------------
2021-04-08 20:11:00 +00:00
TRUE = $00 ; Lots of code assumes this is zero
; so it can branch with BEQ, so
2021-04-08 20:11:00 +00:00
; don't change it!
FALSE = $01
2021-06-11 19:19:41 +00:00
;-------------------------------
;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
2018-07-03 17:46:03 +00:00
;-------------------------------
;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
2021-04-20 01:17:23 +00:00
; Standard zero-page addresses
TEXTTOP = $22
HPOS = $24
2021-04-20 01:17:23 +00:00
VPOS = $25
; Standard addresses
PRODOSMLI= $BF00
2021-04-20 04:27:11 +00:00
KEY = $C000
STROBE = $C010
2021-04-20 01:17:23 +00:00
TEXT = $FB2F
HOME = $FC58
WAIT = $FCA8
PRBYTE = $FDDA
COUT = $FDED
2021-06-18 00:52:42 +00:00
; 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
2021-06-18 00:52:42 +00:00
; 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
}
2019-04-17 05:56:58 +00:00
LOWPOINT = $4000 ; lowest available address for code
HIGHPOINT = $B200 ; highest available address+1 for code
PREFSBUFFER = $B600
PREFSREADLEN = $0003
2021-04-16 15:48:53 +00:00
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!
2021-04-20 01:17:23 +00:00
; 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
gPossibleD5D5F7 = gIsOptimum-$01 ; byte
gIs8b3 = gPossibleD5D5F7-$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
2022-06-24 17:44:26 +00:00
gIsBaudville = gIsLowDOS-$01 ; byte
gIsEnlightenment = gIsBaudville-$01 ; byte
;LASTFILTER ; add new gIs* above this line
2018-12-28 19:46:36 +00:00
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
gIsInfocom18 = gIsEnlightenment-$01 ; byte
2018-12-29 06:20:48 +00:00
;gIs13Sector is a special case whose ID is not in the regular inspection path
gIs13Sector = gIsInfocom18-$01 ; byte
2018-07-03 17:46:03 +00:00
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
gMECCFastloadType = gIs13Sector-$01 ; byte
2021-04-20 23:29:46 +00:00
;gIsRW18 is a special case whose ID is not in the regular inspection path
gIsRW18 = gMECCFastloadType-$01 ; byte
2021-07-11 18:18:34 +00:00
gTargetType = gIsRW18-$01 ; byte
gRAMDiskRef = gTargetType-$01 ; byte
gHardDiskRef = gRAMDiskRef-$01 ; byte
gDisplayBytes = gHardDiskRef-$0A ; 10 bytes
2021-06-21 15:57:02 +00:00
jcompare3 = gDisplayBytes-$03 ; 3-byte
jcompare2 = jcompare3-$03 ; 3-byte
jcompare1 = jcompare2-$03 ; 3-byte
2021-06-21 15:24:21 +00:00
jcompare = jcompare1-$03 ; 3-byte
2021-06-21 15:57:02 +00:00
jmodify3 = jcompare-$03 ; 3-byte
jmodify2 = jmodify3-$03 ; 3-byte
jmodify1 = jmodify2-$03 ; 3-byte
2021-06-21 14:33:16 +00:00
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
2021-06-21 15:24:21 +00:00
compare1 = jcompare1
2021-06-21 15:57:02 +00:00
compare2 = jcompare2
compare3 = jcompare3
modify = jmodify
2021-06-21 14:33:16 +00:00
modify1 = jmodify1
2021-06-21 15:57:02 +00:00
modify2 = jmodify2
modify3 = jmodify3
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
2018-07-03 17:46:03 +00:00
!warn "gMECCFastloadType=",gMECCFastloadType
!warn "gPossibleD5D5F7=",gPossibleD5D5F7
!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
2018-01-28 18:11:15 +00:00
!warn "gPolarwareTamperCheck=",gPolarwareTamperCheck
!warn "gForceDiskVol=",gIsForceDiskVol
!warn "gIsAdvent=",gIsAdvent
2018-06-07 15:18:06 +00:00
!warn "gIsPanglosDOS=",gIsPanglosDOS
!warn "gIsDavidson=",gIsDavidson
!warn "gIsMUSERWTS=",gIsMUSERWTS
!warn "gIsHolle=",gIsHolle
2019-04-08 00:02:19 +00:00
!warn "gIsPhoenix=",gIsPhoenix
2019-10-11 20:50:31 +00:00
!warn "gIsDiversi=",gIsDiversi
2020-07-22 23:01:07 +00:00
!warn "gIsTSR=",gIsTSR
!warn "gPossibleMECCSwpper",gPossibleMECCSwapper
!warn "gPossibleWoodbury",gPossibleWoodbury
!warn "gIsRDOS13=",gIsRDOS13
2018-12-28 19:46:36 +00:00
!warn "gIsInfocom18=",gIsInfocom18
2018-12-29 06:20:48 +00:00
!warn "gIs13Sector=",gIs13Sector
2021-04-20 23:29:46 +00:00
!warn "gIsRW18=",gIsRW18
!warn "gTargetType=",gTargetType
!warn "gRAMDiskRef=",gRAMDiskRef
2021-04-14 01:09:55 +00:00
!warn "gHardDiskRef=",gHardDiskRef
!warn "gDisplayBytes=",gDisplayBytes
!warn "jcompare=",jcompare
!warn "jmodify=",jmodify
!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
}
}