go to previous page   go to home page   go to next page

Answer:

What data is in the word starting at address 0x1000000C? 0x00000003

What is the address of the word containing 0x00000002? 0x10000008

Address and Contents of an Address

section of memory

The contents of a word of memory may be any 32-bit pattern. The address of a word of memory is also a 32-bit pattern. Both types of data fit into a 32-bit register.

Sometimes you want the contents of word of memory to be loaded into a register. For example, you may wish to load the value 0x00000002. This is done with the lw instruction. Look at the picture. The value you wish to load is located in memory at address 0x10000008.

lw    d,exp      #  Load register $d with the value at 
                 #  address "exp".  
                 #  "exp" is often a symbolic address.
                 #  (pseudoinstruction) 

Other times you want the address of a word in memory. For example, you may wish to load the address 0x10000008. This is done with the la instruction.

la   d,exp          #  load register $d with the address
                    #  described by the expression "exp".
                    #  "exp" is often a symbolic address.
                    #  (pseudoinstruction) 

QUESTION 13:

Have our previous programs put addresses in registers?