|B1h||KB$CONK||looks for a keypress (cursor on)|
|Input||- none -|
|Output||B register - ASCII value of key taken from buffer.|
Waits for a key press and returns it in the B register. This is exactly the same as KB$GETK but turns the cursor ON before waiting for a key and OFF afterwards.
This routine uses the same code as KB$TEST. If there are no keys in the keyboard buffer, a SLP instruction is executed before next testing for a key, in order to save power. When a key is detected, it is removed from the buffer simply by clearing KBB_WAIT.
The auto-switch-off timeout counter TMW_TOUT is reset to the value in TMW_TCNT at the start of this routine, so the machine will not switch off in this routine for TMW_TCNT seconds.
Registers A and X are preserved.
This call is not available on CM/XP machines.
OS KB$CONK ;WAIT FOR KEY PRESS CMPB #0Dh BEQ EXEKEY ;BRANCH IF EXECUTE KEY ;HERE IF ANY OTHER KEY EXEKEY:
|Errors||- none -|