📄 defines.asm
字号:
ONTOK: EQU $13 ; /* ON */
RETNTOK: EQU $14 ; /* RETURN */
IFTOK: EQU $15 ; /* IF */
INPUTTOK: EQU $16 ; /* INPUT */
STOPTOK: EQU $17 ; /* STOP */
ENDTOK: EQU $18 ; /* END */
WHILETOK: EQU $19 ; /* WHILE */
ENDWHTOK: EQU $1A ; /* ENDWH */
EEPTOK: EQU $1B ; /* EEP */
PORTATOK: EQU $1C ; /* PORTA */
PORTBTOK: EQU $1D ; /* PORTB */
PORTCTOK: EQU $1E ; /* PORTC */
PORTDTOK: EQU $1F ; /* PORTD */
INBYTTOK: EQU $23 ; /* INBYTE */
TIMETOK: EQU $24 ; /* TIME */
ONTIMTOK: EQU $25 ; /* ONTIME */
ONIRQTOK: EQU $26 ; /* ONIRQ */
RETITOK: EQU $27 ; /* RETI */
ONPACTOK: EQU $28 ; /* ONPACC */
SLEEPTOK: EQU $29 ; /* SLEEP */
RTIMETOK: EQU $2A ; /* RTIME */
FUNCTFLG: EQU $36 ; /* function flag byte */
TOTOK: EQU $37 ; /* TO */
THENTOK: EQU $38 ; /* THEN */
ELSETOK: EQU $39 ; /* ELSE */
STEPTOK: EQU $3A ; /* STEP */
*/* function tokens */
FDIVTOK: EQU $01 ; /* FDIV */
CHRTOK: EQU $02 ; /* CHR$ */
ADCTOK: EQU $03 ; /* ADC */
ABSTOK: EQU $04 ; /* ABS */
RNDTOK: EQU $05 ; /* RND */
SGNTOK: EQU $06 ; /* SGN */
TABTOK: EQU $07 ; /* TAB */
CALLTOK: EQU $08 ; /* CALL */
PEEKTOK: EQU $09 ; /* PEEK */
FEEPTOK: EQU $0A ; /* EEP */
HEXTOK: EQU $0B ; /* HEX */
FPRTATOK: EQU $0C ; /* PORTA */
FPRTBTOK: EQU $0D ; /* PORTB */
FPRTCTOK: EQU $0E ; /* PORTC */
FPRTDTOK: EQU $0F ; /* PORTD */
FPRTETOK: EQU $10 ; /* PORTE */
FTIMETOK: EQU $11 ; /* TIME */
HEX2TOK: EQU $12 ; /* HEX2 */
FPACCTOK: EQU $13 ; /* PACC */
*/* numerical/variable tokens */
FVARTOK: EQU $81 ; /* floating point variable address */
SVARTOK: EQU $82 ; /* string variable address */
IVARTOK: EQU $84 ; /* integer variable address */
FAVARTOK: EQU $91 ; /* floating point array */
SAVARTOK: EQU $92 ; /* string array */
IAVARTOK: EQU $94 ; /* integer array */
FCONTOK: EQU $A1 ; /* floating point constant */
SCONTOK: EQU $A2 ; /* string constant */
LCONTOK: EQU $A8 ; /* line # constant */
ICONTOK: EQU $A4 ; /* integer constant */
ISIZ: EQU 2 ; /* number of bytes in integer variable */
SSIZ: EQU 3 ; /* number of bytes in string variable */
FSIZ: EQU 5 ; /* number of bytes in f.p. variable */
ASIZ: EQU 2 ; /* number of bytes for array variable in dictionary */
*/* misc. tokens */
MSCNTOK: EQU $7F ; /* multiple space count token */
SSCNTOK: EQU $7E ; /* single space token */
EOLTOK: EQU $7D ; /* end of line token */
COMMATOK: EQU $7C ; /* , */
SEMITOK: EQU $7B ; /* ; */
MEOLTOK: EQU $7A ; /* : */
EQUALTOK: EQU $79 ; /* '=' */
PNUMTOK: EQU $78 ; /* '#' */
*
*
JMPOP: EQU $7E ; OP-CODE FOR "JMP" (USED TO INITALIZE INTERRUPT TABLE)
* /*********** define variables ***********/
ORG $0000
*
* char
*
IBUFPTR: RMB 2 ; /* input buffer pointer */
TBUFPTR: RMB 2 ; /* token buffer pointer */
*
* the next 5 variables must remain grouped togeather
*
BASBEG: RMB 2 ; /* start of basic program area */
BASEND: RMB 2 ; /* end of basic program */
VARBEGIN: RMB 2 ; /* start of variable storage area */
VAREND: RMB 2 ; /* end of variable storage area */
HILINE: RMB 2 ; /* highest line number in program buffer */
*
*
*
BASMEND: RMB 2 ; /* physical end of basic program memory */
VARMEND: RMB 2 ; /* physical end of variable memory */
*
* int
*
FIRSTLIN: RMB 2 ; /* first line to list */
LASTLIN: RMB 2 ; /* last line to list */
INTPTR: RMB 2 ; /* integer pointer */
*
* short
*
ERRCODE: RMB 1 ; /* error code status byte */
IMMID: RMB 1 ; /* immidiate mode flag */
BREAKCNT: EQU * ; /* also use for break check count */
COUNT: EQU * ; /* count used in ESAVE & ELOAD routines */
IFWHFLAG: RMB 1 ; /* translating IF flag */
TRFLAG: RMB 1 ; /* trace mode flag */
CONTFLAG: RMB 1 ; /* continue flag */
RUNFLAG: RMB 1 ; /* indicates we are in the run mode */
PRINTPOS: RMB 1 ; /* current print position */
NUMSTACK: RMB 2 ; /* numeric operand stack pointer */
OPSTACK: RMB 2 ; /* operator stack pointer */
FORSTACK: RMB 2 ; /* FOR stack pointer */
WHSTACK: RMB 2 ; /* WHILE stack pointer */
GOSTACK: RMB 2 ; /* GOSUB stack pointer */
CURLINE: RMB 2 ; /* line # that we are currently interpreting */
ADRNXLIN: RMB 2 ; /* address of the next line */
STRASTG: RMB 2 ; /* dynamic string/array pool pointer */
FENCE: RMB 2 ; /* varend fence in case of an error in xlation */
IPSAVE: RMB 2 ; /* interpretive pointer save for "BREAK" */
DATAPTR: RMB 2 ; /* pointer to data for read statement */
RANDOM: RMB 2 ; /* random number/seed */
DEVNUM: RMB 1 ; /* I/O device number */
TIMEREG: RMB 2 ; /* TIME register */
TIMECMP: RMB 2 ; /* TIME compare register */
TIMEPRE: RMB 1 ; /* software prescaler for TIME */
ONTIMLIN: RMB 2 ; /* ONTIME line number to goto */
ONIRQLIN: RMB 2 ; /* ONIRQ line number to goto */
ONPACLIN: RMB 2 ; /* ONPACC line number to goto */
XONCH: RMB 1 ; /* XON character for printer */
XOFFCH: RMB 1 ; /* XOFF character for printer */
SCURLINE: RMB 2 ; /* used to save CURLINE during int. processing */
SADRNXLN: RMB 2 ; /* used to save ADRNXLIN during int. processing */
INBUFFS: rmb 2 ; /* pointer to the start of the input buffer */
TKNBUFS: rmb 2 ; /* pointer to the start of the token buffer */
*
EOPSTK: RMB 2 ; /* end of operator stack */
STOPS: RMB 2 ; /* start of operator stack */
ENUMSTK: RMB 2 ; /* end of operand stack */
STNUMS: RMB 2 ; /* start of operand stack */
EFORSTK: RMB 2 ; /* end of FOR - NEXT stack */
STFORSTK: RMB 2 ; /* start of FOR - NEXT stack */
EWHSTK: RMB 2 ; /* end of WHILE stack */
STWHSTK: RMB 2 ; /* start of WHILE stack */
EGOSTK: RMB 2 ; /* end of GOSUB stack */
STGOSTK: RMB 2 ; /* start of GOSUB stack */
IOBaseV: RMB 2 ; /* Address vector for I/O Registers */
DNAME: RMB 3 ; /* Place to put the variable name when doing a dump command */
SUBMAX: RMB 2 ; /* */
SUBCNT: RMB 2 ; /* */
TOKPTR: rmb 2 ; /* token pointer (used for list command) */
VarSize: rmb 2 ; /* used by the line editor. size of the variable table */
*
*
$if * > $9E
#fatal "Ran out of Page 0 RAM"
$endif
*
*
*
ORG $009E
*
CONSTAT: RMB 3 ; GET CONSOLE STATUS FOR BREAK ROUTINE.
INCONNE: RMB 3 ; GET BYTE DIRECTLY FROM CONSOLE FOR BREAK ROUTINE.
*
ORG $00A4
*
INTABLE: RMB 16 ; RESERVE SPACE FOR 8 DIFFERENT INPUT ROUTINES.
OUTABLE: RMB 16 ; RESERVE SPACE FOR 8 DIFFERENT OUTPUT ROUTINES.
*
*
*
*
ORG $00C4 ; START OF RAM INTERRUPT VECTORS.
*
RAMVECTS: EQU *
SCISS: RMB 3 ; SCI SERIAL SYSTEM.
SPITC: RMB 3 ; SPI TRANSFER COMPLETE.
PACCIE: RMB 3 ; PULSE ACCUMULATOR INPUT EDGE.
PACCOVF: RMB 3 ; PULSE ACCUMULATOR OVERFLOW.
TIMEROVF: RMB 3 ; TIMER OVERFLOW.
TOC5: RMB 3 ; TIMER OUTPUT COMPARE 5.
TOC4: RMB 3 ; TIMER OUTPUT COMPARE 4.
TOC3: RMB 3 ; TIMER OUTPUT COMPARE 3.
TOC2: RMB 3 ; TIMER OUTPUT COMPARE 2.
TOC1: RMB 3 ; TIMER OUTPUT COMPARE 1.
TIC3: RMB 3 ; TIMER INPUT CAPTURE 3.
TIC2: RMB 3 ; TIMER INPUT CAPTURE 2.
TIC1: RMB 3 ; TIMER INPUT CAPTURE 1.
REALTIMI: RMB 3 ; REAL TIME INTERRUPT.
IRQI: RMB 3 ; IRQ INTERRUPT.
XIRQ: RMB 3 ; XIRQ INTERRUPT.
SWII: RMB 3 ; SOFTWARE INTERRUPT.
ILLOP: RMB 3 ; ILLEGAL OPCODE TRAP.
COP: RMB 3 ; WATCH DOG TIMER FAIL.
CMF: RMB 3 ; CLOCK MONITOR FAIL.
*
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -