I use this help when programming a 65816 simulator.
http://www.6502.org/tutorials/65c816opcodes.htmlIt is very helpful, but I have a problem understanding how the PEI instruction works.
Attachment:
File comment: ?
65816.jpg [ 66.55 KiB | Viewed 615 times ]
The thing is that there is no clear explanation of where the HIGH byte is taken from in the case of e=1 D=$FF00 for PEI $FF?
If the low byte comes from $FFFF, then the high byte comes from $0000 or maybe $10000?
Also, the author has obscured the issue with the "!" character. Besides, if the LOW byte is $00, adding an 8-bit value will never change the HIGH byte, which is logical.
Then why include it in the description at all?
And for example, if e=1 D=$0100 PEI $FF, Low byte is taken from $01FF and where will the High Byte be taken from?
$0200 or $0100 ?