[Coco] signal/intercept routine in Basic09
Christopher Hawks
chawks at dls.net
Sun Jan 24 09:08:23 EST 2010
Robert Gault said the following on 01/24/2010 06:45 AM:
> Wayne Campbell wrote:
>> Apparently, ON ERROR GOTO doesn't like 4. I opened a window, ran a test
>> prog that just ran a loop and reacted to ON ERROR GOTO. When I sent the
>> signal 4 to the process from the other window (used send -1 <proc>),
>> Basic09 dropped into debug instead of going thru the error trap.
>>
>> Wayne
>
> That may be the case but here is a more relevant example.
>
> ON ERROR GOTO 100
> SHELL "dir /x2"
> END
> 100 PRINT "Drive not ready."
>
> If this is run without an image mounted in Drivewire slot 2, the message
> is printed. If there is an OS-9 image mounted in slot 2, the directory
> is displayed.
> The signal sent without a disk is 244, read error.
We're talking apples and oranges here. A signal is not sent on a read error.
The Shell returns the error, it doesn't send a signal to basic09. Pressing
control-C sends a signal to basic09. (and goes to Debug mode.) Aaron's signal
handler should be great!!
--
Christopher R. Hawks
HAWKSoft
---------------------------------------------------------
"When in doubt, use brute force."
-- Ken Thompson, Bell Labs
More information about the Coco
mailing list