Skip to navigation

Aviator on the BBC Micro

Main loop: MainLoop (Part 7 of 15)

Name: MainLoop (Part 7 of 15) [Show more] Type: Subroutine Category: Main loop Summary: Process the terminate key Deep dive: Program flow of the main game loop
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.main12 LDA onGround \ If onGround is zero, we are in the air and can't BEQ main13 \ terminate the game with the right arrow key, so jump \ to main13 to skip the following LDX #&86 \ Scan the keyboard to see if the right arrow is being JSR ScanKeyboard \ pressed BNE main13 \ If the right arrow is not being pressed, jump to \ main13 JSR TerminateGame \ The right arrow is being pressed, which is the key to \ terminate the game, so call TerminateGame to do \ exactly that JMP NewGame \ Jump to NewGame to start a new game