[A83] Re: TIOS push recovery


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

[A83] Re: TIOS push recovery




> ----------------------------------------
> From: Ronald Teune <rtwolf@gmx.net>

> >I don't have my calc handy but if that is true something like this should
> >work:
> >
> ><header>
> > pop hl
> > push de
> > push bc
> > push af
> > push hl
> > ret
> >
> >Stack is
> >hl (ret address)
> >af (junk)
> >bc (junk)
> >de (junk)
> >
> >If it does correct, this should work, otherwise crash.

> Or this:
> 
>     pop hl
> 
>     ld b,$FF
> label:
>     push hl
>     djnz label

No, that would overflow the stack, which is only 400 bytes, and would cause the VAT to be overwritten. I guess that will always cause trouble. If make B smaller though it should work.
-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be