A86: Hooking interrupt idea


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

A86: Hooking interrupt idea



Steve86Asm@aol.com wrote:
>
> When the chip is off, aside from refreshing the RAM, it does nothing.  The ON
> key, I believe, is connected to something that, when pressed (at least if the
> calc is off), will trigger the Non-Maskable Interrupt (NMI) lead.  This takes
> priority on the cpu, so it restarts at 66H and then starts up.
> 
> At least, this is what I've inferred from the Z80 manuals.  Anyone
> disassembled the contents of 66H?

There are no NMI on the TI-8x calcs. First, 66h is in the middle of the
default
38h interrupt handler. And an NMI handler should end with the RETN
instruction,
which doesn't exist.

I've checked an old computer with a Z80 cpu, and at 66h there is a jump
to
a routine somewhere which ends with a RETN.

A nice thing about old Z80 computers (at least the one I have) is that a
LOT
of ROM routines starts with a call to the end of the RAM memory, so the
user
can easily hook rom routines. The default interrupt handler at 38h has
such a call for example, making interrupt programming VERY easy - just
change
a pointer in the RAM :)

When disassembling the 86 ROM, I found some interesting stuff though.
The interrupt handler at 38h does actually call the RAM, $D2FE if
bit 2 at (IY+$23) is set AND if
($D2FD)=($D2FE)+($D325)+($D34D)+($D39D)+($D3C5)
(byte pointers). $D2FE contains a RET instruction as default.
I haven't tried to hook interrupts that way, but it should be
possible...

I wish we he had a documentation over the RAM, but I guess that's just
too
much to ask for :) There are an awful lot of interesting system
variables...

-- 
Jimmy Mårdell                "The nice thing about standards is that 
mailto:mja@algonet.se         there are so many of them to choose from."
http://www.algonet.se/~mja    
IRC: Yarin                   "Sanity? I'm sure I have it on tape
somewhere!"


References: