[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can Ctrl-C interrupt be removed from ProDOS BASIC?



swh54716@uxa.cso.uiuc.edu (Scott W. Henson) writes:

> Can the Ctrl-C interrupt be removed from ProDOS and/or Basic.System so
> that programs that run from self-booting disks cannot be terminated during
> the boot sequence (i.e. before they have been loaded and execution has
> started)?  If so, how would one go about patching things to remove the
> interrupt handler?

The ctrl-c interrupt is a 'feature' of BASIC, so that programs can be 
halted if something goes wrong etc. To trap for the event, use an ONERR 
GOTO sequence (ctrl-c produces error code 255). However, this will only 
prevent a user from breaking out of the program once the error handler 
has been installed. If they are quick enough, it is still possible to 
break out beforehand.
It is not an interrupt as such, but something BASIC checks for at certain 
times during the execution of a line (I think). If it finds a Ctrl-c, it 
sends an error message (which is why it can be trapped) and breaks out of 
the program if there is no handler.
I _think_ there was something in an early issue of Open-apple about this. 
It might pay to check there - I can check if you don't have them 
available.
If none of this makes sense to you, or if you want more info, feel free 
to contact me at kkenn@cola.pax.tpa.com.au

Hope this has been of assistance to you,
 
Kristian
 
...Apple // forever!

---
kkenn@cola.pax.tpa.com.au
The Clipboard BBS, Fidonet 3:800/861, +61-8-258-3939 24 hrs/day