OEL TTX2000 Issue 2.3 | Routines |
Prev: 0F18 | Up: Map | Next: 0F34 |
|
||||
get_keypress | 0F1F | CALL scan_keyboard | Scan the keyboard. | |
0F22 | AND A | Loop until a key is pressed. | ||
0F23 | JR Z,get_keypress | |||
0F25 | PUSH AF | Preserve the key code on the stack. | ||
0F26 | LD B,$64 | Set B to 100 as a loop counter. | ||
get_keypress_0 | 0F28 | PUSH BC | ||
get_keypress_1 | 0F29 | CALL scan_keyboard | Scan the keyboard. | |
0F2C | AND A | Loop until no key is pressed. | ||
0F2D | JR NZ,get_keypress_1 | |||
0F2F | POP BC | Loop 100 times. | ||
0F30 | DJNZ get_keypress_0 | |||
0F32 | POP AF | Restore the original key code in A and return. | ||
0F33 | RET |
Prev: 0F18 | Up: Map | Next: 0F34 |