Skip to navigation

BBC Micro Elite

Keyboard: PAUSE2 (6502SP version)

Name: PAUSE2 [View in context] Type: Subroutine Category: Keyboard Summary: Wait until a key is pressed, ignoring any existing key press
.PAUSE2 JSR RDKEY \ Scan the keyboard for a key press and return the \ internal key number in X (or 0 for no key press) BNE PAUSE2 \ If a key was already being held down when we entered \ this routine, keep looping back up to PAUSE2, until \ the key is released JSR RDKEY \ Any pre-existing key press is now gone, so we can \ start scanning the keyboard again, returning the \ internal key number in X (or 0 for no key press) BEQ PAUSE2 \ Keep looping up to PAUSE2 until a key is pressed RTS \ Return from the subroutine