Z88 Developers' Notes
Contents   Contents of System Calls

OS_Xin, examine input

RST 20H, DEFB $30

IN:

     IX = stream handle
OUT, if call successful:
     Fc = 0, input MAY BE available
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_EOF ($09), OS_In will not return immediately if called
          RC_HAND ($08), bad handle
Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different
Notes:
The function of this call is not so much to tell you when input is available, but rather to indicate when it definitely is not. The call might be useful to examine if OS_In is going to return a pre-emption error like RC_SUSP or RC_QUIT. Possible reasons are:


pending character
exception code (e.g. RC_SUSP due to machine reviving)
input available

Bugs:
 

Related calls:

GN_Sip, system input line routine
OS_In, read (wait for) character from standard input
OS_Pur, purge keyboard buffer
OS_Tin, read character from standard input, with timeout