Prev: 9195 Up: Map Next: 91C0
91B0: Write Menu Line
Prints a string at a pixel position, giving every character the attribute that is held in Current_MenuAttribute. The last character of the string has bit 7 set.
The work is done by PrintString_Loop, which prints through HL (the screen address) while the attribute buffer address is kept in HL' and the attribute in AF'.
Before After MenuWriteText
menu-line-before menu-line-after
Input
HL Position (L is the x position, H is the y position)
DE Pointer to the string
MenuWriteText 91B0 PUSH HL Stash the position on the stack.
91B1 CALL ScreenAddress Convert the position into the screen address (in HL).
91B4 LD A,($8EE8) Fetch the attribute from Current_MenuAttribute.
91B7 EX AF,AF' Keep the attribute for the characters of the string.
91B8 EXX Switch to the shadow registers.
91B9 POP HL Restore the position into HL'.
91BA CALL AttributeAddress Convert the position into the address in the attribute buffer.
91BD JP PrintString_Loop Jump to PrintString_Loop to print the string.
Prev: 9195 Up: Map Next: 91C0