Prev: 6938 Up: Map Next: 6985
6973: Menu Attribute Address
Used by the routine at Highlight_Menu_Item.
Converts a menu index into an attribute address.
Input
A Menu index
Output
HL Attribute address of that row
Menu_Attribute_Address 6973 ADD A,$03 Add 03 to the menu index.
6975 LD H,A Copy the menu index to H.
6976 LD L,$00 Clear the low byte of the address.
6978 SRL H Divide the address by 04.
697A RR L
697C SRL H
697E RR L
6980 LD DE,$5808 Set the attribute base to 5808 (attribute buffer) in DE.
6983 ADD HL,DE Add the attribute base.
6984 RET Return.
Prev: 6938 Up: Map Next: 6985