The address of data[0]: 0x00605000. In fact, in ANSI C, the identifier for an array (in this case data) stands for the address of its first element. At run time this address will likely be in a base register.
You
may be thinking that there has got to be an easier way
to load a register from memory.
At the machine language level there is not.
However, the assembler has features that make it much easier
to write lw
and sw
instructions.
These are discussed in a later chapter.
Let us start on an example program.
The program is to
evaluate the polynomial
5x2 -12x + 97
.x
is located in memory.
Store the result at location
poly
in memory.
How many lw
instructions will be needed?
How many sw
instructions will be needed?