Prev: 2089 Up: Map Next: 21D6
21B9: THE 'IN-ASSIGN' SUBROUTINE
Used by the routine at INPUT.
This subroutine is called twice for each INPUT value: once with the syntax/run flag reset (syntax) and once with it set (run).
IN_ASSIGN 21B9 LD HL,($5C61) Set CH-ADD to point to the first location of the work space (WORKSP) and fetch the character.
21BC LD ($5C5D),HL
21BF RST $18
21C0 CP $E2 Is it a 'STOP'?
21C2 JR Z,IN_STOP Jump if it is.
21C4 LD A,($5C71) Otherwise pick up FLAGX and make the assignment of the 'value' to the variable.
21C7 CALL VAL_FET_2
21CA RST $18 Get the present character and check it is a 'carriage return'.
21CB CP $0D
21CD RET Z Return if it is.
Report C - Nonsense in BASIC.
21CE RST $08 Call the error handling routine.
21CF DEFB $0B
Come here if the INPUT line starts with 'STOP'.
IN_STOP 21D0 CALL SYNTAX_Z But do not give the error report on the syntax-pass.
21D3 RET Z
Report H - STOP in INPUT.
21D4 RST $08 Call the error handling routine.
21D5 DEFB $10
Prev: 2089 Up: Map Next: 21D6