![]() |
Routines |
| Prev: 60638 | Up: Map | Next: 60667 |
|
Checks whether the BREAK key combination (CAPS SHIFT + SPACE) is held while *65535 equals 99. Called during the attract mode loop and option screens. If both conditions are met, the ROM error handler is invoked via RST 8 (parameter 20), which jumps via ERRSP (23613) to reset the machine.
|
||||||||||||||||||||
| CheckBreakKey | 60646 | LD A,(65535) | Return if *65535 is not equal to 99. | |||||||||||||||||
| 60649 | CP 99 | |||||||||||||||||||
| 60651 | RET NZ | |||||||||||||||||||
|
Read both halves of the BREAK key combination. Keyboard bits are active-low (0 when pressed); OR-ing the two readings and masking to bit 0 gives 0 only when both keys are held simultaneously.
|
||||||||||||||||||||
| 60652 | LD BC,65278 | Read from the keyboard;
|
||||||||||||||||||
| 60655 | IN E,(C) | |||||||||||||||||||
| 60657 | LD B,127 | Read from the keyboard;
|
||||||||||||||||||
| 60659 | IN A,(C) | |||||||||||||||||||
| 60661 | OR E | OR with the CAPS SHIFT reading; bit 0 is 0 only if both are pressed. | ||||||||||||||||||
| 60662 | AND %00000001 | Keep only bit 0. | ||||||||||||||||||
| 60664 | RET NZ | Return if CAPS SHIFT and SPACE are not both held (BREAK not detected). | ||||||||||||||||||
|
Both conditions confirmed; trigger the ROM error handler which jumps via ERRSP (23613) to reset the machine.
|
||||||||||||||||||||
| 60665 | RST 8 | Run the ERROR_1 routine: RST 8. | ||||||||||||||||||
| 60666 | DEFB 20 | Error code: 20 ("BREAK into program"). | ||||||||||||||||||
| Prev: 60638 | Up: Map | Next: 60667 |