; TITLE "SCST - Syslib 4.0" NAME ('CST') ;============================================================== ; Author : Harold F. Bower ; derived from SCST.Z80 Ver 1.1 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.3 ; Module : SCST ; Abstract: This module contains the routine CST which uses a ; direct BIOS access to read the CON: device status for ; character ready. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC CST ; From SYSLIB Get.. EXT @BIOSA ; Definitions CS EQU 2 ; Console Status Function number .Z80 CSEG ;=============================================================== ; NAME - CST ; Entry: - None ; Exit : A = 0, Zero Flag Set (Z) if Data Available ; A = 1, Zero Flag Clear (NZ) if NO Data Available ; Uses : AF ; Special Requirements: The system BIOS MUST start on an even ; page boundary. ;=============================================================== CST: LD A,CS ; Load the BIOS Function Number PUSH BC ; Save the Registers CALL @BIOSA ; ..and call the function POP BC ; Restore regs CPL ; Complement CONST return code AND 1 ; ..masking for LSB RET END