Direct Page register when using dp addressing modes

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Direct Page register when using dp addressing modes
by on (#189019)
This might be a stupid question-- but I am trying to write an 65816 emulator and at the moment I have a few doubts on this: should the direct page register be modified when operating in any sort of direct page addressing mode? Say for instance we have:

Code:
AND ($10, X)


The direct page register is something arbitrary like $01 right now... When after forming the indirect address, should the direct page register be modified to be the offset after the operation? Or does it stay the same?

Thanks!
Re: Direct Page register when using dp addressing modes
by on (#189020)
The only instructions that change the D register are TAD=TCD and PLD. Anything else is equivalent to a temporary copy.
Re: Direct Page register when using dp addressing modes
by on (#189021)
Thank you sir!!! :D