The assembler temporary register, $at
(which is also $1
.)
The lw
pseudoinstruction
copies a word of data from memory into a register
seemingly in one step:
lw d,exp # Load register $d with the value at # address exp. exp can be any # of several expression types # that evaluate to an address # (pseudoinstruction)
Here is a possible translation the pseudoinstruction
lw
.
Say that the symbol
data
stands for the address 0x10000004
lw $t0,data == lui $1,0x1000 lw $8,4($1)
The extended assembler and its pseudoinstructions makes it look like you are programming a pseudocomputer—a computer system that is richer in features and more convenient to program than the actual hardware. (Often this is called a "virtual computer"; but to avoid confusion I'll say that pseudoinstructions run on the pseudocomputer.) This idea of implementing a virtual machine on top of another machine (which may also be virtual) is very important in computer science.
The pseudocomputer built on top of the hardware is a layer of abstraction. When you write programs using the extended assembler and its pseudoinstructions you think in terms of the pseudocomputer and its capabilities. You can pretend that the pseudocomputer will directly execute your program.