Skip to navigation

Elite on the BBC Micro

Version analysis of TT170

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

Code variations between these versions are shown below.

Name: TT170 Type: Subroutine Category: Start and end Summary: Main entry point for the Elite game code Deep dive: Program flow of the main game loop

Code variation 1 of 3A variation in the comments only

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

Cassette, Docked, Master, Electron

6502SP

This is the main entry point for the main game code.
This is the main entry point for the main game code. It is called after the various setup, decryption and checksum routines in S%, G% and BEGIN have successfully completed.
.TT170

Code variation 2 of 3A variation in the comments only

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

Cassette, Electron

Docked, 6502SP, Master

LDX #&FF \ Set the stack pointer to &01FF, which is the standard TXS \ location for the 6502 stack, so this instruction \ effectively resets the stack. We need to do this \ because the loader code in elite-loader.asm pushes \ code onto the stack, and this effectively removes that \ code so we start afresh
LDX #&FF \ Set the stack pointer to &01FF, which is the standard TXS \ location for the 6502 stack, so this instruction \ effectively resets the stack

Code variation 3 of 3Related to the 6502SP version

The Executive version immediately starts the demo once the game has loaded (though just like the other 6502SP versions, you can still bring it up manually using TAB from the title screen, and it will automatically start after a period of inactivity).

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

Cassette, Docked, Electron

Master

6502SP

\ Fall through into BR1 to start the game
JSR RESET \ Call RESET to initialise most of the game variables \ Fall through into DEATH2 to start the game
JSR RESET \ Call RESET to initialise most of the game variables IF _EXECUTIVE JSR DEMON \ Call DEMON to show the demo LDX #&FF \ Set the stack pointer to &01FF, which is the standard TXS \ location for the 6502 stack, so this instruction \ effectively resets the stack JSR RESET \ Call RESET to initialise most of the game variables ENDIF \ Fall through into DEATH2 to start the game
RSS Feed