[Avrora] MSP430 / TelosB support for Avrora
urs.hunkeler at epfl.ch
Tue Jan 18 11:40:07 PST 2011
Thanks for your answer! Yes, I looked into the slau049f.pdf document,
that's how I figured that the carry bit's meaning for subtractions must
be reversed. I hadn't seen the note about the borrow, though, and even
if I had I wouldn't have understood it. I'm not familiar with "borrow",
but I'll look into it. I'll have to figure out whether additions with
negative numbers are affected...
I haven't really done much with the instruction set (other than
debugging), it was all already there. My contributions are mostly with
the internal devices (timer, clock module, watchdog, I/O pins) and MCU
functionality beyond simple instruction processing (interrupt handling,
On 1/18/11 7:57 PM, Roy Shea wrote:
> Hello Urs,
> Great job getting the simulation for blink up and running on the MSP430!
>> I think the MSP430 handles the carry bit differently from other
>> architectures (at least for subtraction). I am still not sure how exactly it
>> works, but by inverting the meaning for subtractions (sub, subc and cmp
>> instructions) I got the simulation of the TinyOS Blink application to work.
> With regards to the carry bit, take a look at the instruction summary
> provided in the user guide for the subtraction operations:
> There's a note describing the fact that the borrow used to set the carry
> flag is treated as a .NOT so that:
> Borrow yes -> Carry 0
> Borrow no -> Carry 1
> Does that clear things up?
> Again, great job getting the MSP430 instruction set further along.
> Avrora mailing list
> Avrora at lists.ucla.edu
More information about the Avrora