Swapping positions (HC11)
问题 I'm just playing with my MC 68HC11 ; in C i can perform a simple byte swap by doing something like this: swapped = ((num>>24)&0xff) | // move byte 3 to byte 0 ((num<<8)&0xff0000) | // move byte 1 to byte 2 ((num>>8)&0xff00) | // move byte 2 to byte 1 ((num<<24)&0xff000000); // byte 0 to byte 3 But now i want to achieve something a little harder using assembly code: I created an ARRAY and added some values (using little endian logic). I want to read that ARRAY and swap all the values into big