Z88 Developers' Notes
Contents   Contents of System Calls

OS_Gbt, get byte from file (or device) with timeout

RST 20H, DEFB $3F

IN:

     BC = timeout in 1/100 second ticks
     IX = handle of file (or device)
OUT, if call successful:
     Fc = 0, if byte read OK
     A = byte read
     BC = remaining time in 1/100 seconds
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_EOF ($09), end of file reached
          RC_HAND ($08), bad handle supplied in IX
          RC_RP ($13), device is read-protected
          RC_TIME ($02), if timeout.
          RC_ESC ($01), escape, if device :COM.0, :PRT.0, or :INP.0
          RC_SUSP ($69), if device is :COM.0, :PRT.0 or :INP.0
          RC_DRAW ($66), if device is :INP.0
          RC_QUIT ($67), if device is :INP.0
Registers changed after return:
     ....DEHL/IXIY same
     AFBC..../.... different
Notes:

Bugs:
 

Related calls:

GN_Cl, close file
GN_Del, delete a file from memory
GN_Opf, open file/resource (wildcard search)
GN_Ren, rename file
OS_Cl, internal close (OZ usage)
OS_Del, file delete (internal OZ usage)
OS_Frm, file read miscellaneous
OS_Fwm, file write miscellaneous
OS_Gb, get byte from file (or device)
OS_Mv, move bytes between stream and memory
OS_Op, internal open (OZ usage)
OS_Pb, write byte to file, device
OS_Pbt, write byte to file, device with timeout
OS_Ren, file rename (internal OZ usage)