Prev: 68ED Up: Map Next: 6938
691F: 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 FE if the wait times out.
Output
A Selected option, or FE if the wait timed out
Read_Menu_Key 691F LD A,$FE Write FE to *Menu_Highlight.
6921 LD ($E1F0),A
6924 XOR A Write 00 to *FRAMES.
6925 LD ($5C78),A
Read_Menu_Key_Loop 6928 CALL Scan_Menu_Keys Call Scan_Menu_Keys.
692B CP $FF Jump to Highlight_Menu_Item if a key was pressed.
692D JR NZ,Highlight_Menu_Item
692F LD A,($5C78) Jump to Read_Menu_Key_Loop until *FRAMES wraps.
6932 INC A
6933 JR NZ,Read_Menu_Key_Loop
6935 LD A,$FE Set the result to FE.
6937 RET Return.
Prev: 68ED Up: Map Next: 6938