Submitted by Steve Fewell
Description:
Call routine &98AE to evaluate the variable name - check whether it exists or not
and create the variable if it does not exist. &98AE also returns with &2A and &2B pointing
to the address of the variable's value (which will be blank (zero) if the variable was newly created),
and &2C set to the variable's type.
If the zero flag is set, then there was an error and the text after the LET command
was not a valid variable name, so issue a Syntax Error.
904A | 032 174 152 | 20 AE 98 | JSR &98AE Evaluate Variable Name & Allocate variable space (if necessary) | |
904D | 4 | 240 052 | F0 34 | BEQ 52 --> &9083 [JMP &9B69 Syntax error] |
904F | ! | 144 033 | 90 21 | BCC 33 --> &9072 Variable is numeric |
9051 | & | 032 038 188 | 20 26 BC | JSR &BC26 Push IWA to Basic Stack |
9054 | R | 032 082 155 | 20 52 9B | JSR &9B52 Check for '=' & get result of expression; check end of statement |
9057 | ' | 165 039 | A5 27 | LDA &27 |
9059 | 7 | 208 055 | D0 37 | BNE 55 --> &9092 Type mismatch error |
905B | 032 171 144 | 20 AB 90 | JSR &90AB Set String variable (with check length) | |
905E | 128 165 | 80 A5 | BRA -91 --> &9005 Continue running program (next statement) |
.... | ||||
9072 | * | 165 042 | A5 2A | LDA &2A |
9074 | H | 072 | 48 | PHA |
9075 | + | 165 043 | A5 2B | LDA &2B |
9077 | H | 072 | 48 | PHA |
9078 | , | 165 044 | A5 2C | LDA &2C |
907A | H | 072 | 48 | PHA |
907B | R | 032 082 155 | 20 52 9B | JSR &9B52 Check for '=' & get result of expression; check end of statement |
907E | + | 032 043 179 | 20 2B B3 | JSR &B32B Set numeric variable |
9081 | 128 130 | 80 82 | BRA -126 --> &9005 Continue running program (next statement) | |
9083 | Li | 076 105 155 | 4C 69 9B | JMP &9B69 Syntax error |