[Coco] signal/intercept routine in Basic09

Bob Devries devries.bob at gmail.com
Sat Jan 23 22:52:46 EST 2010


Robert,

Your example may well work as you describe. However, have you tried to send 
a signal to the Basic09 process with a programme such as Boisy's 'send'?

Basic09 appears to receive the signal, but quits to the debug mode, and 
doesn't trap the error.

I used this sample code:

DIM a:INTEGER
DIM I$:STRING[1]
ON ERROR GOTO 100
10 FOR a=1 TO 40
PRINT ".";
NEXT a
PRINT
GOTO 10
100 PRINT "Error ";ERR;"occurred"
PRINT "Press a key...."
RUN INKEY(I$)
END

Line 100 is never reached if I send signal 4 to Basic09 using Boisy's 'send' 
programme like this:

send -4 3

-4 denotes the signal to send, and 3 is the Basic09 process in my case.

Regards, Bob Devries

--
Besides a mathematical inclination, an exceptionally good mastery of one's 
native tongue is the most vital asset of a competent programmer.

Edsger W.Dijkstra, 18 June 1975

----- Original Message ----- 
From: "Robert Gault" <robert.gault at worldnet.att.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Sunday, January 24, 2010 12:52 PM
Subject: Re: [Coco] signal/intercept routine in Basic09


> Aaron Wolfe wrote:
>> It's probably worth noting that the "port closed" signal is not a part
>> of standard OS-9, it is a feature of the DriveWire additions we're
>> working on.  The signal's value is 4.  It is sent to a process when
>> the remote end of a TCPIP connection closes.
>>
>
> For what it is worth, Basic09 would trap the error 4.
>  ON ERROR GOTO 100
>  ERROR 4
>  END
> 100 PRINT"The error was caught."
>
> When this is run, the message is printed. Now the manual indicates that 
> there is no real difference between signals and errors. Errors are just 
> specific signals. So, if the signal to be caught is coming from Drivewire, 
> it does not seem to be getting through to Basic09. That's assuming error 
> trapping as above is being used.
>
> It may mean that using syscall to set up an intercept may not work either.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list