0

Let's say have a variable var stored at address 0x00001000 and the value of it is 10.

If i did la $t2, var

Would $t2 contain the address of var or the value of var. I really want to say the address, considering la stands for load address, but everywhere I've looked the examples don't make that explicit connection.

Also I know this is broken down to lui ori in native instructions but how would it look exactly?

Matt
  • 22,721
  • 17
  • 71
  • 112
Richard
  • 5,840
  • 36
  • 123
  • 208

1 Answers1

0

$t2 would contain the address var, not the content (to get the content, you need lw or something alike).

la is indeed a pseudoinstruction. For more information about how this is used, have a look at this question and answer:

MIPS: The Equivalent of la instruction without using pseudo codes?

Community
  • 1
  • 1
Patrik
  • 2,695
  • 1
  • 21
  • 36