[A83] Re: interrupt with rom calls


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

[A83] Re: interrupt with rom calls




> Henk Poley has made some code that you can wrap arround 
the standard
> interrupt handler and which saves all register, including 
the shadow regs,
> on the stack. Being able to use SP can be easily added. 
At the start of your
> interrupt routine you first save SP and let it point to 
some safe location.
> Then push all the regs there. Afterwards you can just pop 
them and restore
> SP to what it was when the interrupt routine was called.
> 
> HP will tell you how things work exactly. Calling the 
standard interrupt
> controller is a bit tricky :-)

I was just thinking about the same thing, but I came up
with the conclusion that you cannot modify SP with
interrupts enabled, because simply calling the interrupt
actually needs a safe stack... Shadow registers can
be used, but it can kill the speed of the interrupt,
and it also prevents me from using them inside my
interrupt (word repetition repetition, I know)...

I don't really know why it would be good to use
interrupts in a program, so I disable them. :)

PG






References: