.PrintBestLapTime LDX #32 \ Move the cursor to character column 32 (to just after STX xCursor \ "Best time" in token 40) INX \ Move the cursor to pixel row 33 (i.e. the second text STX yCursor \ line at the top of the screen) LDX currentPlayer \ Set X to the driver number of the current player, so \ the call to PrintTimer prints the lap time for the \ current driver LDA #%00100110 \ Print the best lap time for driver X in the following JSR PrintTimer \ format: \ \ * %00 Minutes: No leading zeroes, print both digits \ * %10 Seconds: Leading zeroes, print both digits \ * %0 Tenths: Print tenths of a second \ * %11 Tenths: Leading zeroes, no second digit \ Fall through into PrintLapTime to print the current \ lap time at the top of the screenName: PrintBestLapTime [Show more] Type: Subroutine Category: Text Summary: Print the best lap time and the current lap time at the top of the screenContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ResetVariables calls PrintBestLapTime * UpdateLapTimers calls PrintBestLapTime
[X]
Subroutine PrintTimer (category: Text)
Print the specified timer
[X]
Variable currentPlayer in workspace Zero page
The number of the current player
[X]
Variable xCursor (category: Text)
The cursor's x-coordinate, which can either be a pixel coordinate or a character row
[X]
Variable yCursor (category: Text)
The cursor's pixel y-coordinate