Prev: F350 Up: Map Next: F41C
F408: Set menu item attributes
This sets the screen attributes of the specified menu item.
Used by the routines at main and check_menu_keys.
Input
A Menu item index.
E Attributes.
set_menu_item_attributes F408 LD HL,$590D Point HL at the first menu item's attributes
Skip to the item's row.
F40B AND A Is the index zero?
F40C JR Z,set_menu_item_attributes_1 Jump if so - no need to advance the pointer
F40E LD B,A Set B for (item index) iterations
Start loop
set_menu_item_attributes_0 F40F LD A,L Advance by two attribute rows per iteration (64 bytes)
F410 ADD A,$40
F412 LD L,A
F413 DJNZ set_menu_item_attributes_0 ...loop
Set the attributes.
set_menu_item_attributes_1 F415 LD B,$0A Set B for ten iterations
Start loop
set_menu_item_attributes_2 F417 LD (HL),E Set one attribute byte
F418 INC L Advance to the next
F419 DJNZ set_menu_item_attributes_2 ...loop
F41B RET Return
Prev: F350 Up: Map Next: F41C