Prev: B4B0 Up: Map Next: B53D
B52D: Write Menu Line
Used by the routine at GameMenu.
Prints a line of text with an attribute, for the game selection menu and the hall of fame. The shadow registers hold the text pointer (DE') and the screen address (HL'), and the normal registers hold the attribute address (HL). The attribute is taken from Current_MenuAttribute. Printing is done by the code in PrintStringColour.
Before
menu-line-before
After MenuWriteText
menu-line-after
Input
HL Position of the text, with the Y position in H and the X position in L (both in pixels)
DE' Pointer to the text, which ends with a character that has bit 7 set
MenuWriteText B52D PUSH HL Stash the position of the line of text on the stack.
B52E CALL ScreenAddress Convert the position into a screen address.
B531 LD A,($96A8) Fetch the attribute of the line of text from Current_MenuAttribute.
B534 EX AF,AF' Stash the attribute in the shadow AF register.
B535 EXX Switch to the shadow registers.
B536 POP HL Restore the position of the line of text from the stack.
B537 CALL AttributeAddress Convert the position into an attribute address.
B53A JP PrintString_Loop Jump to PrintString_Loop to print the line of text.
Prev: B4B0 Up: Map Next: B53D