Safe Key Getter

Finally, an assembly key getter that is completely protected from [ON] breaks! A useful tool for BASIC password protection programs, as well as anywhere you want a robust key routine.

Simply send safekey.8xp and run Asm(prgm[Theta]SAFEKEY, and the keycode is stored in variable X. Uses standard getKey codes. See the instruction manual for a table. If [ON] was pressed, X will contain 101. The run indicator is disabled.

This version adds a separate program, prgm[Theta]SAFEKEZ (safekeyz.8xp), which polls the keyboard to determine if a key is being pressed. However, if nothing is pressed, instead of waiting for a key, it places 0 in X. This program drops [ON] support because this is potentially very risky: the [ON] could interrupt your program rather than occuring while Safe Key Getter is checking the keyboard. Also, the run indicator remains enabled.

Created by Matt McCutchen