0

When I do this:

la $a1, 9($t1)

the code works, but when I do this:

marker: .word 9
la $a1, marker($t1)

The code doesn't work.... I don't understand why....?

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by bethesda
0

When I do this:

la $a1, 9($t1)

the code works, but when I do this:

marker: .word 9
la $a1, marker($t1)

The code doesn't work.... I don't understand why....?

I'm not familiar with the above syntax so this is a guess....when you place 9 into the label marker you place into memory so the second set of instructions requires a memory call while the first, 9 can be made into part of the instruction or immediate so no memory call to retrieve it...Like I said this is a guess because I'm not familiar with this syntax....

0

I'm not familiar with the above syntax so this is a guess....when you place 9 into the label marker you place into memory so the second set of instructions requires a memory call while the first, 9 can be made into part of the instruction or immediate so no memory call to retrieve it...Like I said this is a guess because I'm not familiar with this syntax....

I want to access to access the value in $t1 in a loop, that is, access 0($t1) then 9($t1), then 18($t1)...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.