▲ | tom_ 6 days ago | |
I'd say it's definitely weird for a standalone assembler. For standalone 6502 assemblers, some approximation of the standard MOS-type syntax has always been near-universal. Though you're quite correct about some of the advantages of doing it this way. (I say "near universal", because Acorn's MASM had a similar syntax. (See, e.g., https://github.com/stardot/AcornDmosBasic/blob/master/src/DB...) I don't remember ever seeing that described as anything other than an oddity.) And, also, there are probably assemblers smooshed into Forth or Lisp (or implemented with assembler macros for an assembler targeting some completely unrelated CPU) that work in a similar way, because you're limited by the pre-existing syntax rules. But that feels like a separate category | ||
▲ | kazinator 6 days ago | parent [-] | |
The standard 6502 assembly is already "weird" in that some operands are rolled into the opcode, but some are arguments. E.g. various register-register transfer combinations have dedicated mnemonics: TXA, TAX, etc. LDA (index),Y. has index and Y in the argument space, but the A operand is in the mnemonic. The comma doesn't separate operands but is a displacement operator. In other words, we really want LD A, (index) + y. Or LD A, (index + x). |