Question
In assembly x86 Given an integer x and rotation r, perform a rotation of the 4 most significant nibbles of x, according to the value
In assembly x86
Given an integer x and rotation r, perform a rotation of the 4 most significant nibbles of x, according to the value of r. If r=1 rotate by 1 position, if r=2 rotate by 2 positions, and if r=3 rotate by 3 positions. The 2 least significant bytes always remain the same. We guarantee that r is going to have a valid value (1,2, or 3). Your return should be in EAX. Ex.: x = 0xABCDEF12, r = 1 (the 4 most significant nibbles are underlined) Output = 0xDABCEF12 Ex.: x = 0x1A2BAB00, r = 2 Output = 0x2B1AAB00 Ex.: x = 0x0123AAFF, r = 3 Output = 0x1230AAFF
In assembly x86
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started