Skip to navigation

Elite on the BBC Micro

Version analysis of ee3

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

Code variations between these versions are shown below.

Name: ee3 Type: Subroutine Category: Text Summary: Print the hyperspace countdown in the top-left of the screen

Code variation 1 of 4A variation in the comments only

This variation is blank in the Master version.

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Electron

Flight, Docked, 6502SP

Print the 8-bit number in X at text location (0, 1). Print the number to
Print the 8-bit number in X at text location (1, 1). Print the number to
5 digits, left-padding with spaces for numbers with fewer than 3 digits (so numbers < 10000 are right-aligned), with no decimal point. Arguments: X The number to print
.ee3

Code variation 2 of 4Related to the screen mode

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

Tap on a version to expand it, and tap it again to show to all variations.

Master

6502SP

LDA #RED \ Switch to colour 2, which is red in the space view STA COL
LDA #RED \ Send a #SETCOL RED command to the I/O processor to JSR DOCOL \ switch to colour 2, which is red in the space view

Code variation 3 of 4Related to a standard feature

The cassette version prints the right-aligned hyperspace countdown in column 0, while the other versions print it one column to the right in column 1.

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Electron

Flight, Docked

Master

6502SP

LDY #1 \ Move the text cursor to row 1 STY YC DEY \ Decrement Y to 0 for the high byte in pr6 STY XC \ Move the text cursor to column 0
LDY #1 \ Move the text cursor to column 1 STY XC STY YC \ Move the text cursor to row 1 DEY \ Decrement Y to 0 for the high byte in pr6
LDA #1 \ Move the text cursor to column 1 STA XC STA YC \ Move the text cursor to row 1 LDY #0 \ Set Y = 0 for the high byte in pr6
LDA #1 \ Move the text cursor to column 1 on row 1 JSR DOXC JSR DOYC LDY #0 \ Set Y = 0 for the high byte in pr6

Code variation 4 of 4Related to the Master version

The Master version's hyperspace countdown is padded to 3 characters rather than 5, so it appears two characters to the left compared to the disc and 6502SP versions.

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, 6502SP, Electron

Master

\ Fall through into pr6 to print X to 5 digits, as the \ high byte in Y is 0
CLC \ Call TT11 to print X to 3 digits with no decimal point LDA #3 \ and return from the subroutine using a tail call JMP TT11
RSS Feed