Skip to navigation


Version analysis of BEGIN

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

Code variations between these versions are shown below.

Name: BEGIN Type: Subroutine Category: Loader Summary: Initialise the configuration variables and start the game
.BEGIN

Code variation 1 of 4Specific to an individual platform

This variation is blank in the Master version.

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

JSR BRKBK \ Call BRKBK to set BRKV to point to the BRBR routine
\JSR BRKBK \ This instruction is commented out in the original \ source

Code variation 2 of 4Specific to an individual platform

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

LDX #(CATF-COMC) \ We start by zeroing all the configuration variables \ between COMC and CATF, to set them to their default \ values, so set a counter in X for CATF - COMC bytes
LDX #(DISK-COMC) \ We start by zeroing all the configuration variables \ between COMC and DISK, to set them to their default \ values, so set a counter in X for DISK - COMC bytes
 LDA #0                 \ Set A = 0 so we can zero the variables

.BEL1

 STA COMC,X             \ Zero the X-th configuration variable

 DEX                    \ Decrement the loop counter

 BPL BEL1               \ Loop back to BEL1 to zero the next byte, until we have
                        \ zeroed them all

Code variation 3 of 4Specific to an individual platform

This variation is blank in the Disc (docked) version.

LDA XX21+SST*2-2 \ Set spasto(1 0) to the Coriolis space station entry STA spasto \ from the ship blueprint lookup table at XX21 (so LDA XX21+SST*2-1 \ spasto(1 0) points to the Coriolis blueprint) STA spasto+1

Code variation 4 of 4Related to the Master version

The Master version contains an embedded copy of the default JAMESON commander file that gets loaded on start-up.

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

JSR JAMESON \ Call JAMESON to set the last saved commander to the \ default "JAMESON" commander
                        \ Fall through into TT170 to start the game