Re: LZ: Pushes and Ints


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

Re: LZ: Pushes and Ints



Mattias Lindqvist wrote:
> 
> On 20 Sep 96 at 0:14, Micah/Richard Brodsky wrote:
> 
> > I would like to build an int handler that uses the values of the registers as
> > they were when the handler was called (like that debugger program). Would the
> > following code crash the calc or set it up for a crash? Would the first part
> > be pointless? (Thanks!)
> >
> >       push af
> >       push bc
> >       push de
> >       push hl
> >       push ix
> >       push iy
> >       ex af, af'
> >       exx
> >       pop iy
> >       pop ix
> >       pop hl
> >       pop de
> >       pop bc
> >       pop af
> >       .               ;int handler code here
> >       .
> >       .
> >       .
> >       .
> >       exx
> >       ex af, af'
> >       jp $0038
> 
> That should work.. Why don't you try it?
> 


The pushes aren't necessary except ix and iy, since exx does the
same thing almost. Oh, if you use exx in the program current running
it won't work good though :-)


I assume you're not intersted in what af, bc, de, hl was when the
interrupt was called if you're not making a debugger maybe.


<pre>
-- 
Real name: Jimmy Mårdell
Email....: mailto:mja@algonet.se
IRC-name.: Yarin
WWW......: http://www.algonet.se/~mja


"Strap me down with disillusion 
  Tie me up in lifelines
   Nothing stops my thoughts from breeding
    Nothing's stopping my mind" - Leather Strip
</pre>


References: