Re: A86: Interrupts


[Prev][Next][Index][Thread]

Re: A86: Interrupts




If you time them, it's actually close to 175 or 180.  But anyway, you asked
a good question.  Because you (usually) use the shadow registers to save the
calc's normal regs during an interrupt, an interrupt routine isn't
re-entrant.

When an interrupt is entered, interrupts are automatically disabled by the
hardware.  So, unless you re-enabled them inside the routine, another
interrupt couldn't occur during the first one (maybe ON can, but we won't go
into that).  If you did enable them and one occured, the second one would
swap out the shadow registers, and end up trashing the programs' registers,
which would surely crash the calc.

Even with a short interrut routine, enabling them at the beginning crashes
the calc (I tried with my grayscale interrupt).

> >  Ah, drawing every interrupt, that is probably what was screwing it up.
I
> >  think ideally it should only redraw if you are setting at a _getkey
prompt.
> >  That would ensure it didn't overwrite anything going on (don't see why
it
> >  would affect anything, but evidently it does somehow).
> >
> ok since the interrupts are called 200 times per second
> each one can only take 1/200 of a second
> what happens if it takes longer?? does it just slow down the calc or
possibly
> mess it up




Follow-Ups: References: