Sakrac / x65

6502 Macro Assembler in a single c++ file using the struse single file text parsing library. Supports most syntaxes.
MIT License
38 stars 7 forks source link

PEI Indirect #11

Open dwsJason opened 4 years ago

dwsJason commented 4 years ago

I think maybe PEI is another confusing opcode.

When you do a PEI $00, the values in the direct page, at location $00, and $01 are pushed onto the stack. The documentation refers to PEI as being indirect, but that is only in comparison to PEA, which is clearly immediate.

PEI ($00), implies, that it will fetch the value from the memory location that address $00, and $01 are pointing at. There is no such functionality. This is not how PEI works, and at least in Merlin, ORCA, and SNASM assemblers, you PEI is implemented with a single Direct page address, no parentheses.

Sakrac commented 4 years ago

makes sense, I've changed it to be direct!