Skip to navigation

Elite on the BBC Micro

Utility routines: BRBR [Disc version, Docked]

Name: BRBR [Show more] Type: Subroutine Category: Utility routines Summary: 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: * BRKBK calls BRBR

This routine is used to display error messages, before restarting the game. When called, it makes a beep and prints the system error message in the block pointed to by (&FD &FE), which is where the MOS will put any system errors. It then waits for a key press and restarts the game. BRKV is set to this routine in the loader, when the docked code is loaded, and at the end of the SVE routine after the disc access menu has been processed. In other words, this is the standard BRKV handler for the game, and it's swapped out to MEBRK for disc access operations only. When it is the BRKV handler, the routine can be triggered using a BRK instruction. The main differences between this routine and the MEBRK handler that is used during disc access operations are that this routine restarts the game rather than returning to the disc access menu, and this handler decrements the brkd counter.
.BRBR DEC brkd \ Decrement the brkd counter BNE BR1 \ If the brkd counter is non-zero, jump to BR1 to \ restart the game