Skip to navigation

Elite on the BBC Micro

Loader: BEGIN [Elite-A, Docked]

Name: BEGIN [Show more] Type: Subroutine Category: Loader Summary: Initialise the configuration variables and start the game
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * DOBEGIN calls BEGIN
.BEGIN JSR BRKBK \ Call BRKBK to set BRKV to point to the BRBR routine 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 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 \ --- Mod: Code added for Elite-A: --------------------> LDA #127 \ Set BSTK = 127 (positive) to disable the Delta 14b STA BSTK \ joystick \ --- End of added code -------------------------------> \ Fall through into TT170 to start the game