[Coco] noob question

Rob Rosenbrock bester at adamswells.com
Wed Nov 8 09:17:49 EST 2017


> I'm trying to wrap my head around how you would achieve similar behavior
> on a coco.
>
> I suppose a loop that kept polling for statuses that I'm interested in.
>
> IRQs are interesting too but do they fire 60 times a second?  And what
> happens when my check doesn't complete in 1/60th of a second. does it fire
> again?

Yes, it would fire again.

At the beginning of your Interrupt routine you can disable interrupts.
Good form is to keep your routine as short as possible. Best practice is
to not use it for your mainline code.

The Interrupt is designed to run and then return the processor back to
where it was when it was interrupted. It's useful for responding to timed
or external events.

Instead of an IRQ, I would create a simple mainline routine at the
beginning of my code. Just a short loop that gets input, calls subroutines
based on that input, Output the results, and then branch back to the
beginning of the loop.



More information about the Coco mailing list