Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We learned 64-bit logical shift left in the class. By using a similar approach, write an assembly program that rotates an unsigned 64-bit data
We learned 64-bit logical shift left in the class. By using a similar approach, write an assembly program that rotates an unsigned 64-bit data to the right (ROR on 64-bit input). Assume that the lower word and upper word of the 64-bit input are in R0 and R1, respectively. Also assume that the rotation amount is given via R2 and R2 is guaranteed to be less than 32 (no need to compare R2 with 32). Solve this problem with pen and paper. You don't need to run and debug the code with Keil tool or submit the source code separately. Just show the code that is similar to the code on page 23 of lecture slide 17. Write an ARM assembly language program that counts the number of 1's for any value in RO. The program must assemble/compile in KEIL and must be able to run in the KEIL simulator. Generally, RO may contain any value, but for purpose of this exercise, you may move 0x2345ABCD into RO. The number in RO does not need be preserved. You may use any other registers as you need. The result, total count of 1's in RO, should be in R1 when the program ends." UHCL: Unwala CENG 3371Microcontroller Programming Spring 2017 Copy the template below to your assembly file AREA Lab_08_YourFirstName_YourLastName, CODE, READONLY EXPORT __main _____main LDR RO,=0x2345ABCD; This is how you assign large value to RO.MOV will NOT work! stop B stop END Step 3: Change YourFirstName to your first name. Change YourLastName to your last name. Step 4: You are allowed to use ONLY the instructions below: 1 LDR[*] 2 MOV[*] 3. B[*]- ADC[*]. 4. 5. LSR[*]
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