Skip to navigation

Elite on the BBC Micro and NES

Version analysis of ABORT2

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

Code variations between these versions are shown below.

Name: ABORT2 Type: Subroutine Category: Dashboard Summary: Set/unset the lock target for a missile and update the dashboard
Set the lock target for the leftmost missile and update the dashboard.
Arguments: X The slot number of the ship to lock our missile onto, or &FF to remove missile lock

Code variation 1 of 2A variation in the comments only

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

Y The new colour of the missile indicator: * &00 = black (no missile) * &0E = red (armed and locked) * &E0 = yellow/white (armed) * &EE = green/cyan (disarmed)
Y The new colour of the missile indicator: * &00 = black (no missile) * #RED2 = red (armed and locked) * #YELLOW2 = yellow/white (armed) * #GREEN2 = green (disarmed)
Y The new shape of the missile indicator: * &04 = black (no missile) * &11 = black "T" in white square (armed and locked) * &0D = black box in white square (armed) * &09 = white square (disarmed)
.ABORT2 STX MSTG \ Store the target of our missile lock in MSTG LDX NOMSL \ Call MSBAR to update the leftmost indicator in the JSR MSBAR \ dashboard's missile bar, which returns with Y = 0 STY MSAR \ Set MSAR = 0 to indicate that the leftmost missile \ is no longer seeking a target lock RTS \ Return from the subroutine

Code variation 2 of 2Minor and very low-impact

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

.msbpars EQUB 4, 0, 0, 0, 0 \ These bytes appear to be unused (they are left over \ from the 6502 Second Processor version of Elite)