![]() |
Routines |
| Prev: B3D5 | Up: Map | Next: B498 |
|
Used by the routines at HandlerHallOfFame and HandlerGameMenu.
|
||||
| GameMenu | B473 | LD DE,$B498 | DE=GameSelection_Attributes. | |
| B476 | EXX | Switch to the shadow registers. | ||
| B477 | LD HL,$B4A0 | HL'=GameSelection_Position. | ||
| B47A | LD DE,$B4B0 | DE'=GameSelection_Text. | ||
|
There are eight lines of text.
|
||||
| B47D | LD B,$08 | B'=08 (counter). | ||
|
This entry point is used by the routines at HallOfFame and NewHighScore.
|
||||
| GameMenu_Loop | B47F | EXX | Switch back to the normal registers. | |
| B480 | LD A,(DE) | Copy a byte from DE to Current_MenuAttr. | ||
| B481 | LD ($96A8),A | |||
| B484 | INC DE | Increment DE by one. | ||
| B485 | EXX | Switch to the shadow registers. | ||
| B486 | PUSH BC | Stash BC' on the stack. | ||
| B487 | LD A,(HL) | A=HL' (grab the position data). | ||
| B488 | INC HL | Increment HL' (position data pointer) by two. | ||
| B489 | INC HL | |||
| B48A | PUSH HL | Stash HL' (position data pointer) on the stack. | ||
| B48B | DEC HL | Decrease HL' (position data pointer) by one. | ||
| B48C | LD H,(HL) | A=HL' (grab the position data). | ||
| B48D | LD L,A | L'=A. | ||
| B48E | CALL MenuWriteText | Call MenuWriteText. | ||
| B491 | EXX | Switch back to the normal registers. | ||
| B492 | POP HL | Restore HL and BC from the stack. | ||
| B493 | POP BC | |||
| B494 | INC DE | Increase DE by one. | ||
| B495 | DJNZ GameMenu_Loop | Decrease counter by one and loop back to GameMenu_Loop until counter is zero. | ||
| B497 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: B3D5 | Up: Map | Next: B498 |