Skip to navigation


Scoring: DisplayScore

Name: DisplayScore [Show more] Type: Subroutine Category: Scoring Summary: Print the scores on-screen
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * MainLoop (Part 14 of 15) calls DisplayScore * TerminateGame calls DisplayScore
.DisplayScore LDX #0 \ Print characters 0-15 from scoreText, which moves the LDY #16 \ text cursor to column 1, row 3 and prints JSR PrintScoreText \ "HIGH SCORE: " LDA highScoreHi \ Print the high byte of the high score JSR PrintScore LDA highScoreLo \ Print the low byte of the high score JSR PrintScore LDX #16 \ Print characters 16-19 from scoreText, which prints a LDY #20 \ "0" and moves the text cursor to column 3, row 10 JSR PrintScoreText LDX #8 \ Print characters 8-15 from scoreText, which prints LDY #16 \ "SCORE: " JSR PrintScoreText LDA scoreHi \ Print the high byte of the score JSR PrintScore LDA scoreLo \ Print the low byte of the score JSR PrintScore LDA #'0' \ Print a "0" JSR OSWRCH RTS \ Return from the subroutine