Question
computer systems!! pls answer soon


2) Determine the content of memory location named RESULT after execution of each of the following codes: Program B TEXT TEXT
0 0
Add a comment Improve this question Transcribed image text
Answer #1

For program A:

LDR R1, =NUM

=> R1 = address of NUM

LDR R2, =N

=> R2 = address of N

LDR R2, [R2]

=> R2 = 6

MOV R0, #0

=> R0 = 0

LOOP: LDR R3 [R1], #4

=> R3 = [R1+4] = 0

CMP R3 #0

=> EQUAL

ADDPL R0, R0, #1

=> R0 = 32*R0 + 1 = 1

SUBS R2, R2, #1

=> R2 = 5

BNE LOOP

=> FALSE

STR R0, =RESULT

RESULT = 1

For program B:

LDR R0, A

=> R0 = 100

LDR R1, B

=> R1 = 50

MUL R0, R1, R0

=> R0 = 50*100 = 5000

LDR R1, C

=>R1 = 20

LDR R2, D

=> R2 = 10

MULA R0, R1, R2, R0

=> R0 = 20*10 + 5000 = 5200

STR R0, RESULT

=> RESULT = 52000

Add a comment
Know the answer?
Add Answer to:
computer systems!! pls answer soon 2) Determine the content of memory location named RESULT after execution of eac...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT