Skip to navigation

Elite on the BBC Micro and NES

Version analysis of FLKB

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: FLKB Type: Subroutine Category: Keyboard Summary: Flush the keyboard buffer

Code variation 1 of 2A variation in the comments only

This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.

This routine does nothing in the BBC Master version of Elite. It does have a function in the disc and 6502SP versions, so the authors presumably just cleared out the FLKB routine for the Master version, rather than unplumbing it from the code.
.FLKB

Code variation 2 of 2Specific to an individual platform

The cassette and Master versions don't explicitly flush the keyboard buffer, while the disc and 6502SP versions call OSBYTE 15 to flush the input buffers.

Tap on a block to expand it, and tap it again to revert.

LDA #15 \ Call OSBYTE with A = 15 and Y <> 0 to flush the input TAX \ buffers (i.e. flush the operating system's keyboard JMP OSBYTE \ buffer) and return from the subroutine using a tail \ call
RTS \ Return from the subroutine