483 lines
31 KiB
NASM
483 lines
31 KiB
NASM
|
;
|
||
|
; Commodore 64 specific constants and memory addresses
|
||
|
;
|
||
|
.proff
|
||
|
|
||
|
.cpu "6502"
|
||
|
|
||
|
io .namespace
|
||
|
|
||
|
.include "vic2.asm"
|
||
|
.include "sid.asm"
|
||
|
|
||
|
.virtual $d000
|
||
|
vic2 .dstruct _vic2
|
||
|
.endvirtual
|
||
|
|
||
|
.virtual $d400
|
||
|
sid .dstruct _sid
|
||
|
.endvirtual
|
||
|
|
||
|
.endnamespace
|
||
|
|
||
|
BASIC_START = $0801
|
||
|
BTOK_SYS = $9e
|
||
|
SCREEN_RAM = $0400
|
||
|
|
||
|
; Kernal routines
|
||
|
|
||
|
ACPTR = $ffa5 ; Input byte from serial port
|
||
|
CHKIN = $ffc6 ; Open channel for input
|
||
|
CHKOUT = $ffc9 ; Open a channel for output
|
||
|
CHRIN = $ffcf ; Get a character from the input channel
|
||
|
CHROUT = $ffd2 ; Output a character
|
||
|
CIOUT = $ffa8 ; Transmit a byte over the serial bus
|
||
|
CINT = $ff81 ; Initialize the screen editor and VIC-II Chip
|
||
|
CLALL = $ffe7 ; Close all open files
|
||
|
CLOSE = $ffc3 ; Close a logical file
|
||
|
CLRCHN = $ffcc ; Clear all I/O channels
|
||
|
GETIN = $ffe4 ; Get a character
|
||
|
IOBASE = $fff3 ; Define I/O memory page
|
||
|
IOINIT = $ff84 ; Initialize I/O devices
|
||
|
LISTEN = $ffb1 ; Command a device on the serial bus to listen
|
||
|
LOAD = $ffd5 ; Load RAM from device
|
||
|
MEMBOT = $ff9c ; Set bottom of memory
|
||
|
MEMTOP = $ff99 ; Set the top of RAM
|
||
|
OPEN = $ffc0 ; Open a logical file
|
||
|
PLOT = $fff0 ; Set or retrieve cursor location
|
||
|
RAMTAS = $ff87 ; Perform RAM test
|
||
|
RDTIM = $ffde ; Read system clock
|
||
|
READST = $ffb7 ; Read status word
|
||
|
RESTOR = $ff8a ; Set the top of RAM
|
||
|
SAVE = $ffd8 ; Save memory to a device
|
||
|
SCNKEY = $ff9f ; Scan the keyboard
|
||
|
SCREEN = $ffed ; Return screen format
|
||
|
SECOND = $ff93 ; Send secondary address for LISTEN
|
||
|
SETLFS = $ffba ; Set up a logical file
|
||
|
SETMSG = $ff90 ; Set system message output
|
||
|
SETNAM = $ffbd ; Set up file name
|
||
|
SETTIM = $ffdb ; Set the system clock
|
||
|
SETTMO = $ffa2 ; Set IEEE bus card timeout flag
|
||
|
STOP = $ffe1 ; Check if STOP key is pressed
|
||
|
TALK = $ffb4 ; Command a device on the serial bus to talk
|
||
|
TKSA = $ff96 ; Send a secondary address to a device commanded to talk
|
||
|
UDTIM = $ffea ; Update the system clock
|
||
|
UNLSN = $ffae ; Send an UNLISTEN command
|
||
|
UNTLK = $ffab ; Send an UNTALK command
|
||
|
VECTOR = $ff8d ; Manage RAM vectors
|
||
|
|
||
|
|
||
|
; BASIC routines
|
||
|
|
||
|
STMDSP = $a00c ; BASIC Command Vectors WORD
|
||
|
FUNDSP = $a052 ; BASIC Function Vectors WORD
|
||
|
OPTAB = $a080 ; BASIC Operator Vectors WORD
|
||
|
RESLST = $a09e ; BASIC Command Keyword Table DATA
|
||
|
MSCLST = $a129 ; BASIC Misc. Keyword Table DATA
|
||
|
OPLIST = $a140 ; BASIC Operator Keyword Table DATA
|
||
|
FUNLST = $a14d ; BASIC Function Keyword Table DATA
|
||
|
ERRTAB = $a19e ; Error Message Table DATA
|
||
|
ERRPTR = $a328 ; Error Message Pointers WORD
|
||
|
OKK = $a364 ; Misc. Messages TEXT
|
||
|
FNDFOR = $a38a ; Find FOR/GOSUB Entry on Stack
|
||
|
BLTU = $a3b8 ; Open Space in Memory
|
||
|
GETSTK = $a3fb ; Check Stack Depth
|
||
|
REASON = $a408 ; Check Memory Overlap
|
||
|
OMERR = $a435 ; Output ?OUT OF MEMORY Error
|
||
|
ERROR = $a437 ; Error Routine
|
||
|
ERRFIN = $a469 ; Break Entry
|
||
|
READY = $a474 ; Restart BASIC
|
||
|
MAIN = $a480 ; Input & Identify BASIC Line
|
||
|
MAIN1 = $a49c ; Get Line Number & Tokenise Text
|
||
|
INSLIN = $a4a2 ; Insert BASIC Text
|
||
|
LINKPRG = $a533 ; Rechain Lines
|
||
|
INLIN = $a560 ; Input Line Into Buffer
|
||
|
CRUNCH = $a579 ; Tokenise Input Buffer
|
||
|
FNDLIN = $a613 ; Search for Line Number
|
||
|
SCRTCH = $a642 ; Perform [new]
|
||
|
CLEAR = $a65e ; Perform [clr]
|
||
|
STXPT = $a68e ; Reset TXTPTR
|
||
|
LIST = $a69c ; Perform [list]
|
||
|
QPLOP = $a717 ; Handle LIST Character
|
||
|
FOR = $a742 ; Perform [for]
|
||
|
NEWSTT = $a7ae ; BASIC Warm Start
|
||
|
CKEOL = $a7c4 ; Check End of Program
|
||
|
GONE = $a7e1 ; Prepare to execute statement
|
||
|
GONE3 = $a7ed ; Perform BASIC Keyword
|
||
|
B_RESTOR = $a81d ; Perform [restore]
|
||
|
B_STOP = $a82c ; Perform [stop], [end], break
|
||
|
CONT = $a857 ; Perform [cont]
|
||
|
RUN = $a871 ; Perform [run]
|
||
|
GOSUB = $a883 ; Perform [gosub]
|
||
|
GOTO = $a8a0 ; Perform [goto]
|
||
|
RETURN = $a8d2 ; Perform [return]
|
||
|
DATA = $a8f8 ; Perform [data]
|
||
|
DATAN = $a906 ; Search for Next Statement / Line
|
||
|
IF = $a928 ; Perform [if]
|
||
|
REM = $a93b ; Perform [rem]
|
||
|
ONGOTO = $a94b ; Perform [on]
|
||
|
LINGET = $a96b ; Fetch linnum From BASIC
|
||
|
LET = $a9a5 ; Perform [let]
|
||
|
PUTINT = $a9c4 ; Assign Integer
|
||
|
PTFLPT = $a9d6 ; Assign Floating Point
|
||
|
PUTSTR = $a9d9 ; Assign String
|
||
|
PUTTIM = $a9e3 ; Assign TI$
|
||
|
GETSPT = $aa2c ; Add Digit to FAC#1
|
||
|
PRINTN = $aa80 ; Perform [print]#
|
||
|
CMD = $aa86 ; Perform [cmd]
|
||
|
STRDON = $aa9a ; Print String From Memory
|
||
|
PRINT = $aaa0 ; Perform [print]
|
||
|
VAROP = $aab8 ; Output Variable
|
||
|
CRDO = $aad7 ; Output CR/LF
|
||
|
COMPRT = $aae8 ; Handle comma, TAB(, SPC(
|
||
|
STROUT = $ab1e ; Output String
|
||
|
OUTSPC = $ab3b ; Output Format Character
|
||
|
DOAGIN = $ab4d ; Handle Bad Data
|
||
|
GET = $ab7b ; Perform [get]
|
||
|
INPUTN = $aba5 ; Perform [input#]
|
||
|
INPUT = $abbf ; Perform [input]
|
||
|
BUFFUL = $abea ; Read Input Buffer
|
||
|
QINLIN = $abf9 ; Do Input Prompt
|
||
|
READ = $ac06 ; Perform [read]
|
||
|
RDGET = $ac35 ; General Purpose Read Routine
|
||
|
EXINT = $acfc ; Input Error Messages TEXT
|
||
|
NEXT = $ad1e ; Perform [next]
|
||
|
DONEXT = $ad61 ; Check Valid Loop
|
||
|
FRMNUM = $ad8a ; Confirm Result
|
||
|
FRMEVL = $ad9e ; Evaluate Expression in Text
|
||
|
EVAL = $ae83 ; Evaluate Single Term
|
||
|
PIVAL = $aea8 ; Constant - pi DATA
|
||
|
QDOT = $aead ; Continue Expression
|
||
|
PARCHK = $aef1 ; Expression in Brackets
|
||
|
CHKCLS = $aef7 ; Confirm Character
|
||
|
;- = $aef7 ; -test ')'-
|
||
|
;- = $aefa ; -test '('-
|
||
|
;- = $aefd ; -test comma-
|
||
|
SYNERR = $af08 ; Output ?SYNTAX Error
|
||
|
DOMIN = $af0d ; Set up NOT Function
|
||
|
RSVVAR = $af14 ; Identify Reserved Variable
|
||
|
ISVAR = $af28 ; Search for Variable
|
||
|
TISASC = $af48 ; Convert TI to ASCII String
|
||
|
ISFUN = $afa7 ; Identify Function Type
|
||
|
STRFUN = $afb1 ; Evaluate String Function
|
||
|
NUMFUN = $afd1 ; Evaluate Numeric Function
|
||
|
OROP = $afe6 ; Perform [or], [and]
|
||
|
DOREL = $b016 ; Perform <, =, >
|
||
|
NUMREL = $b01b ; Numeric Comparison
|
||
|
STRREL = $b02e ; String Comparison
|
||
|
DIM = $b07e ; Perform [dim]
|
||
|
PTRGET = $b08b ; Identify Variable
|
||
|
ORDVAR = $b0e7 ; Locate Ordinary Variable
|
||
|
NOTFNS = $b11d ; Create New Variable
|
||
|
NOTEVL = $b128 ; Create Variable
|
||
|
ARYGET = $b194 ; Allocate Array Pointer Space
|
||
|
N32768 = $b1a5 ; Constant 32768 in Flpt DATA
|
||
|
FACINX = $b1aa ; FAC#1 to Integer in (AC/YR)
|
||
|
INTIDX = $b1b2 ; Evaluate Text for Integer
|
||
|
AYINT = $b1bf ; FAC#1 to Positive Integer
|
||
|
ISARY = $b1d1 ; Get Array Parameters
|
||
|
FNDARY = $b218 ; Find Array
|
||
|
BSERR = $b245 ; ?BAD SUBSCRIPT/?ILLEGAL QUANTITY
|
||
|
NOTFDD = $b261 ; Create Array
|
||
|
INLPN2 = $b30e ; Locate Element in Array
|
||
|
UMULT = $b34c ; Number of Bytes in Subscript
|
||
|
FRE = $b37d ; Perform [fre]
|
||
|
GIVAYF = $b391 ; Convert Integer in (AC/YR) to Flpt
|
||
|
POS = $b39e ; Perform [pos]
|
||
|
ERRDIR = $b3a6 ; Confirm Program Mode
|
||
|
GETFNM = $b3e1 ; Check Syntax of FN
|
||
|
FNDOER = $b3f4 ; Perform [fn]
|
||
|
STRD = $b465 ; Perform [str$]
|
||
|
STRLIT = $b487 ; Set Up String
|
||
|
PUTNW1 = $b4d5 ; Save String Descriptor
|
||
|
GETSPA = $b4f4 ; Allocate Space for String
|
||
|
GARBAG = $b526 ; Garbage Collection
|
||
|
DVARS = $b5bd ; Search for Next String
|
||
|
GRBPAS = $b606 ; Collect a String
|
||
|
CAT = $b63d ; Concatenate Two Strings
|
||
|
MOVINS = $b67a ; Store String in High RAM
|
||
|
FRESTR = $b6a3 ; Perform String Housekeeping
|
||
|
FREFAC = $b6db ; Clean Descriptor Stack
|
||
|
CHRD = $b6ec ; Perform [chr$]
|
||
|
LEFTD = $b700 ; Perform [left$]
|
||
|
RIGHTD = $b72c ; Perform [right$]
|
||
|
MIDD = $b737 ; Perform [mid$]
|
||
|
PREAM = $b761 ; Pull sTring Parameters
|
||
|
LEN = $b77c ; Perform [len]
|
||
|
LEN1 = $b782 ; Exit String Mode
|
||
|
ASC = $b78b ; Perform [asc]
|
||
|
GTBYTC = $b79b ; Evaluate Text to 1 Byte in XR
|
||
|
VAL = $b7ad ; Perform [val]
|
||
|
STRVAL = $b7b5 ; Convert ASCII String to Flpt
|
||
|
GETNUM = $b7eb ; Get parameters for POKE/WAIT
|
||
|
GETADR = $b7f7 ; Convert FAC#1 to Integer in LINNUM
|
||
|
PEEK = $b80d ; Perform [peek]
|
||
|
POKE = $b824 ; Perform [poke]
|
||
|
WAIT = $b82d ; Perform [wait]
|
||
|
FADDH = $b849 ; Add 0.5 to FAC#1
|
||
|
FSUB = $b850 ; Perform Subtraction
|
||
|
FADD5 = $b862 ; Normalise Addition
|
||
|
FADD = $b867 ; Perform Addition
|
||
|
NEGFAC = $b947 ; 2's Complement FAC#1
|
||
|
OVERR = $b97e ; Output ?OVERFLOW Error
|
||
|
MULSHF = $b983 ; Multiply by Zero Byte
|
||
|
FONE = $b9bc ; Table of Flpt Constants DATA
|
||
|
LOG = $b9ea ; Perform [log]
|
||
|
FMULT = $ba28 ; Perform Multiply
|
||
|
MULPLY = $ba59 ; Multiply by a Byte
|
||
|
CONUPK = $ba8c ; Load FAC#2 From Memory
|
||
|
MULDIV = $bab7 ; Test Both Accumulators
|
||
|
MLDVEX = $bad4 ; Overflow / Underflow
|
||
|
MUL10 = $bae2 ; Multiply FAC#1 by 10
|
||
|
TENC = $baf9 ; Constant 10 in Flpt DATA
|
||
|
DIV10 = $bafe ; Divide FAC#1 by 10
|
||
|
FDIV = $bb07 ; Divide FAC#2 by Flpt at (AC/YR)
|
||
|
FDIVT = $bb0f ; Divide FAC#2 by FAC#1
|
||
|
MOVFM = $bba2 ; Load FAC#1 From Memory
|
||
|
MOV2F = $bbc7 ; Store FAC#1 in Memory
|
||
|
MOVFA = $bbfc ; Copy FAC#2 into FAC#1
|
||
|
MOVAF = $bc0c ; Copy FAC#1 into FAC#2
|
||
|
ROUND = $bc1b ; Round FAC#1
|
||
|
SIGN = $bc2b ; Check Sign of FAC#1
|
||
|
SGN = $bc39 ; Perform [sgn]
|
||
|
ABS = $bc58 ; Perform [abs]
|
||
|
FCOMP = $bc5b ; Compare FAC#1 With Memory
|
||
|
QINT = $bc9b ; Convert FAC#1 to Integer
|
||
|
INT = $bccc ; Perform [int]
|
||
|
FIN = $bcf3 ; Convert ASCII String to a Number in FAC#1
|
||
|
N0999 = $bdb3 ; String Conversion Constants DATA
|
||
|
INPRT = $bdc2 ; Output 'IN' and Line Number
|
||
|
FOUT = $bddd ; Convert FAC#1 to ASCII String
|
||
|
FOUTIM = $be68 ; Convert TI to String
|
||
|
FHALF = $bf11 ; Table of Constants DATA
|
||
|
SQR = $bf71 ; Perform [sqr]
|
||
|
FPWRT = $bf7b ; Perform power ($)
|
||
|
NEGOP = $bfb4 ; Negate FAC#1
|
||
|
LOGEB2 = $bfbf ; Table of Constants DATA
|
||
|
EXP = $bfed ; Perform [exp]
|
||
|
|
||
|
; Miscellaneous
|
||
|
|
||
|
D6510 = $0000 ; 6510 On-chip Data Direction Register.
|
||
|
R6510 = $0001 ; 6510 On-chip 8-bit Input/Output Register.
|
||
|
TEMP0002 = $0002 ; Unused. Free for user programs.
|
||
|
ADRAY1 = $0003 ; Jump Vector: Convert FAC to Integer in (A/Y) ($B1AA).
|
||
|
ADRAY2 = $0005 ; Jump Vector: Convert Integer in (A/Y) to Floating point in (FAC); ($B391).
|
||
|
CHARAC = $0007 ; Search Character/Temporary Integer during INT.
|
||
|
ENDCHR = $0008 ; Flag: Scan for Quote at end of String.
|
||
|
INTEGR = $0007 ; Temporary Integer during OR/AND.
|
||
|
TRMPOS = $0009 ; Screen Column for last TAB.
|
||
|
VERCK = $000a ; Flag: 0 = Load, 1 = Verify.
|
||
|
COUNT = $000b ; Input Buffer Pointer/Number of Subscripts.
|
||
|
DIMFLG = $000c ; Flag: Default Array dimension.
|
||
|
VALTYP = $000d ; Data type Flag: $00 = Numeric, $FF = String.
|
||
|
INTFLG = $000e ; Data type Flag: $00 = Floating point, $80 = Integer.
|
||
|
GARBFL = $000f ; Flag: DATA scan/List Quote/Garbage collection.
|
||
|
SUBFLG = $0010 ; Flag: Subscript reference/User Function call.
|
||
|
INPFLG = $0011 ; Input Flag: $00 = INPUT, $40 = GET, $98 = READ.
|
||
|
TANSGN = $0012 ; Flag: TAN sign/Comparative result.
|
||
|
CHANNL = $0013 ; File number of current Input Device.
|
||
|
LINNUM = $0014 ; Temporary: Integer value.
|
||
|
TEMPPT = $0016 ; Pointer: Temporary String Stack.
|
||
|
LASTPT = $0017 ; Last temporary String Address.
|
||
|
TEMPST = $0019 ; Stack for temporary Strings.
|
||
|
INDEX = $0022 ; Utility Pointer Area.
|
||
|
INDEX1 = $0022 ; First Utility Pointer.
|
||
|
INDEX2 = $0024 ; Second Utility Pointer.
|
||
|
RESHO = $0026 ; Floating point product of Multiply and Divide.
|
||
|
TXTTAB = $002b ; Pointer: Start of BASIC Text Area ($0801).
|
||
|
VARTAB = $002d ; Pointer: Start of BASIC Variables.
|
||
|
ARYTAB = $002f ; Pointer: Start of BASIC Arrays.
|
||
|
STREND = $0031 ; Pointer: End of BASIC Arrays + 1.
|
||
|
FRETOP = $0033 ; Pointer: Bottom of String space.
|
||
|
FRESPC = $0035 ; Utility String Pointer.
|
||
|
ZMEMSIZ = $0037 ; Pointer: Highest Address available to BASIC ($A000).
|
||
|
CURLIN = $0039 ; Current BASIC Line number.
|
||
|
OLDLIN = $003b ; Previous BASIC Line number.
|
||
|
OLDTXT = $003d ; Pointer: BASIC Statement for CONT.
|
||
|
DATLIN = $003f ; Current DATA Line number.
|
||
|
DATPTR = $0041 ; Pointer: Used by READ - current DATA Item Address.
|
||
|
INPPTR = $0043 ; Pointer: Temporary storage of Pointer during INPUT Routine.
|
||
|
VARNAM = $0045 ; Name of Variable being sought in Variable Table.
|
||
|
VARPNT = $0047 ; Pointer: to value of (VARNAM) if Integer, to descriptor if String.
|
||
|
FORPNT = $0049 ; Pointer: Index Variable for FOR/NEXT loop.
|
||
|
VARTXT = $004b ; Temporary storage for TXTPTR during READ, INPUT and GET.
|
||
|
OPMASK = $004d ; Mask used during FRMEVL.
|
||
|
TEMPF3 = $004e ; Temporary storage for FLPT value.
|
||
|
FOUR6 = $0053 ; Length of String Variable during garbage collection.
|
||
|
JMPER = $0054 ; Jump Vector used in Function Evaluation - JMP followed by Address ($4C,$LB,$MB).
|
||
|
TEMPF1 = $0057 ; Temporary storage for FLPT value.
|
||
|
TEMPF2 = $005c ; Temporary storage for FLPT value.
|
||
|
FAC = $0061 ; Main Floating point Accumulator.
|
||
|
FACEXP = $0061 ; FAC Exponent.
|
||
|
FACHO = $0062 ; FAC Mantissa.
|
||
|
FACSGN = $0066 ; FAC Sign.
|
||
|
SGNFLG = $0067 ; Pointer: Series Evaluation Constant.
|
||
|
BITS = $0068 ; Bit Overflow Area during normalisation Routine.
|
||
|
AFAC = $0069 ; Auxiliary Floating point Accumulator.
|
||
|
ARGEXP = $0069 ; AFAC Exponent.
|
||
|
ARGHO = $006a ; AFAC Mantissa.
|
||
|
ARGSGN = $006e ; AFAC Sign.
|
||
|
ARISGN = $006f ; Sign of result of Arithmetic Evaluation.
|
||
|
FACOV = $0070 ; FAC low-order rounding.
|
||
|
FBUFPT = $0071 ; Pointer: Used during CRUNCH/ASCII conversion.
|
||
|
CHRGET = $0073 ; Subroutine: Get next Byte of BASIC Text.
|
||
|
CHRGOT = $0079 ; Entry to Get same Byte again.
|
||
|
TXTPTR = $007a ; Pointer: Current Byte of BASIC Text.
|
||
|
RNDX = $008b ; Floating RND Function Seed Value.
|
||
|
STATUS = $0090 ; Kernal I/O Status Word ST.
|
||
|
STKEY = $0091 ; Flag: $7F = STOP key.
|
||
|
SVXT = $0092 ; Timing Constant for Tape.
|
||
|
VERCKK = $0093 ; Flag: 0 = Load, 1 = Verify.
|
||
|
C3PO = $0094 ; Flag: Serial Bus - Output Character buffered.
|
||
|
BSOUR = $0095 ; Buffered Character for Serial Bus.
|
||
|
SYNO = $0096 ; Cassette Sync. number.
|
||
|
TEMPX = $0097 ; Temporary storage of X Register during CHRIN.
|
||
|
TEMPY = $0097 ; Temporary storage of Y Register during RS232 fetch.
|
||
|
LDTND = $0098 ; Number of Open Files/Index to File Table.
|
||
|
DFLTN = $0099 ; Default Input Device (0).
|
||
|
DFLTO = $009a ; Default Output Device (3).
|
||
|
PRTY = $009b ; Parity of Byte Output to Tape.
|
||
|
DPSW = $009c ; Flag: Byte received from Tape.
|
||
|
MSGFLG = $009d ; Flag: $00 = Program mode: Suppress Error Messages, $40 = Kernal Error Messages only, $80 = Direct mode: Full Error Messages.
|
||
|
FNMIDX = $009e ; Index to Cassette File name/Header ID for Tape write.
|
||
|
PTR1 = $009e ; Tape Error log pass 1.
|
||
|
PTR2 = $009f ; Tape Error log pass 2.
|
||
|
TIME = $00a0 ; Real-time jiffy Clock (Updated by IRQ Interrupt approx. every 1/60 of Second); Update Routine: UDTIMK ($F69B).
|
||
|
TSFCNT = $00a3 ; Bit Counter Tape Read or Write/Serial Bus EOI (End Of Input) Flag.
|
||
|
TBTCNT = $00a4 ; Pulse Counter Tape Read or Write/Serial Bus shift Counter.
|
||
|
CNTDN = $00a5 ; Tape Synchronising count down.
|
||
|
BUFPNT = $00a6 ; Pointer: Tape I/O buffer.
|
||
|
INBIT = $00a7 ; RS232 temporary for received Bit/Tape temporary.
|
||
|
BITC1 = $00a8 ; RS232 Input Bit count/Tape temporary.
|
||
|
RINONE = $00a9 ; RS232 Flag: Start Bit check/Tape temporary.
|
||
|
RIDATA = $00aa ; RS232 Input Byte Buffer/Tape temporary.
|
||
|
RIPRTY = $00ab ; RS232 Input parity/Tape temporary.
|
||
|
SAL = $00ac ; Pointer: Tape Buffer/Screen scrolling.
|
||
|
EAL = $00ae ; Tape End Address/End of Program.
|
||
|
CMPO = $00b0 ; Tape timing Constants.
|
||
|
TAPE1 = $00b2 ; Pointer: Start Address of Tape Buffer ($033C).
|
||
|
BITTS = $00b4 ; RS232 Write bit count/Tape Read timing Flag.
|
||
|
NXTBIT = $00b5 ; RS232 Next Bit to send/Tape Read - End of Tape.
|
||
|
RODATA = $00b6 ; RS232 Output Byte Buffer/Tape Read Error Flag.
|
||
|
FNLEN = $00b7 ; Number of Characters in Filename.
|
||
|
LA = $00b8 ; Current File - Logical File number.
|
||
|
SA = $00b9 ; Current File - Secondary Address.
|
||
|
FA = $00ba ; Current File - First Address (Device number). OPEN LA,FA,SA; OPEN 1,8,15,"I0":CLOSE 1
|
||
|
FNADR = $00bb ; Pointer: Current File name Address.
|
||
|
ROPRTY = $00bd ; RS232 Output Parity/Tape Byte to be Input or Output.
|
||
|
FSBLK = $00be ; Tape Input/Output Block count.
|
||
|
MYCH = $00bf ; Serial Word Buffer.
|
||
|
CAS1 = $00c0 ; Tape Motor Switch.
|
||
|
STAL = $00c1 ; Start Address for LOAD and Cassette Write.
|
||
|
MEMUSS = $00c3 ; Pointer: Type 3 Tape LOAD and general use.
|
||
|
LSTX = $00c5 ; Matrix value of last Key pressed; No Key = $40.
|
||
|
NDX = $00c6 ; Number of Characters in Keyboard Buffer queue.
|
||
|
RVS = $00c7 ; Flag: Reverse On/Off; On = $01, Off = $00.
|
||
|
INDX = $00c8 ; Pointer: End of Line for Input (Used to suppress trailing spaces).
|
||
|
LXSP = $00c9 ; Cursor X/Y (Line/Column) position at start of Input.
|
||
|
SFDX = $00cb ; Flag: Print shifted Characters.
|
||
|
BLNSW = $00cc ; Flag: Cursor blink; $00 = Enabled, $01 = Disabled.
|
||
|
BLNCT = $00cd ; Timer: Count down for Cursor blink toggle.
|
||
|
GDBLN = $00ce ; Character under Cursor while Cursor Inverted.
|
||
|
BLNON = $00cf ; Flag: Cursor Status; $00 = Off, $01 = On.
|
||
|
CRSW = $00d0 ; Flag: Input from Screen = $03, or Keyboard = $00.
|
||
|
PNT = $00d1 ; Pointer: Current Screen Line Address.
|
||
|
PNTR = $00d3 ; Cursor Column on current Line, including Wrap-round Line, if any.
|
||
|
QTSW = $00d4 ; Flag: Editor in Quote Mode; $00 = Not.
|
||
|
LNMX = $00d5 ; Current logical Line length: 39 or 79.
|
||
|
TBLX = $00d6 ; Current Screen Line number of Cursor.
|
||
|
SCHAR = $00d7 ; Screen value of current Input Character/Last Character Output.
|
||
|
INSRT = $00d8 ; Count of number of inserts outstanding.
|
||
|
LDTB1 = $00d9 ; Screen Line link Table/Editor temporaries. High Byte of Line Screen Memory Location.
|
||
|
USER = $00f3 ; Pointer: Current Colour RAM Location.
|
||
|
KEYTAB = $00f5 ; Vector: Current Keyboard decoding Table. ($EB81)
|
||
|
RIBUF = $00f7 ; RS232 Input Buffer Pointer.
|
||
|
ROBUF = $00f9 ; RS232 Output Buffer Pointer.
|
||
|
FREKZP = $00fb ; Free Zero Page space for User Programs.
|
||
|
BASZPT = $00ff ; BASIC temporary Data Area.
|
||
|
ASCWRK = $00ff ; Assembly Area for Floating point to ASCII conversion.
|
||
|
BAD = $0100 ; Tape Input Error log.
|
||
|
STACK = $0100 ; 6510 Hardware Stack Area.
|
||
|
BSTACK = $013f ; BASIC Stack Area.
|
||
|
BUF = $0200 ; BASIC Input Buffer (Input Line from Screen).
|
||
|
LAT = $0259 ; Kernal Table: Active logical File numbers.
|
||
|
FAT = $0263 ; Kernal Table: Active File First Addresses (Device numbers).
|
||
|
SAT = $026d ; Kernal Table: Active File Secondary Addresses.
|
||
|
KEYD = $0277 ; Keyboard Buffer Queue (FIFO).
|
||
|
MEMSTR = $0281 ; Pointer: Bottom of Memory for Operating System ($0800).
|
||
|
MEMSIZ = $0283 ; Pointer: Top of Memory for Operating System ($A000).
|
||
|
TIMOUT = $0285 ; Serial IEEE Bus timeout defeat Flag.
|
||
|
COLOR = $0286 ; Current Character Colour code.
|
||
|
GDCOL = $0287 ; Background Colour under Cursor.
|
||
|
HIBASE = $0288 ; High Byte of Screen Memory Address ($04).
|
||
|
XMAX = $0289 ; Maximum number of Bytes in Keyboard Buffer ($0A).
|
||
|
RPTFLG = $028a ; Flag: Repeat keys; $00 = Cursors, INST/DEL & Space repeat, $40 no Keys repeat, $80 all Keys repeat ($00).
|
||
|
KOUNT = $028b ; Repeat Key: Speed Counter ($04).
|
||
|
DELAY = $028c ; Repeat Key: First repeat delay Counter ($10).
|
||
|
SHFLAG = $028d ; Flag: Shift Keys: Bit 1 = Shift, Bit 2 = CBM, Bit 3 = CTRL; ($00 = None, $01 = Shift, etc.).
|
||
|
LSTSHF = $028e ; Last Shift Key used for debouncing.
|
||
|
KEYLOG = $028f ; Vector: Routine to determine Keyboard table to use based on Shift Key Pattern ($EB48).
|
||
|
MODE = $0291 ; Flag: Upper/Lower Case change: $00 = Disabled, $80 = Enabled ($00).
|
||
|
AUTODN = $0292 ; Flag: Auto scroll down: $00 = Disabled ($00).
|
||
|
M51CTR = $0293 ; RS232 Pseudo 6551 control Register Image.
|
||
|
M51CDR = $0294 ; RS232 Pseudo 6551 command Register Image.
|
||
|
M51AJB = $0295 ; RS232 Non-standard Bits/Second.
|
||
|
RSSTAT = $0297 ; RS232 Pseudo 6551 Status Register Image.
|
||
|
BITNUM = $0298 ; RS232 Number of Bits left to send.
|
||
|
BAUDOF = $0299 ; RS232 Baud Rate; Full Bit time microseconds.
|
||
|
RIDBE = $029b ; RS232 Index to End of Input Buffer.
|
||
|
RIDBS = $029c ; RS232 Pointer: High Byte of Address of Input Buffer.
|
||
|
RODBS = $029d ; RS232 Pointer: High Byte of Address of Output Buffer.
|
||
|
RODBE = $029e ; RS232 Index to End of Output Buffer.
|
||
|
IRQTMP = $029f ; Temporary store for IRQ Vector during Tape operations.
|
||
|
ENABL = $02a1 ; RS232 Enables.
|
||
|
TODSNS = $02a2 ; TOD sense during Tape I/O.
|
||
|
TRDTMP = $02a3 ; Temporary storage during Tape READ.
|
||
|
TD1IRQ = $02a4 ; Temporary D1IRQ Indicator during Tape READ.
|
||
|
TLNIDX = $02a5 ; Temporary for Line Index.
|
||
|
TVSFLG = $02a6 ; Flag: TV Standard: $00 = NTSC, $01 = PAL.
|
||
|
TEMP02a7 = $02a7 ; Unused.
|
||
|
SPR11 = $02c0 ; Sprite #11 Data Area. (SCREEN + $03F8 + SPR number) POKE 1024+1016+0,11 to use Sprite#0 DATA from ($02C0-$02FE).
|
||
|
IERROR = $0300 ; Vector: Indirect entry to BASIC Error Message, (X) points to Message ($E38B).
|
||
|
IMAIN = $0302 ; Vector: Indirect entry to BASIC Input Line and Decode ($A483).
|
||
|
ICRNCH = $0304 ; Vector: Indirect entry to BASIC Tokenise Routine ($A57C).
|
||
|
IQPLOP = $0306 ; Vector: Indirect entry to BASIC LIST Routine ($A71A).
|
||
|
IGONE = $0308 ; Vector: Indirect entry to BASIC Character dispatch Routine ($A7E4).
|
||
|
IEVAL = $030a ; Vector: Indirect entry to BASIC Token evaluation ($AE86).
|
||
|
SAREG = $030c ; Storage for 6510 Accumulator during SYS.
|
||
|
SXREG = $030d ; Storage for 6510 X-Register during SYS.
|
||
|
SYREG = $030e ; Storage for 6510 Y-Register during SYS.
|
||
|
SPREG = $030f ; Storage for 6510 Status Register during SYS.
|
||
|
USRPOK = $0310 ; USR Function JMP Instruction ($4C).
|
||
|
USRADD = $0311 ; USR Address ($LB,$MB).
|
||
|
TEMP0313 = $0313 ; Unused.
|
||
|
CINV = $0314 ; Vector: Hardware IRQ Interrupt Address ($EA31).
|
||
|
CNBINV = $0316 ; Vector: BRK Instruction Interrupt Address ($FE66).
|
||
|
NMINV = $0318 ; Vector: Hardware NMI Interrupt Address ($FE47).
|
||
|
IOPEN = $031a ; Vector: Indirect entry to Kernal OPEN Routine ($F34A).
|
||
|
ICLOSE = $031c ; Vector: Indirect entry to Kernal CLOSE Routine ($F291).
|
||
|
ICHKIN = $031e ; Vector: Indirect entry to Kernal CHKIN Routine ($F20E).
|
||
|
ICKOUT = $0320 ; Vector: Indirect entry to Kernal CHKOUT Routine ($F250).
|
||
|
ICLRCH = $0322 ; Vector: Indirect entry to Kernal CLRCHN Routine ($F333).
|
||
|
IBASIN = $0324 ; Vector: Indirect entry to Kernal CHRIN Routine ($F157).
|
||
|
IBSOUT = $0326 ; Vector: Indirect entry to Kernal CHROUT Routine ($F1CA).
|
||
|
ISTOP = $0328 ; Vector: Indirect entry to Kernal STOP Routine ($F6ED).
|
||
|
IGETIN = $032a ; Vector: Indirect entry to Kernal GETIN Routine ($F13E).
|
||
|
ICLALL = $032c ; Vector: Indirect entry to Kernal CLALL Routine ($F32F).
|
||
|
USRCMD = $032e ; User Defined Vector ($FE66).
|
||
|
ILOAD = $0330 ; Vector: Indirect entry to Kernal LOAD Routine ($F4A5).
|
||
|
ISAVE = $0332 ; Vector: Indirect entry to Kernal SAVE Routine ($F5ED).
|
||
|
TEMP0334 = $0334 ; Unused.
|
||
|
TBUFFR = $033c ; Tape I/O Buffer.
|
||
|
SPR13 = $0340 ; Sprite #13.
|
||
|
SPR14 = $0380 ; Sprite #14.
|
||
|
SPR15 = $03c0 ; Sprite #15.
|
||
|
TEMP03fc = $03fc ; Unused.
|
||
|
VICSCN = $0400 ; Default Screen Video Matrix.
|
||
|
TEMP07e8 = $07e8 ; Unused.
|
||
|
SPNTRS = $07f8 ; Default Sprite Data Pointers.
|
||
|
|
||
|
.pron
|
||
|
|
||
|
; vim: syntax=64tass
|