Skip to navigation

Elite on the BBC Micro and NES

Version analysis of CTRL

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

Code variations between these versions are shown below.

Name: CTRL Type: Subroutine Category: Keyboard Summary: Scan the keyboard to see if CTRL is currently pressed
Returns: X X = %10000001 (i.e. 129 or -127) if CTRL is being pressed X = 1 if CTRL is not being pressed A Contains the same as X

Code variation 1 of 1Specific to an individual platform

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

.CTRL LDX #1 \ Set X to the internal key number for CTRL and fall \ through to DKS4 to scan the keyboard
IF _SNG47 .CTRL LDA #1 \ Set A to the internal key number for CTRL and fall \ through to DKS5 to scan the keyboard ENDIF