Prev: 43571 Up: Map Next: 43689
43625: Print High Score Table
Used by the routines at GameEntryPoint and Handler_Fired.
Print_HighScoreTable 43625 CALL BlankMiddleScreenBuffer Call BlankMiddleScreenBuffer.
43628 CALL BlankMiddleAttributeBuffer Call BlankMiddleAttributeBuffer.
Print "TRASHMAN OF THE YEAR NOMINATIONS".
43631 LD DE,18464 DE=18464 (screen buffer location).
43634 LD HL,44551 HL=Messaging_Nominations.
43637 CALL PrintString Call PrintString.
43640 LD HL,18496 HL=18496 (screen buffer location).
43643 LD B,32 B=32.
43645 CALL Concealer Call Concealer.
43648 LD DE,18533 DE=18533 (screen buffer location).
43651 LD HL,45123 HL=Table_HighScore.
The game holds four high scores.
43654 LD B,4 B=4 (counter).
Print_HighScoreTable_Loop 43656 PUSH BC Stash the counter held in BC on the stack.
Print the players name for this position.
43657 CALL PrintString Call PrintString.
Score are held backwards, so add three to point to the last digit.
43660 LD BC,3 BC=0003.
43663 ADD HL,BC HL+=BC.
Store the pointer for easily moving onto the next entry.
43664 PUSH HL Stash HL on the stack.
43665 EX DE,HL Exchange the DE register with the shadow HL register.
43666 ADD HL,BC HL+=BC.
43667 EX DE,HL Exchange the DE register with the shadow HL register.
Scores are held using three bytes.
43668 LD B,3 B=3 (counter).
43670 CALL PrintNumbers Call PrintNumbers.
Print the "pts" suffix.
43673 LD HL,44584 HL=Messaging_Pts.
43676 CALL PrintString Call PrintString.
Update the screen buffer address for the next entry.
43679 LD A,E E+=10.
43680 ADD A,10
43682 LD E,A
Restore the stashed pointer, and move onto the next entry.
43683 POP HL Restore HL from the stack.
43684 INC HL Increment HL by one.
Fetch the counter, and loop until all the positions have been displayed.
43685 POP BC Restore the counter to BC from the stack.
43686 DJNZ Print_HighScoreTable_Loop Decrease counter by one and loop back to Print_HighScoreTable_Loop until counter is zero.
43688 RET Return.
Prev: 43571 Up: Map Next: 43689