Skip to navigation

Revs on the BBC Micro

Text: PrintLapTime

Name: PrintLapTime [Show more] Type: Subroutine Category: Text Summary: Print 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: * UpdateLapTimers calls PrintLapTime * UpdateLapTimers calls via PrintLapTime+2

This routine prints the current lap time in the header at the top of the screen in the following format: * Minutes: No leading zeroes, print both digits * Seconds: Leading zeroes, print both digits * Tenths: Do not print tenths of a second
Other entry points: PrintLapTime+2 Format the lap time using the format value in A (see PrintTimer for details)
.PrintLapTime LDA #%00101000 \ Set A so the current lap time is printed in the \ following format by the call to PrintTimer: \ \ * %00 Minutes: No leading zeroes, print both digits \ * %10 Seconds: Leading zeroes, print both digits \ * %1 Tenths: Do not print tenths of a second LDX #10 \ Move the cursor to character column 10 (to just after STX xCursor \ "Lap time" in token 40) LDX #33 \ Move the cursor to pixel row 33 (i.e. the second text STX yCursor \ line at the top of the screen) LDX #21 \ Print (lapMinutes lapSeconds lapTenths) in the format JSR PrintTimer \ given in A RTS \ Return from the subroutine