Routines |
Prev: 07199 | Up: Map | Next: 07246 |
|
||||||||||||||||||
VAR_A_1 | 07202 | LD (IY+55),0 | Initialise FLAGX to 0. | |||||||||||||||
07206 | JR NC,VAR_A_2 | Jump forward if the variable has been used before. | ||||||||||||||||
07208 | SET 1,(IY+55) | Signal 'a new variable' (set bit 1 of FLAGX). | ||||||||||||||||
07212 | JR NZ,VAR_A_3 | Give an error if trying to use an 'undimensioned array'. | ||||||||||||||||
This entry point is used by the routines at NEXT and S_LETTER.
Report 2 - Variable not found.
|
||||||||||||||||||
REPORT_2 | 07214 | RST 8 | Call the error handling routine. | |||||||||||||||
07215 | DEFB 1 | |||||||||||||||||
Continue with the handling of existing variables.
|
||||||||||||||||||
VAR_A_2 | 07216 | CALL Z,STK_VAR | The parameters of simple string variables and all array variables are passed to the calculator stack. (STK_VAR will 'slice' a string if required.) | |||||||||||||||
07219 | BIT 6,(IY+1) | Jump forward if handling a numeric variable (bit 6 of FLAGS set). | ||||||||||||||||
07223 | JR NZ,VAR_A_3 | |||||||||||||||||
07225 | XOR A | Clear the A register. | ||||||||||||||||
07226 | CALL SYNTAX_Z | The parameters of the string or string array variable are fetched unless syntax is being checked. | ||||||||||||||||
07229 | CALL NZ,STK_FETCH | |||||||||||||||||
07232 | LD HL,23665 | This is FLAGX. | ||||||||||||||||
07235 | OR (HL) | Bit 0 is set only when handling complete 'simple strings' thereby signalling 'old copy to be deleted'. | ||||||||||||||||
07236 | LD (HL),A | |||||||||||||||||
07237 | EX DE,HL | HL now points to the string or the element of the array. | ||||||||||||||||
The pathways now come together to set STRLEN and DEST as required. For all numeric variables and 'new' string and string array variables STRLEN-lo holds the 'letter' of the variable's name. But for 'old' string and string array variables whether 'sliced' or complete it holds the 'length' in 'assignment'.
|
||||||||||||||||||
VAR_A_3 | 07238 | LD (23666),BC | Set STRLEN as required. | |||||||||||||||
DEST holds the address for the 'destination' of an 'old' variable but in effect the 'source' for a 'new' variable.
|
||||||||||||||||||
07242 | LD (23629),HL | Set DEST as required and return. | ||||||||||||||||
07245 | RET |
Prev: 07199 | Up: Map | Next: 07246 |