Quote:
I can change +n to ,n in the source and update the archive when you release bass with this change, no problem.
Appreciate the flexibility :D
Here's the updated version:
Code:
http://byuu.org/files/bass_v05.tar.bz2
Changes:
+n -> ,n
x,y -> x=y (to prevent ambiguity with ,n indexing and to clarify operator order)
addr.bit -> addr:bit
sti -> stc, str (c = carry, r = RAM)
ldi -> ldc, ldr
ori -> orc, orr
not -> cmc (complement carry)
cbn, dbn -> bne, bnz
bnz sucks, so I was thinking about maybe bne y-=target and bne $00-=target; to match the lda (x)+ style. Not sure yet.
If you have any suggestions, I'm open to change. The table file is in bass/arch/table/snes-smp.arch; so feel free to experiment if you like.
As such, I can't guarantee this instruction set is 100% finalized until I have some peer review. If you'd rather wait for it to be settled instead of aiming for a moving target, I completely understand.
EDIT: okay, made these changes.
bnz *08=*08 -> bne --*08=*08
bnz y=*08 -> bne --y=*08
lda (x)+ -> lda (x++)
sta (x)+ -> sta (x++)
Prefix/postfix matches the actual opcode behavior.
Quote:
I had known for years that inside every SPC700 was a 6502 struggling to get out, and I was just waiting for someone to open the gate.
Indeed, the "official" instruction set for the SPC700 was just painfully bad. The architecture is very much like a 6502, right down to the addressing modes [eg (dp,x) and (dp),y ]. It just extends things and adds a few curve-balls that make a direct mapping difficult (multiple argument instructions, mostly.)
Stupidly, 6502 (and as a result, 65816) use addr,x instead of addr+x, which is a major problem for the SPC700's multiple arguments. I figure that it'd be an infinitely more difficult battle to get 6502/65816 users to start using lda $2000+x, so I had to change the multi-argument syntax for the SPC700 to =, eg and $08=#$20 ($08 &= #$20)
(Sorry for off-topic comment, let's split this thread [including the second-half of this comment] if discussion is to continue, please.)