I'm working on an assignment where I have to reverse an array (from bigEndian BYTE 12h,34h,56h,78h to littleEndian WORD ?)
I have an idea of what I want to do, but how exactly do I assign array elements to littleEndian WORD ? ? I know it probably involves looping? Any guidance at all would be helpful... I'm not expecting to be spoon-fed the answer.

it does involve a loop. I'd call anything else bad coding.

why don't you draw yourself a table with the actions you'd do when having to solve it by hand? this is often (and definately in this case) a good start for an algorythm:

Moving a byte into a register, then using AND to zero the bits from 0 to 7 and shift it (reverse it). You can then store it in the output. I don't know whether the zero-byte is heading or tailing so you have to try out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.