Routines |
Prev: 1C1F | Up: Map | Next: 1C4E |
|
||||||||||||||||||
VAR_A_1 | 1C22 | LD (IY+$37),$00 | Initialise FLAGX to +00. | |||||||||||||||
1C26 | JR NC,VAR_A_2 | Jump forward if the variable has been used before. | ||||||||||||||||
1C28 | SET 1,(IY+$37) | Signal 'a new variable' (set bit 1 of FLAGX). | ||||||||||||||||
1C2C | 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 | 1C2E | RST $08 | Call the error handling routine. | |||||||||||||||
1C2F | DEFB $01 | |||||||||||||||||
Continue with the handling of existing variables.
|
||||||||||||||||||
VAR_A_2 | 1C30 | 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.) | |||||||||||||||
1C33 | BIT 6,(IY+$01) | Jump forward if handling a numeric variable (bit 6 of FLAGS set). | ||||||||||||||||
1C37 | JR NZ,VAR_A_3 | |||||||||||||||||
1C39 | XOR A | Clear the A register. | ||||||||||||||||
1C3A | CALL SYNTAX_Z | The parameters of the string or string array variable are fetched unless syntax is being checked. | ||||||||||||||||
1C3D | CALL NZ,STK_FETCH | |||||||||||||||||
1C40 | LD HL,$5C71 | This is FLAGX. | ||||||||||||||||
1C43 | OR (HL) | Bit 0 is set only when handling complete 'simple strings' thereby signalling 'old copy to be deleted'. | ||||||||||||||||
1C44 | LD (HL),A | |||||||||||||||||
1C45 | 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 | 1C46 | LD ($5C72),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.
|
||||||||||||||||||
1C4A | LD ($5C4D),HL | Set DEST as required and return. | ||||||||||||||||
1C4D | RET |
Prev: 1C1F | Up: Map | Next: 1C4E |