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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!