Prev: AA33 Up: Map Next: AAA9
AA69: Print High Score Table
Used by the routines at GameEntryPoint and Handler_Fired.
Print_HighScoreTable AA69 CALL BlankMiddleScreenBuffer Call BlankMiddleScreenBuffer.
AA6C CALL BlankMiddleAttributeBuffer Call BlankMiddleAttributeBuffer.
Print "TRASHMAN OF THE YEAR NOMINATIONS".
AA6F LD DE,$4820 DE=4820 (screen buffer location).
AA72 LD HL,$AE07 HL=Messaging_Nominations.
AA75 CALL PrintString Call PrintString.
AA78 LD HL,$4840 HL=4840 (screen buffer location).
AA7B LD B,$20 B=20.
AA7D CALL Concealer Call Concealer.
AA80 LD DE,$4865 DE=4865 (screen buffer location).
AA83 LD HL,$B043 HL=Table_HighScore.
The game holds four high scores.
AA86 LD B,$04 B=04 (counter).
Print_HighScoreTable_Loop AA88 PUSH BC Stash the counter held in BC on the stack.
Print the players name for this position.
AA89 CALL PrintString Call PrintString.
Score are held backwards, so add three to point to the last digit.
AA8C LD BC,$0003 BC=0003.
AA8F ADD HL,BC HL+=BC.
Store the pointer for easily moving onto the next entry.
AA90 PUSH HL Stash HL on the stack.
AA91 EX DE,HL Exchange the DE register with the shadow HL register.
AA92 ADD HL,BC HL+=BC.
AA93 EX DE,HL Exchange the DE register with the shadow HL register.
Scores are held using three bytes.
AA94 LD B,$03 B=03 (counter).
AA96 CALL PrintNumbers Call PrintNumbers.
Print the "pts" suffix.
AA99 LD HL,$AE28 HL=Messaging_Pts.
AA9C CALL PrintString Call PrintString.
Update the screen buffer address for the next entry.
AA9F LD A,E E+=0A.
AAA0 ADD A,$0A
AAA2 LD E,A
Restore the stashed pointer, and move onto the next entry.
AAA3 POP HL Restore HL from the stack.
AAA4 INC HL Increment HL by one.
Fetch the counter, and loop until all the positions have been displayed.
AAA5 POP BC Restore the counter to BC from the stack.
AAA6 DJNZ Print_HighScoreTable_Loop Decrease counter by one and loop back to Print_HighScoreTable_Loop until counter is zero.
AAA8 RET Return.
Prev: AA33 Up: Map Next: AAA9