\ --- Mod: Code added for Elite-A: --------------------> CLC \ Clear the C flag so the routine doesn't print a \ decimal point if called via pr2-1 \ --- End of added code -------------------------------> .pr2 LDA #3 \ Set A to the number of digits (3) LDY #0 \ Zero the Y register, so we can fall through into TT11 \ to print the 16-bit number (Y X) to 3 digits, which \ effectively prints X to 3 digits as the high byte is \ zeroName: pr2 [Show more] Type: Subroutine Category: Text Summary: Print an 8-bit number, left-padded to 3 digits, and optional pointContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT25 calls pr2 * fwl calls pr2 * TT210 calls entry point pr2-1 * TT213 calls entry point pr2-1 * TT25 calls entry point pr2-1 * tal calls entry point pr2-1 * TT151 calls entry point pr2+2

Print the 8-bit number in X to 3 digits, left-padding with spaces for numbers with fewer than 3 digits (so numbers < 100 are right-aligned). Optionally include a decimal point. Arguments: X The number to print C flag If set, include a decimal point Other entry points: pr2+2 Print the 8-bit number in X to the number of digits in A pr2-1 Print X without a decimal point