Prev: 8B22 Up: Map Next: 8B81
8B78: Busy-wait, 1000 times round
Used by the routine at SCAN_KEYBOARD.
About 26,000 T-states, or 7.4ms. SCAN_KEYBOARD calls it every time, so while the game sits at its prompt this is 88% of everything it does -- idle, not work, but it is also the reason a scan is too expensive to call from inside the drawing code as it stands.
DEBOUNCE_DELAY 8B78 LD BC,$03E8 1000 times round a four-instruction loop: about 26,000 T-states
DEBOUNCE_DELAY_0 8B7B DEC BC
8B7C LD A,B
8B7D OR C
8B7E JR NZ,DEBOUNCE_DELAY_0
8B80 RET
Prev: 8B22 Up: Map Next: 8B81