As before assume that the acutal main program code starts at 0x00400020
and that the array A in the data segment starts at 0x10010000.
Line Number | Location Counter | Assembled Code | MIPS Source |
1 | .global main | ||
2 | main: | ||
3 | addi $s0, $0, -2 | ||
4 | addi $s1, $s0, 4 | ||
5 | add $s2, $s1, $s1 | ||
6 | addi $s3, $0, 4 | ||
7 | beq $s2, $s3, later | ||
8 | j allover | ||
9 | later: | ||
10 |
|
la $t0, A | |
11 | lw $s1, 12($t0) | ||
12 | add $s1, $s3, $s1 | ||
13 | sw $s1, 0($t0) | ||
14 | allover: | ||
15 | jr $ra | ||
16 | .data | ||
17 | A: .word 1,2,3,4,5,6,7,8,9 |
Symbol Table
Numeber | Symbol | Value | Segment | Global |
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 |
Relocation Table
Number | Location | Type | Segment | Dependence |
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 |