Skip to navigation

Elite on the BBC Micro

Save and load: BRKBK [Master version]

Name: BRKBK [Show more] Type: Subroutine Category: Save and load Summary: Set the standard BRKV handler for the game
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * S% calls BRKBK
.BRKBK LDA #LO(BRBR) \ Set BRKV to point to the BRBR routine STA BRKV LDA #HI(BRBR) STA BRKV+1 LDA #LO(CHPR) \ Set WRCHV to point to the CHPR routine STA WRCHV LDA #HI(CHPR) STA WRCHV+1 JSR SAVEZP \ Call SAVEZP to backup the top part of zero page JSR STARTUP \ Call STARTUP to set various vectors, interrupts and \ timers JMP SRESET \ Call SRESET to reset the sound buffers and return from \ the subroutine using a tail call IF _SNG47 CLI \ These instructions are never reached and have no RTI \ effect ENDIF