![]() |
Routines |
| Prev: 802C | Up: Map | Next: 80FD |
|
Draws the seven menu lines and the copyright message.
|
|||||
|
|||||
| GameMenu | 80D1 | LD DE,$810E | Set the attribute table pointer to GameSelection_Attributes. | ||
| 80D4 | EXX | Switch to the shadow registers. | |||
| 80D5 | LD HL,$8115 | Set the Y position table pointer to GameSelection_Position. | |||
| 80D8 | LD DE,$811C | Set the message pointer to String_GameSelection. | |||
|
There are seven lines of text.
|
|||||
| 80DB | LD B,$07 | Set a line counter in B' for 07 loops. | |||
| GameMenu_Loop | 80DD | EXX | Switch back to the normal registers. | ||
| 80DE | LD A,(DE) | Copy the line attribute to Current_MenuAttribute. | |||
| 80DF | LD ($5E66),A | ||||
| 80E2 | INC DE | Move the attribute table pointer on by one. | |||
|
Fetch the line Y position and print the line.
|
|||||
| 80E3 | EXX | Switch to the shadow registers. | |||
| 80E4 | PUSH BC | Stash the line counter on the stack. | |||
| 80E5 | LD A,(HL) | Fetch the line Y position. | |||
| 80E6 | INC HL | Move the Y position table pointer on by one. | |||
| 80E7 | PUSH HL | Stash the Y position table pointer on the stack. | |||
| 80E8 | LD H,A | Set the print co-ordinate from the Y position and X position 38. | |||
| 80E9 | LD L,$38 | ||||
| 80EB | CALL MenuWriteText | Call MenuWriteText. | |||
|
Move on to the next line of text until all seven are printed.
|
|||||
| 80EE | EXX | Switch to the shadow registers. | |||
| 80EF | POP HL | Restore the Y position table pointer and line counter from the stack. | |||
| 80F0 | POP BC | ||||
| 80F1 | INC DE | Move the message pointer on to the next string. | |||
| 80F2 | DJNZ GameMenu_Loop | Decrease the line counter by one and loop back to GameMenu_Loop until every line is printed. | |||
|
Print the copyright line.
|
|||||
| 80F4 | LD HL,$B800 | Set the screen position to B800. | |||
| 80F7 | LD DE,$818A | Set the message pointer to String_Copyright. | |||
| 80FA | JP PrintStringColour | Jump to PrintStringColour. | |||
| Prev: 802C | Up: Map | Next: 80FD |