This particular WAIT statement waits for
port 0 bit 0 to go to 1, indicating that there is data in the
keyboard buffer.
To wait until ENT, F1, or other specific key is pressed, use
this WAIT statement to wait for a key press, read the key data
with the INKEY$ function, and thus determine which key was pressed.
The following table gives the default key assignments.
| Key |
Default key data |
| F1 |
A |
| F2 |
B |
| F3 |
C |
| F4 |
D |
| F5 |
E |
| F6 |
F |
| F7 |
G |
| F8 |
H |
| ENT |
Carriage return (0Dh) |
| BS |
Backspace (08h) |
| C |
Cancel (18h) |
For further details on keys other than the above, refer to Appendix
E "Key Number Assignment on the Keyboard" in the BHT-BASIC
Programmer's Manual. |