Prev: 26861 Up: Map Next: 26936
26911: Read Menu Key
Used by the routine at Handle_Menu.
Scans for a menu key and jumps to Highlight_Menu_Item when one is pressed. Returns 254 if the wait times out.
Output
A Selected option, or 254 if the wait timed out
Read_Menu_Key 26911 LD A,254 Write 254 to *Menu_Highlight.
26913 LD (57840),A
26916 XOR A Write 0 to *FRAMES.
26917 LD (23672),A
Read_Menu_Key_Loop 26920 CALL Scan_Menu_Keys Call Scan_Menu_Keys.
26923 CP 255 Jump to Highlight_Menu_Item if a key was pressed.
26925 JR NZ,Highlight_Menu_Item
26927 LD A,(23672) Jump to Read_Menu_Key_Loop until *FRAMES wraps.
26930 INC A
26931 JR NZ,Read_Menu_Key_Loop
26933 LD A,254 Set the result to 254.
26935 RET Return.
Prev: 26861 Up: Map Next: 26936