[Coco] disabling the break key in BASIC programs.

Aaron Banerjee spam_proof at worldnet.att.net
Wed Mar 29 03:51:37 EST 2006


All,
   I recently stumbled on an old routine I used to use for disabling the
break key in BASIC programs.  I was just trying to decipher it.

1  IF PEEK(&H3EB9)<>32 THEN CLEAR 350,&H3EA0:FOR I = &H82B9 TO &H831E:
POKE I-&H4400, PEEK(I): NEXT I ELSE 3
2  FOR I = 0 TO 2:POKE &H3EBD+I,18:NEXT
3  POKE &H19B,&H3E:RUN5
4  REM  PROGRAM STARTS ON LINE 5

Once upon a time I had this one figured out.  We're copying code, NOP'ping
out a jump, and then realigning a pointer.  

If my memory serves me correctly, this effectively disables the break key
so long as the computer is executing instructions that are not waiting for
user input (e.g. INPUT, etc).  If you wanted to INPUT something with the
break key disabled using this, you could do something using INKEY and it
would work.

I'm assuming &H19B is some sort of pointer or "hook" (which presumably is
&H19B and &H19C).  Any idea of when that address is jumped to?

It's been a while since I've been curious enough to mess with this sort of
thing....
                           - Aaron

p.s.  The above worked on an Extended Color BASIC 1.0 machine...  I
haven't a clue if it would on a more "modern" coco.




More information about the Coco mailing list