![]() |
Routines |
| Prev: 7C90 | Up: Map | Next: 7CEA |
|
Used by the routine at GameInitialisation.
|
||||
| GameMenu | 7CAF | LD HL,$BE4C | HL=MainFont. | |
| 7CB2 | LD ($5E01),HL | Write MainFont to FontPointer. | ||
| 7CB5 | LD DE,$7CEA | DE=GameSelection_Attributes. | ||
| 7CB8 | EXX | Switch to the shadow registers. | ||
| 7CB9 | LD HL,$7CF1 | HL=GameSelection_Position. | ||
| 7CBC | LD DE,$7CF8 | DE=GameSelection_Text. | ||
|
There are seven lines of text.
|
||||
| 7CBF | LD B,$07 | B'=07 (counter). | ||
| GameMenu_Loop | 7CC1 | EXX | Switch back to the normal registers. | |
| 7CC2 | LD A,(DE) | Copy a byte from DE to Current_MenuAttr. | ||
| 7CC3 | LD ($5E22),A | |||
| 7CC6 | INC DE | Increment DE by one. | ||
| 7CC7 | EXX | Switch to the shadow registers. | ||
| 7CC8 | PUSH BC | Stash BC' on the stack. | ||
| 7CC9 | LD A,(HL) | A=HL' (grab the position data). | ||
| 7CCA | INC HL | Increment HL' (position data pointer) by one. | ||
| 7CCB | PUSH HL | Stash HL' (position data pointer) on the stack. | ||
| 7CCC | LD H,A | H'=A L'=58. | ||
| 7CCD | LD L,$58 | |||
| 7CCF | CALL MenuWriteText | Call MenuWriteText. | ||
| 7CD2 | EXX | Switch back to the normal registers. | ||
| 7CD3 | POP HL | Restore HL and BC from the stack. | ||
| 7CD4 | POP BC | |||
| 7CD5 | INC DE | Increase DE by one. | ||
| 7CD6 | DJNZ GameMenu_Loop | Decrease counter by one and loop back to GameMenu_Loop until counter is zero. | ||
| 7CD8 | LD HL,$B800 | HL=B800. | ||
| 7CDB | LD DE,$7D51 | DE=Message_Copyright. | ||
| 7CDE | CALL PrintStringColour | Call PrintStringColour. | ||
| 7CE1 | LD HL,$0020 | HL=0020. | ||
| 7CE4 | LD DE,$7D72 | DE=GameSelection_Title. | ||
| 7CE7 | JP PrintStringColour | Jump to PrintStringColour. | ||
|
View the equivalent code in;
|
||||
| Prev: 7C90 | Up: Map | Next: 7CEA |