[Color Computer] [coco] Learning MW C
Dave Kelly
daveekelly at earthlink.net
Mon Aug 14 00:11:11 EDT 2006
George's Coco Address wrote:
>
> Can a C routine be called upon from an interrupt? That would be great, as
> the optical position sensor could call on the routine. I can solder that one
> up too.
I too went through the same confusion. Then one day all fell into place.
Do you have the development manuals? They answer a lot of the questions
I've seen you ask.
Such as the one you ask above. You trap the interrupt in a C routine.
About peeks and pokes. If you go to the bible, K&R, you find no mention
of peek or poke.
A peek or poke is a read or write of a memory address or a path to a
device. So some psudocode might look like this:
int poke( address, value )
int address;
char value; /* are you controlling 8 bits or 16 bits */
{
write ( address, value, 1 );
}
You want to be sure and trap any/all errors that would cause the program
to abort uncontrolled. Shut down with sanity.
--
The trouble with trouble is it starts out as fun.
More information about the Coco
mailing list