Prev: A68A Up: Map Next: A6C8
A699: Display score
Used by the routines at entry, main_loop and perfect_bonus.
Input
A Player 0 or 1
display_score A699 LD IX,score_player_1 Score player 1
A69D LD E,$04 Offset into name table player 1
A69F OR A If it player 1
A6A0 JR Z,display_score_0 The skip ahead
A6A2 LD IX,score_player_2 Score player 2
A6A6 LD E,$18 Offset into name table player 2
display_score_0 A6A8 LD D,$18 MSB of name table in VDP
A6AA LD BC,$0300 B = 3 (digits), C = 0 (zero character offset)
display_score_1 A6AD LD A,(IX+$02) Get 3rd score byte (most significant)
A6B0 RRA Shift BCD digit into place
A6B1 RRA ...
A6B2 RRA ...
A6B3 RRA ...
A6B4 CALL display_digit Display most significant digit
A6B7 DEC B If B > 1
A6B8 JR NZ,display_score_2 Then don't choose new zero character offset
A6BA LD C,$30 Else choose ASCII 0 as zero character offset
display_score_2 A6BC INC B Increment again
A6BD LD A,(IX+$02) Get 3rd score byte (most significant)
A6C0 CALL display_digit Display least significant digit
A6C3 DEC IX Proceed to less significant score bytes
A6C5 DJNZ display_score_1 Loop 3 times
A6C7 RET
Prev: A68A Up: Map Next: A6C8