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

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



vandry@CAM.ORG (Phillip Vandry) writes:
>uerics@mcl.ucsb.edu (Eric D. Shepherd) writes:
>>To kill CTRL-C characters, just patch into the KSW vector in the zero page
>>at locations $38-$39.  Something like this should do the trick:

>Of course, but it won't disable Ctrl-C before you get a chance to run the patch
>That was the original question.

I don't think that it will even disable ctrl-C trapping after it has been run.
Here is the code in ROM that Applesoft uses:

IsCtrlC
 lda $c000	; poll the keyboard directly. Does NOT use KSW!!
 cmp #$83	; check for a ^C
 beq Ld860
 rts
Ld860
 jsr InChar	; gobble up the ^C
Ld863
 ldx #$ff
 bit $d8	; check for ONERR active
 bpl Ld86c
 jmp Lf2e9

I would guess from this that ^C will only work from the keyboard, not from
any other source (ie if you have IN#2 and PR#2 active and you are using a
terminal attached to your serial card, ^C would not work from the terminal).
-- 
David Wilson				+61 42 213802 voice, +61 42 213262 fax
Dept Comp Sci, Uni of Wollongong	david@cs.uow.edu.au