Prev: 38072 Up: Map Next: 38118
38099: Press Any Key To Continue
Used by the routine at MainMenu.
Read from the keyboard- returns 0 when no keys are being pressed.
Debounce_CheckKeys 38099 CALL 38495 Call 38495.
38102 OR A Jump back to Debounce_CheckKeys if any keys are still being pressed.
38103 JR NZ,Debounce_CheckKeys
After the frame delay, return regardless of key presses.
38105 LD B,50 Set a timeout counter in B of 50.
Debounce_Loop 38107 HALT Halt operation (suspend CPU until the next interrupt).
38108 XOR A Reset the flags.
38109 IN A,(254) Read from the keyboard port.
Mask off the unused bits.
38111 OR %11100000 Set bits 5-7.
If no keys are being pressed, A will become 0.
38113 INC A Increment the value by one.
38114 RET NZ Return if any key has been pressed.
38115 DJNZ Debounce_Loop Decrease the timeout counter by one and loop back to Debounce_Loop until the timeout counter is zero.
38117 RET Return.
Prev: 38072 Up: Map Next: 38118