Skip to navigation

Keyboard: EnableKeyboard

Name: EnableKeyboard [Show more] Type: Subroutine Category: Keyboard Summary: Select the keyboard as the input stream and flush the keyboard buffer
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ReadKeyboard calls EnableKeyboard * ReadNumber calls EnableKeyboard
.EnableKeyboard LDA #2 \ Call OSBYTE with A = 2 and X = 0 to select the LDX #0 \ keyboard as the input stream and disable the RS423 JSR OSBYTE LDX #0 \ Set X = 0 to denote the keyboard buffer JMP FlushBuffer \ Call FlushBuffer to flush the keyboard buffer and \ return from the subroutine using a tail call