This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
.DEATH2Name: DEATH2 Type: Subroutine Category: Start and end Summary: Reset most of the game and restart from the title screen
This routine is called following death, and when the game is quit by pressing ESCAPE when paused.
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
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 RES2 \ Reset a number of flight variables and workspaces \ and fall through into the entry code for the game \ to restart from the title screen
This variation is blank in the Cassette, Disc (docked), 6502 Second Processor, Master and Electron versions.
JSR CATD \ Call CATD to reload the disc catalogue BNE INBAY \ Jump to INBAY to load the docked code (this BNE is \ effectively a JMP)