I have a byte-sized number in register AL (8 bits), in 32-bit x86.
I need to exchange between bit 1 (the second from right) and bit 4 (the fifth from right) of the number in register AL.
For example
00010000B input
00000010B output
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may try this:
AL register contains the result. Also you may need data stored in register BX. If you do then prepend solution with
end append to the end