Question: 2. USE Arc tools 2.12 Arc ,Arc Assembly Arc simulator 1. Please add comments for each line. a. Explain what the program intends to do.

2. USE Arc tools 2.12

Arc ,Arc Assembly Arc simulator

1. Please add comments for each line.

a. Explain what the program intends to do.

b. Assemble the code by hand.

2. Run the program through the simulator

3. What is the content of %r1 after this program is executed?

! Program 4

.begin

.org

2048

main:

ld

[a], %r1

ld

[b], %r2

ld

[c], %r3

top:

subcc

%r4, 3, %r0

be

done

subcc

%r5, %r6, %r0

bneg

else

orcc

%r1, %r2, %r1

addcc

%r6, 1, %r6

ba

bottom

else:

andcc

%r1, %r3, %r1

addcc

%r5, 1, %r5

bottom:

addcc

%r4, 1, %r4

ba

top

done:

st

%r3, [y]

jmpl

%r15+4, %r0

.org

3000

a:

0xa0

b:

0x33

c:

0x52

y:

2

.end

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!