[Solved] Given BX. Get it Mirrored and put in CX. How to do this? [closed]


A pure 8086 assembly solution is this:

mov bx, 1234h ; bx = 1234h === input
mov dx, bx    ; dx = 1234h
shr bx, 8     ; bx = 0012h
shl dx, 8     ; dx = 3400h
mov ax, bx    ; ax = 0012h
mov cx, dx    ; cx = 3400h
shr bx, 4     ; bx = 0001h
shl ax, 4     ; ax = 0120h
shr cx, 4     ; cx = 0340h
shl dx, 4     ; dx = 4000h
and ax, 00F0h ; ax = 0020h
and cx, 0F00h ; cx = 0300h
or  ax, bx    ; ax = 0021h
or  cx, dx    ; cx = 4300h
or  ax, cx    ; ax = 4321h === output

1

solved Given BX. Get it Mirrored and put in CX. How to do this? [closed]