Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN ARM Assembly Language 2.1 Phase 1 Write a program that supports the following features. 1. Create a subroutine that uses R0 as the input

IN ARM Assembly Language

2.1

Phase 1

Write a program that supports the following features.

1. Create a subroutine that uses R0 as the input and R1 as the register that will contain the return information (the answer). The function of the subroutine is to determine if bit 11 is a 1 or a 0. R1 will contain the answer (1 for true and 0 for false).

2. Create a subroutine that uses R0 as the input. This subroutine will be responsible for setting bit 3 and clearing bit 7. All other bits shall be left undisturbed.

3. Create a subroutine that uses R0 as the input register and R1 as the register that will contain the return information (the answer). The function of the subroutine shall be to count the number of 1s that are resident in R0 (the input). Count the 1s and put the answer in R1. 2.2 Phase 2 Write a subroutine that meets the following requirements: 1. rot_left_right that takes a general purpose register as an input. 2. Rotates Left or Right the lower 16 bits(without touching the upper 16 bits). 3. The amount to rotate is given in a second input register, bits 3:0.

4. The direction to rotate is given in bit 5 of this second input register. 1 means rotate left, 0 means rotate right.

5. The result shall be returned in a register of your choice and the original contents of the input register shall be unchanged by the function.

6. For example, if you call your function with an input register =0x12345678 and the rotate amount in the second register =1 in bits 3:0 and the bit 5 = 1, the result in the original register will be rotated left by 1 bit: input register is =0x1234ACF0. If the user provides a rotate value of 0, then the function should return the original integer unchanged.

IN ARM Assembly Language

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions