The MSP430 as a nice example of a simple and clean instruction set, I used it in my classes to show how to create a disassembler. To test the disassembler, I wrote a some assembler code to generate a binary file, and found some strange issues:
swpb.b r5 ; Accepted without warning by the assembler, and even the B/W bit is set accordingly, even though ; in most instruction set tables that bit shown to be 0 and .b doesn't make sense. And what does the hardware do? sxt.b r6 ; Same problem rrc 0(r0) ; Generates: Error: rrc: attempt to rotate the PC register ; though I understand that 0(r0) actually points to the word following the opcode, not the register ; so this would be akin to self-modifying code, but: rrc 2(r0) ; is accepted without issue, which is only marginally better
Am I wrong here?