Prev: 42494 Up: Map Next: 42638
42616: Print currently available additional in-game menu command options
Used by the routine at 42494.
Input
A Available in-game menu command flags (part 1 or part 2)
HL Points to 51486 if dealing with flags, part 1. Points to 51527 if dealing with flags, part 2.
42616 LD B,8 Load B with 8 (as there are 8 flags)
42618 PUSH BC Store BC (B = remaining number of flags to process)
42619 RRCA Rotate least significant bit of A (i.e. current flag) into carry flag
42620 PUSH AF Store AF (current flag in carry and remaining flags in A)
42621 CALL 63313 Advance HL to byte after first zero from address in HL onwards
42624 POP AF Restore AF (current flag in carry and remaining flags in A)
42625 JR NC,42634 If current flag is reset then skip ahead to 42634
42627 PUSH HL Store HL (current position in additional menu items texts)
42628 PUSH AF Store AF (current flag in carry and remaining flags in A)
42629 CALL 46902 Print text at HL (current additional menu item)
42632 POP AF Restore AF (current flag in carry and remaining flags in A)
42633 POP HL Restore HL (current position in additional menu items texts)
42634 POP BC Restore BC (B = remaining number of flags to process)
42635 DJNZ 42618 Decrease B and loop back to 42618 for next flag
42637 RET Return
Prev: 42494 Up: Map Next: 42638