Question: The following Simple Computer assembly program is stored in instruction memory beginning at address 0 x 0 0 . ldi r 3 , 7 shl

The following Simple Computer assembly program is stored in instruction memory beginning at address 0x00.
ldi r3,7
shl r3, r3
shl r3, r3
ld r4, r3
sub r5, r4, r4
brz r5,2
xor r4, r4, r4
inc r4,r4
The contents of the following Data Memory locations are known. The contents of any location not listed in the table below are unknown.
Data Memory Address Contents (in hex)
3000A
4 FFFF
70001
E 001C
1C FF00
1D 0006
Give the machine instruction in hex that will be placed in each of the following program memory locations.
Instruction Memory Address
Machine instruction (in hex)
0
[ Select ]
2
[ Select ]
5
[ Select ]
After the entire program is executed, what will the following registers contain? (Give your answers in hex.)
Register
Register contents (in hex)
R3
001C
R4
FF01
R5
0000
Immediately after execution of the brz r5,2 instruction, what value will be in the program counter?
0007

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 Accounting Questions!