.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 subroutineName: 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 gameContext: 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
[X]
Subroutine GetDriverAddress (category: Text)
Get the address of the specified driver's name
[X]
Subroutine PrintDriverName (category: Text)
Print a driver's name
[X]
Subroutine PrintToken (category: Text)
Print a recursive token
[X]
Subroutine WaitForSpace (category: Keyboard)
Print a prompt, wait for the SPACE key to be released, and wait for SPACE to be pressed
[X]
Variable currentPlayer in workspace Zero page
The number of the current player