Prev: F4BE Up: Map Next: F544
F4F0: Print Score
Used by the routine at Draw_StatusIcons_Target2.
Prints the score digits and copies a new high score when the stored score is lower.
Draw_StatusIcons_Branch F4F0 LD DE,$0000 Write 0000 to *TemporaryPair.
F4F3 LD ($6417),DE
F4F7 LD HL,$3C00 Write 3C00 to *CHARS.
F4FA LD ($5C36),HL
F4FD LD A,$07 Write WHITE to *ATTR_T.
F4FF LD ($5C8F),A
F502 LD BC,$041B Print the five digits at 64BB.
F505 LD HL,$64BB
F508 CALL Draw_StatusIcons_Target5
F50B LD B,$05 Compare those digits with 64B5.
F50D LD HL,$64BB
F510 LD DE,$64B5
Draw_StatusIcons_Target3 F513 LD A,(DE) Jump to Draw_StatusIcons_Skip2 if this pair matches.
F514 CP (HL)
F515 JR Z,Draw_StatusIcons_Skip2
F517 JR C,Draw_StatusIcons_Branch2 Jump to Draw_StatusIcons_Branch2 if the stored score is lower.
F519 JR Draw_StatusIcons_Target4 Jump to Draw_StatusIcons_Target4.
Draw_StatusIcons_Skip2 F51B INC HL Advance both pointers and loop back to Draw_StatusIcons_Target3.
F51C INC DE
F51D DJNZ Draw_StatusIcons_Target3
Draw_StatusIcons_Target4 F51F LD BC,$0410 Print the five digits at 64B5.
F522 LD HL,$64B5
F525 JP Draw_StatusIcons_Target5
Draw_StatusIcons_Branch2 F528 LD DE,$64B5 Copy the new score over the stored score.
F52B LD HL,$64BB
F52E LD BC,$0005
F531 LDIR
F533 JR Draw_StatusIcons_Target4 Jump to Draw_StatusIcons_Target4.
Draw_StatusIcons_Target5 F535 CALL Set_PrintPosition Call Set_PrintPosition.
F538 LD B,$05 B=05.
Draw_StatusIcons_Target6 F53A LD A,(HL) Convert the digit into a character.
F53B ADD A,$0A
F53D CALL Print_Character Call Print_Character.
F540 INC HL Advance the digit pointer and loop back to Draw_StatusIcons_Target6 until all five digits are printed.
F541 DJNZ Draw_StatusIcons_Target6
F543 RET Return.
Prev: F4BE Up: Map Next: F544