Example 3-4

advertisement
Example 3-4
.text
.global _start
_start:
movia r2,DATA
A:
ldw
B:
???
C:
stw
r3,0(r2)
r3,4(r2)
br .
.org 0x20
.data
DATA: .word
.word
.end
0x12345678
0xffffffff
Figure 1.
Current register values
Code 1. Code for memory shown in Figure 2.
Figure 2. Memory snapshot of program above.
Using Figure 1, Figure 2 and Code 1 above complete the following questions (show all results in hex).
1.
What are the machine language instructions at labels A and C?
A:
10C00017
C:
10c00115
2. What changes as a result of the instruction at label A?
What is the new value?
3.
4.
A=
8
B=
12
C=
16
What is the assembly language instruction at label B? (show work on separate page)
r3,r3,r0
What changes as a result of the instruction at label C?
What was previous value?
3-14
0x12345678
What are the values of labels A, B and C?
nor
5.
r3
0xffffffff
memory (address 0x24)
What is the new value? 0xedcba987
ECE 330 Microprocessors Course Reference
Fall 2010
Download