[A83] Re: Interrupt troubles [83, Ion]


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

[A83] Re: Interrupt troubles [83, Ion]




Ah. You've hit on the problem exactly. The interrupt that you are calling
enables interrupts before returning. rst $38 is hardly used on calculators
because of this reason. You can only jump to $0038 if necessary. If you want
to use TI's interrupts, you probably can't avoid the shadow registers. I
compiled a program with Z88DK, and it used the shadow registers a total of 3
times -- and just HL', at that. That's not a very efficient use of shadow
registers. You could probably do better using something else...

If you absolutely have to use shadow registers, then you'll probably want to
paste the entire interrupt code into your program (pretty large). As soon as
interrupts execute the EI \ RET(I) (as TI's does), another interrupt can
occur, so if the RET(I) doesn't actually return from the interrupt, you can
end up in an endless interrupt loop. This is why EI executes the next
instruction before the interrupts are reenabled -- this way there is no
possibility for interrupt overlap.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Henk Poley
Sent: Saturday, July 07, 2001 1:42 PM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: Interrupt troubles [83, Ion]

previously I used the same code exept for the ex(x)/rst stuff (so I didn't
call the TIOS-int), and then it DID work, but it could off coarse be that
the interrupt-device (the 160Hz..) switches on again after outputting the
mentioned code, maybe it takes some time untill it interrupts again...




References: