★ APPLICATIONS ★ DIVERS ★ Here's a foolproof Escape plan! ★ |
Disabler (Computing with the Amstrad) | Applications Divers |
ROLAND WADDILOVE describes how to disable the Escape key A LOT of commercial software, as you've probably noticed, disables the Escape key and the Ctrl+Shift + Esc reset function. It's not just for protection, though that's the main reason. The Escape key is right next to the 1 key, so it's quite easy to hit it accidentally - when for example selecting the first option from a menu. Educational programs need to be absolutely foolproof - little fingers like to fiddle and press things. Of course, if the key doesn't do anything no harm is done in the end. However it wouldn't be nice if the program stopped with an error report. A child would soon be put off if that happened all the time. It would also be useful in adventures if you could stop anyone cheating by looking at the listing. After saving it in protected form with: SAVE"adventure",Pthe program would be unlistable -even by you - if Escape was disabled. How is it done? Break can be disabled by redefining Escape using: KEY 66,0,0,0This produces the Ascii code zero, which the Amstrad takes to mean "do nothing". Preventing reset isn't difficult either. Simply POKE &C9 into &BDEE. The firmware calls &BDEE to see whether it should carry out a reset or not. Those of you who have been following Mike Bibby's machine code series will know that &C9 means Return. So the routine never carries out the reset, it just returns from whence it came. It's best to remember what &BDEE contained originally so you can replace it if necessary to enable reset again. a%=PEEK(&BDEE) |
|
|