| Routines

05588: THE 'WAIT-KEY' SUBROUTINE

Used by the routines at SA_CONTRL, PO_SCR, EDITOR and ED_IGNORE. This subroutine is the controlling subroutine for calling the current input subroutine.
WAIT_KEY | 05588 | BIT 5,(IY+2) | Jump forward if the flag (bit 5 of TV-FLAG) indicates the lower screen does not require clearing.
| 05592 | JR NZ,WAIT_KEY1
| 05594 | SET 3,(IY+2) | Otherwise signal 'consider the mode as having changed' (set bit 3 of TV-FLAG).
WAIT_KEY1 | 05598 | CALL INPUT_AD | Call the input subroutine indirectly via INPUT_AD.
| 05601 | RET C | Return with acceptable codes.
| 05602 | JR Z,WAIT_KEY1 | Both the carry flag and the zero flag are reset if 'no key is being pressed'; otherwise signal an error.
Report 8 - End of file.
| 05604 | RST 8 | Call the error handling routine.
| 05605 | DEFB 7