Skip to navigation


Text: Print4DigitBCD

Name: Print4DigitBCD [Show more] Type: Subroutine Category: Text Summary: Print a specific driver's accumulated points as a four-digit number
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Print234DigitBCD calls Print4DigitBCD * PrintDriverTable calls Print4DigitBCD * Print234DigitBCD calls via Print4DigitBCD+3

Print (totalPointsHi totalPointsLo) for driver X as a 4-digit number, followed by a space. The second digit is always printed.
Arguments: A Always called with totalPointsHi,X
Other entry points: Print4DigitBCD+3 Do not print the first two digits (i.e. omit printing A)
.Print4DigitBCD JSR Print2DigitBCD \ Print the binary coded decimal (BCD) number in A LDA totalPointsLo,X \ Print the low byte of the total accumulated points for JSR Print2DigitBCD \ driver X, which is a binary coded decimal (BCD) number LDA #1 \ Print a space JSR PrintSpaces RTS \ Return from the subroutine