Prev: 7C19 Up: Map Next: 7CAF
7C90: Flash Menu Selection
Used by the routine at GameInitialisation.
Updates three consecutive entries of the menu attribute table so that only the selected entry has its flash (bit 7) set. After the first rotation, bits 0-1 of A hold the number of the selected entry (00 to 02), which counts down as each entry is processed; the entry where it reaches zero is flashed.
Input
A Options, with the selection in bits 1-2
B Number of entries (always 03)
HL First attribute table entry
Output
HL Entry after the last one updated
FlashSelection 7C90 RRCA Rotate A right, which brings the selection into bits 0-1.
FlashSelection_Loop 7C91 AND %00000011 Keep only bits 0-1.
7C93 JR Z,FlashSelection_Selected Jump to FlashSelection_Selected if this is the selected entry, which is when the selection number has counted down to zero.
7C95 CALL FlashSelection_Clear Call FlashSelection_Clear to stop this entry flashing.
FlashSelection_Next 7C98 DEC A Decrease the selection number by one.
7C99 DJNZ FlashSelection_Loop Decrease the entry counter by one and loop back to FlashSelection_Loop until all three entries have been updated.
7C9B RET Return.
FlashSelection_Selected 7C9C CALL FlashSelection_Set Call FlashSelection_Set to make this entry flash.
7C9F JR FlashSelection_Next Jump back to FlashSelection_Next to move on to the next menu entry.
These instructions are never used.
7CA1 SET 7,(HL) Set bit 7 of *HL.
7CA3 INC HL Move HL on to the next menu entry.
Stop one entry flashing and move on to the next.
FlashSelection_Clear 7CA4 RES 7,(HL) Reset bit 7 of *HL.
7CA6 INC HL Move HL on to the next menu entry.
7CA7 RET Return.
These instructions are never used.
7CA8 RES 7,(HL) Reset bit 7 of *HL.
7CAA INC HL Move HL on to the next menu entry.
Make one entry flash and move on to the next.
FlashSelection_Set 7CAB SET 7,(HL) Set bit 7 of *HL.
7CAD INC HL Move HL on to the next menu entry.
7CAE RET Return.
Prev: 7C19 Up: Map Next: 7CAF