[Coco] MM1 programmes

Bob Devries bdevries at gil.com.au
Mon Nov 17 05:04:00 EST 2003


> Good, but if the program locks up, and you manually BREAK or kill B09 from
> another window, or whatever you have to do to unstick the program, then
maybe
> neither BASIC nor OSK gets to reclaim the I/O channel.

OK, I found what was wrong. I needed to insert:
IF INKEY(#path) =0 THEN blah, blah.
Remember that in OS-9/68K BASIC the INKEY routine returns the number of
chars waiting in the buffer, *not* the first key in the queue.
It appears that if you try to read from the buffer, and there's no waiting
chars, it seems to lock up.

> If you include in your inner loop a test for a keypress, or use an ON
BREAK
> GOTO statement (does OS9 BASIC support that?), then you can exit the loop
and
> still execute the rest of your program, including the CLOSE.

It does ON ERROR GOTO, I dunno if CTRL-C is catchable, though.

Regards, Bob Devries; Ipswich, Queensland, Australia




More information about the Coco mailing list