This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/MSP430F5529: I couldn't find a htobe32() function...

Part Number: MSP430F5529

Tool/software: TI C/C++ Compiler

...or similar function, so I wrote my own.

Does it actually exist and I just missed finding it?

It's my first crack at MSP430 asm. I'm sure there are things I'm not doing correctly, but I don't know what I don't know. Any suggestions for improving the code?

...Stu

/*
 * Assembly level utilities
 *
 */

extern unsigned long __swap_long(unsigned long x);
;
; Assembly level utilities
;

        .global __swap_long

__swap_long:
        swpb    r12
        swpb    r13
        xor.w   r12,r13
        xor.w   r13,r12
        xor.w   r12,r13
        reta