hi, i'm trying to figure out how to mirror a given a value.
for example: FF0A, i'd like to make it A0FF.

i thought of a code like shifting it left 8x but i find it brute forceish. is there a better way?

thanks

I don't see an elegant way of doing it.

mov ax, 9A47h
xchg al,ah           ;479Ah
rol ah, 4              ;749Ah
rol al, 4               ;74A9h

When you are bit flipping it doesn't have to look pretty, it only has to work.

i see. thanks so much for the help!

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.