Skip to navigation

Revs on the BBC Micro

Text: PrintBestLapTime

Name: PrintBestLapTime [Show more] Type: Subroutine Category: Text Summary: Print the best lap time and the current lap time at the top of the screen
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ResetVariables calls PrintBestLapTime * UpdateLapTimers calls PrintBestLapTime
.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 screen