Closed russells closed 3 years ago
Sorry for the slow reply... GitHub didn't send me an email about this and I just happened to log in (for other reasons) and saw this here.
So + and | are two different operations and they are supported of course.. the problem is in the include file:
URXE0 equ 0x40 ; USART0: UART receive enable UTXE0 equ 0x40 ; USART0: UART transmit enable
Looks like the assembler is doing the right thing. Not sure where this include file came from... (yeah I can see I committed it)... not 100% sure what the correct values are.. looks like:
UTXE0 should be 0x80 URXE0 should be 0x40 USPIE0 should also be 0x40 for some reason.
I'm tempted to just delete this include file.
Apologies, I didn't think to check the include file. The error in there should have been obvious from the results of + and |.
I'll feed back any more that I find.
Nice work on this assembler, btw. I had been struggling with gnu as and ld for a while, and thought that there must be a cleaner way to make hex files. And there is! Thank you.
Thanks! That's exactly why I wrote it.. I couldn't find an assembler for MSP430 that I liked.
Definitely let me know if you find anything else or need something. I changed the include file for those 3 defines, but if those mistakes are in there I'm worried what else there is. I'm still tempted to delete it....
Hello,
I'm using recent naken_asm compiled from source.
I tried to assemble some msp430 code with literal values, and got some unexpected results.
Here's a demo:
Assembling this gives no errors. Disassembling it produces this:
I see that in
include/msp430/msp430x14x.inc
there are lines likeimplying this sort of thing isn't supported. But then in
samples/msp430/guitar_proc.asm
there'sIs this literal syntax (
A+B
orA|B
) supported? Should every line in my example program be assembled to the same opcodes and immediate data?Russell