Skip to navigation

Revs on the BBC Micro

Text: PrintDriverPrompt

Name: PrintDriverPrompt [Show more] Type: Subroutine Category: Text Summary: Print the "DRIVER ->" prompt and a driver's name, to show whose turn it is next when playing a multi-player game
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * MainLoop (Part 3 of 6) calls PrintDriverPrompt * MainLoop (Part 5 of 6) calls PrintDriverPrompt
.PrintDriverPrompt LDX #29 \ Print token 29, which clears the screen, displays the JSR PrintToken \ F3 header, and shows a " DRIVER -> " prompt LDX currentPlayer \ Set X to the driver number of the current player JSR GetDriverAddress \ Set (Y A) to the address of driver X's name JSR PrintDriverName \ Print the name of the driver at address (Y A) JSR WaitForSpace \ Print a prompt and wait for SPACE to be pressed RTS \ Return from the subroutine