Question: Below is an ARC assembly program to compute X which is a function of A and B. .begin .org 2052 prog1:ld [Bil],%r9 pt1: ld [A],

Below is an ARC assembly program to compute X which is a function of A and B.

.begin

.org 2052

prog1:ld [Bil],%r9

pt1: ld [A], %r1

ld [B], %r2

orncc %r1, %r1, %r3

orncc %r2, %r2, %r4

andcc %r1, %r3, %r5

andcc %r3, %r2, %r6

orcc %r5, %r6, %r7

st %r7, [X]

addcc %r9, -1, %r9

be pt1

ba pt1

pt2: halt

A: 3

B: 4

X: 0

Bil: 1

.end

a) Determine the content of disp22 in ba pt1

b) Determine the content of simm13 in st %r7, [X]

c) Write the expression for X.

d) Determine TWO(2) entries in the symbol table for the program.

Below is an ARC assembly program to compute X which is a

Sethi Format 0 0 rd op2 im m 22 Branch Format 0 0 0 cond op 2 dis p22 Call Format 0 1 dis p 30 Arithmetic Format rs 2 1 0 1 0 rd rd op 3 op 3 1 0 0 0 0 1 rs 1 rs 1 o o o o o sim m 13 Memory 1 1 rd rd rs 2 op 3 op 3 rs 1 rs 1 1 0 0 0 0 0 0 0 0 0 1 sim m 13 Format 1 1 op 2 1 0 0 0 O Inst branch sethi cond 0 0 0 1 1 0 1 0 1 op3 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 0 0.0 Inst Id st addoc andec orce ornco srl impl branch be bcs bneg bvs ba 0 1 1 0 0 1 1 1 1 0 0 0 o Sethi Format 0 0 rd op2 im m 22 Branch Format 0 0 0 cond op 2 dis p22 Call Format 0 1 dis p 30 Arithmetic Format rs 2 1 0 1 0 rd rd op 3 op 3 1 0 0 0 0 1 rs 1 rs 1 o o o o o sim m 13 Memory 1 1 rd rd rs 2 op 3 op 3 rs 1 rs 1 1 0 0 0 0 0 0 0 0 0 1 sim m 13 Format 1 1 op 2 1 0 0 0 O Inst branch sethi cond 0 0 0 1 1 0 1 0 1 op3 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 0 0.0 Inst Id st addoc andec orce ornco srl impl branch be bcs bneg bvs ba 0 1 1 0 0 1 1 1 1 0 0 0 o

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!