Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

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

$
0
0

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


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>