lucien assaillit wrote:
[discussion about the assembler/disassebler CGIs on mspgcc.sf.net]
MSP430 Disassembler :
*Input* : 0x10E2
actually that's an illegal instruction. swpb can only be used with
register or memory locations and not immediate values.
*Output* : swpb.b #4 (1 cycles, 1 words)
*Mine* : swpb @SR
Witch it's good ????
both are the same... (well, mine is correct ;-)
R2 which is SR, is also used as CG1. it is used as constant generator in
immediate or relative addressing modes. (it is only used as status
register for direct register access). the immediate value 4 is
implemeted that way.
> Texas's doc is too light.
actually, that is in the docs. OK the constant register stuff and the
instruction set, cycles etc. is spread into two or three chapters in
slaa049, but it is there.
is there a reason to reimplemet a disassembler? you could use
msp430-objdump or my python impl. and i'm sure there are even more
disassemblers for the msp430
chris