Re: A82: Return from interupt
[Prev][Next][Index][Thread]
Re: A82: Return from interupt
I encountered the same problem with the greyscale interrupt. When I looked
at the code around $0038 (as far as I can remember) I noticed port 3 was
being written to for some reason. I can't recall at the moment why, but
the following code seems to work well enough if you plan to exit with an
ei /reti combo:
xor a ;Not sure about this value, but seems to work
out ($3),a ;also unsure about why the first out is necessary
ld a,%00000010
out ($3),a
ex af,af'
exx
ei ;enable ints
reti
I'm not sure why the first out is necessary, but the calc would crash
without it. I'm pretty sure Dines' 82port document says something about
bit1 when writing to port3, but I don't have it to look at at the moment.
As for the emulators, I don't know of any which actually simulate the
ports on the 82 properly.
-Jeremy
On Thu, 5 Aug 1999, Eric Piel wrote:
> Hi
> I have made a little program to make sounds with the ti82. To change the noise I
> use a interupt routine that slow down the calculator according a certain number.
> But I encountered troubles when returning from the interupts: Whereas JP 0038h
> works perfectly, EI / RETI stops the calculator. Moreover when I try the
> different versions with an emulator both work fine (I've tried 3 emulators).
> Perhaps the problems come from the fact that I also use D_HL_DECI?
> Does anyone knows why such things happen?
>
> I've attached the two versions and the scource code. The troubles are in the
> last lines of the code (Because of a .org the program won't compile properly
> with tasm instead use Assmebly studio 86).
>
> Eric Piel
>
Follow-Ups:
References: