Prev: 46037 Up: Map Next: 46232
46195: Game Selection Menu
Used by the routines at HandlerHallOfFame and HandlerGameMenu.
GameMenu 46195 LD DE,46232 DE=GameSelection_Attributes.
46198 EXX Switch to the shadow registers.
46199 LD HL,46240 HL'=GameSelection_Position.
46202 LD DE,46256 DE'=GameSelection_Text.
There are eight lines of text.
46205 LD B,8 B'=8 (counter).
This entry point is used by the routines at HallOfFame and NewHighScore.
GameMenu_Loop 46207 EXX Switch back to the normal registers.
46208 LD A,(DE) Copy a byte from DE to Current_MenuAttr.
46209 LD (38568),A
46212 INC DE Increment DE by one.
46213 EXX Switch to the shadow registers.
46214 PUSH BC Stash BC' on the stack.
46215 LD A,(HL) A=HL' (grab the position data).
46216 INC HL Increment HL' (position data pointer) by two.
46217 INC HL
46218 PUSH HL Stash HL' (position data pointer) on the stack.
46219 DEC HL Decrease HL' (position data pointer) by one.
46220 LD H,(HL) A=HL' (grab the position data).
46221 LD L,A L'=A.
46222 CALL MenuWriteText Call MenuWriteText.
46225 EXX Switch back to the normal registers.
46226 POP HL Restore HL and BC from the stack.
46227 POP BC
46228 INC DE Increase DE by one.
46229 DJNZ GameMenu_Loop Decrease counter by one and loop back to GameMenu_Loop until counter is zero.
46231 RET Return.
View the equivalent code in;
Prev: 46037 Up: Map Next: 46232