Skip to navigation


Text: PrintSpaces

Name: PrintSpaces [Show more] Type: Subroutine Category: Text Summary: Print the specified number of spaces
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Print234DigitBCD calls PrintSpaces * Print4DigitBCD calls PrintSpaces * PrintDriverTable calls PrintSpaces * PrintToken calls PrintSpaces * UpdateLapTimers calls PrintSpaces

Arguments: A The number of spaces to print (1 to 39)
Returns: Z flag Set (so a BEQ following the routine call will always branch)
.PrintSpaces STA T \ Set T to the number of spaces to print to use as a \ loop counter .spac1 LDA #' ' \ Print a space JSR PrintCharacter DEC T \ Decrement the loop counter BNE spac1 \ Loop back until we have printed the right number of \ spaces RTS \ Return from the subroutine