I've been using Anomie's spc700.txt that I got from romhacking.net (I would give a more direct link, but the site seems to be down now). Inside the doc it says:
This is the only part in the doc which makes any mention of how multiple operands are stored. And while this appears to be true for direct page->direct page instructions (MOV $xx, $xx and similar)... I just spent the last hour debugging my SPC emu only to find that it's NOT true for CBNE (which has the direct page address stored first)
I began looking at other docs to see if they address the issue, only to find that none of them (at least none of the ones I have) even touch on this subject.
So my question is... how are multiple operands REALLY stored? If CBNE contradicted Anomie's doc.. I suspect other instructions do too (DBNZ is suspect, as are maybe BBC/BBS)... but I don't want to have to pick and guess. Can anyone give me a definative answer?
Thanks
Quote:
Operands are encoded little endian, with multiple operands stored last to first. For example, "OP A, B" is stored in memory as "OP B A". Mnemonics are represented as "OP dest, src" where applicable.
This is the only part in the doc which makes any mention of how multiple operands are stored. And while this appears to be true for direct page->direct page instructions (MOV $xx, $xx and similar)... I just spent the last hour debugging my SPC emu only to find that it's NOT true for CBNE (which has the direct page address stored first)
I began looking at other docs to see if they address the issue, only to find that none of them (at least none of the ones I have) even touch on this subject.
So my question is... how are multiple operands REALLY stored? If CBNE contradicted Anomie's doc.. I suspect other instructions do too (DBNZ is suspect, as are maybe BBC/BBS)... but I don't want to have to pick and guess. Can anyone give me a definative answer?
Thanks