Prev: 1A1B Up: Map Next: 1B17
1A48: THE SYNTAX TABLES
Used by the routine at STMT_LOOP.
i. The offset table.
There is an offset value for each of the fifty BASIC commands.
Input
Output
SYNTAX 1A48 DEFB $B1 P_DEF_FN
1A49 DEFB $CB P_CAT
1A4A DEFB $BC P_FORMAT
1A4B DEFB $BF P_MOVE
1A4C DEFB $C4 P_ERASE
1A4D DEFB $AF P_OPEN
1A4E DEFB $B4 P_CLOSE
1A4F DEFB $93 P_MERGE
1A50 DEFB $91 P_VERIFY
1A51 DEFB $92 P_BEEP
1A52 DEFB $95 P_CIRCLE
1A53 DEFB $98 P_INK
1A54 DEFB $98 P_PAPER
1A55 DEFB $98 P_FLASH
1A56 DEFB $98 P_BRIGHT
1A57 DEFB $98 P_INVERSE
1A58 DEFB $98 P_OVER
1A59 DEFB $98 P_OUT
1A5A DEFB $7F P_LPRINT
1A5B DEFB $81 P_LLIST
1A5C DEFB $2E P_STOP
1A5D DEFB $6C P_READ
1A5E DEFB $6E P_DATA
1A5F DEFB $70 P_RESTORE
1A60 DEFB $48 P_NEW
1A61 DEFB $94 P_BORDER
1A62 DEFB $56 P_CONT
1A63 DEFB $3F P_DIM
1A64 DEFB $41 P_REM
1A65 DEFB $2B P_FOR
1A66 DEFB $17 P_GO_TO
1A67 DEFB $1F P_GO_SUB
1A68 DEFB $37 P_INPUT
1A69 DEFB $77 P_LOAD
1A6A DEFB $44 P_LIST
1A6B DEFB $0F P_LET
1A6C DEFB $59 P_PAUSE
1A6D DEFB $2B P_NEXT
1A6E DEFB $43 P_POKE
1A6F DEFB $2D P_PRINT
1A70 DEFB $51 P_PLOT
1A71 DEFB $3A P_RUN
1A72 DEFB $6D P_SAVE
1A73 DEFB $42 P_RANDOM
1A74 DEFB $0D P_IF
1A75 DEFB $49 P_CLS
1A76 DEFB $5C P_DRAW
1A77 DEFB $44 P_CLEAR
1A78 DEFB $15 P_RETURN
1A79 DEFB $5D P_COPY
ii. The parameter table.
For each of the fifty BASIC commands there are up to eight entries in the parameter table. These entries comprise command class details, required separators and, where appropriate, command routine addresses.
P_LET 1A7A DEFB $01 CLASS_01
1A7B DEFB "="
1A7C DEFB $02 CLASS_02
P_GO_TO 1A7D DEFB $06 CLASS_06
1A7E DEFB $00 CLASS_00
1A7F DEFW GO_TO
P_IF 1A81 DEFB $06 CLASS_06
1A82 DEFB $CB THEN
1A83 DEFB $05 CLASS_05
1A84 DEFW IF_CMD
P_GO_SUB 1A86 DEFB $06 CLASS_06
1A87 DEFB $00 CLASS_00
1A88 DEFW GO_SUB
P_STOP 1A8A DEFB $00 CLASS_00
1A8B DEFW STOP
P_RETURN 1A8D DEFB $00 CLASS_00
1A8E DEFW RETURN
P_FOR 1A90 DEFB $04 CLASS_04
1A91 DEFB "="
1A92 DEFB $06 CLASS_06
1A93 DEFB $CC TO
1A94 DEFB $06 CLASS_06
1A95 DEFB $05 CLASS_05
1A96 DEFW FOR
P_NEXT 1A98 DEFB $04 CLASS_04
1A99 DEFB $00 CLASS_00
1A9A DEFW NEXT
P_PRINT 1A9C DEFB $05 CLASS_05
1A9D DEFW PRINT
P_INPUT 1A9F DEFB $05 CLASS_05
1AA0 DEFW INPUT
P_DIM 1AA2 DEFB $05 CLASS_05
1AA3 DEFW DIM
P_REM 1AA5 DEFB $05 CLASS_05
1AA6 DEFW REM
P_NEW 1AA8 DEFB $00 CLASS_00
1AA9 DEFW NEW
P_RUN 1AAB DEFB $03 CLASS_03
1AAC DEFW RUN
P_LIST 1AAE DEFB $05 CLASS_05
1AAF DEFW LIST
P_POKE 1AB1 DEFB $08 CLASS_08
1AB2 DEFB $00 CLASS_00
1AB3 DEFW POKE
P_RANDOM 1AB5 DEFB $03 CLASS_03
1AB6 DEFW RANDOMIZE
P_CONT 1AB8 DEFB $00 CLASS_00
1AB9 DEFW CONTINUE
P_CLEAR 1ABB DEFB $03 CLASS_03
1ABC DEFW CLEAR
P_CLS 1ABE DEFB $00 CLASS_00
1ABF DEFW CLS
P_PLOT 1AC1 DEFB $09 CLASS_09
1AC2 DEFB $00 CLASS_00
1AC3 DEFW PLOT
P_PAUSE 1AC5 DEFB $06 CLASS_06
1AC6 DEFB $00 CLASS_00
1AC7 DEFW PAUSE
P_READ 1AC9 DEFB $05 CLASS_05
1ACA DEFW READ
P_DATA 1ACC DEFB $05 CLASS_05
1ACD DEFW DATA
P_RESTORE 1ACF DEFB $03 CLASS_03
1AD0 DEFW RESTORE
P_DRAW 1AD2 DEFB $09 CLASS_09
1AD3 DEFB $05 CLASS_05
1AD4 DEFW DRAW
P_COPY 1AD6 DEFB $00 CLASS_00
1AD7 DEFW COPY
P_LPRINT 1AD9 DEFB $05 CLASS_05
1ADA DEFW LPRINT
P_LLIST 1ADC DEFB $05 CLASS_05
1ADD DEFW LLIST
P_SAVE 1ADF DEFB $0B CLASS_0B
P_LOAD 1AE0 DEFB $0B CLASS_0B
P_VERIFY 1AE1 DEFB $0B CLASS_0B
P_MERGE 1AE2 DEFB $0B CLASS_0B
P_BEEP 1AE3 DEFB $08 CLASS_08
1AE4 DEFB $00 CLASS_00
1AE5 DEFW BEEP
P_CIRCLE 1AE7 DEFB $09 CLASS_09
1AE8 DEFB $05 CLASS_05
1AE9 DEFW CIRCLE
P_INK 1AEB DEFB $07 CLASS_07
P_PAPER 1AEC DEFB $07 CLASS_07
P_FLASH 1AED DEFB $07 CLASS_07
P_BRIGHT 1AEE DEFB $07 CLASS_07
P_INVERSE 1AEF DEFB $07 CLASS_07
P_OVER 1AF0 DEFB $07 CLASS_07
P_OUT 1AF1 DEFB $08 CLASS_08
1AF2 DEFB $00 CLASS_00
1AF3 DEFW OUT_CMD
P_BORDER 1AF5 DEFB $06 CLASS_06
1AF6 DEFB $00 CLASS_00
1AF7 DEFW BORDER
P_DEF_FN 1AF9 DEFB $05 CLASS_05
1AFA DEFW DEF_FN
P_OPEN 1AFC DEFB $06 CLASS_06
1AFD DEFB ","
1AFE DEFB $0A CLASS_0A
1AFF DEFB $00 CLASS_00
1B00 DEFW OPEN
P_CLOSE 1B02 DEFB $06 CLASS_06
1B03 DEFB $00 CLASS_00
1B04 DEFW CLOSE
P_FORMAT 1B06 DEFB $0A CLASS_0A
1B07 DEFB $00 CLASS_00
1B08 DEFW CAT_ETC
P_MOVE 1B0A DEFB $0A CLASS_0A
1B0B DEFB ","
1B0C DEFB $0A CLASS_0A
1B0D DEFB $00 CLASS_00
1B0E DEFW CAT_ETC
P_ERASE 1B10 DEFB $0A CLASS_0A
1B11 DEFB $00 CLASS_00
1B12 DEFW CAT_ETC
P_CAT 1B14 DEFB $00 CLASS_00
1B15 DEFW CAT_ETC
Note: the requirements for the different command classes are as follows:
  • CLASS_00 - No further operands.
  • CLASS_01 - Used in LET. A variable is required.
  • CLASS_02 - Used in LET. An expression, numeric or string, must follow.
  • CLASS_03 - A numeric expression may follow. Zero to be used in case of default.
  • CLASS_04 - A single character variable must follow.
  • CLASS_05 - A set of items may be given.
  • CLASS_06 - A numeric expression must follow.
  • CLASS_07 - Handles colour items.
  • CLASS_08 - Two numeric expressions, separated by a comma, must follow.
  • CLASS_09 - As for CLASS_08 but colour items may precede the expressions.
  • CLASS_0A - A string expression must follow.
  • CLASS_0B - Handles cassette routines.
Prev: 1A1B Up: Map Next: 1B17