[A83] Re: ex af,af'


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

[A83] Re: ex af,af'




> If the lcddata part depends on the initial value of the=20
> flags register and/or it uses the ex af,af' instruction=20
> somewhere, the routine is likely to give wrong results. You=20
> have to keep in mind that the stack is a (normally) safe=20
> place, but the shadow registers aren't. The most important=20
> difference is that when you're "saving" af, both a and f=20
> will be altered if you use "ex af,af'", as opposed to
> "push af", which changes only sp and (sp), but preserves=20
> the old values of a and f.

No, the lcddata is just a delay + out macro, and I don't use the
flag register without updatnig it. Instead of pushing and popping
af, I now save the a register in ixh. But then I can't debug in the
flash debugger..

/Jens





References: