This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: RDKEY Type: Subroutine Category: Keyboard
This routine is effectively the same as OSBYTE 122, though the OSBYTE call preserves A, unlike this routine.
Returns:
A Contains the same as X
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
Y Y is preserved Other entry points: RDKEY-1 Only scan the keyboard for valid BCD key numbers
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
SED \ Set the D flag to enter decimal mode. Because \ internal key numbers are all valid BCD (Binary Coded \ Decimal) numbers, setting this flag ensures we only \ loop through valid key numbers
.RDKEY
This variation is blank in the 6502 Second Processor and Master versions.
Tap on a block to expand it, and tap it again to revert.
RTS \ Return from the subroutine