Skip to navigation

Lander on the Acorn Archimedes

Main loop: GameOver

Name: GameOver [Show more] Type: Subroutine Category: Main loop Summary: Print a Game Over message and start a new game
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.GameOver MOV R0, #112 \ Set the VDU driver screen bank to bank 1 MOV R1, #1 SWI OS_Byte MOV R0, #31 \ Print the following VDU command: SWI OS_WriteC \ MOV R0, #1 \ VDU 31, 1, 16 SWI OS_WriteC \ MOV R0, #16 \ which moves the text cursor to column 1 on SWI OS_WriteC \ row 16, halfway down the screen SWI OS_WriteS \ Print the Game Over message EQUS "GAME OVER - press a " EQUS "key to start again" EQUB 0 ALIGN MOV R0, #112 \ Set the VDU driver screen bank to bank 2 MOV R1, #2 SWI OS_Byte MOV R0, #31 \ Print the following VDU command: SWI OS_WriteC \ MOV R0, #1 \ VDU 31, 1, 16 SWI OS_WriteC \ MOV R0, #16 \ which moves the text cursor to column 1 on SWI OS_WriteC \ row 16, i.e. the same text coordinates as \ the text we printed in screen bank 1 above SWI OS_WriteS \ Print the Game Over message EQUS "GAME OVER - press a " EQUS "key to start again" EQUB 0 ALIGN SWI OS_ReadC \ Wait for a key press B StartNewGame \ Jump to StartNewGame to start a brand new \ game