...
Code Block | ||
---|---|---|
| ||
IN: - OUT, if call successful: Fc = 0, input MAY BE available : Aa = input source XIN_KB ($01), keyboard buffer has data, possibly ESC or pre-emption XIN_RX ($02), serial RX buffer has data XIN_CLI ($04), CLI is active OUT, if call failed: following OS_In will return immediately possibly with error Fc = 1, A = error code: RC_EOF ($09), no input, OS_In will notwait return immediately if called RC_HAND ($08), bad handle Registers changed after return: ..BCDEHL/IXIY same AF....../.... different |
Notes
This call return if a key is pressed or not. It avoids OS_In usage which has more overhead. For example, Pipedream uses OS_Xin during calculations, system menu and help looks for a key press with OS_Xin during menu and help rendering.
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
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