Docsity

Assembly Language: Loading Data from Memory, Study notes of Programming Languages

Partial preview of the text

Download Assembly Language: Loading Data from Memory and more Study notes Programming Languages in PDF only on Docsity!

CPSC 3121 Summer 2008

Review Notes July 10

LA R2,SAVEAREA

Loads the address SAVEAREA into register 2 L R2,SAVEAREA Loads the four byte number at address SAVEAREA into R2. This is the contents of the address, not the address. The L command is a “Load Fullword”, so it gets 32 bits or 4 bytes. The bytes loaded are from addresses SAVEAREA SAVEAREA+ SAVEAREA+ SAVEAREA+

LH R2,SAVEAREA

Loads the two byte number at address SAVEAREA into R2. This is the contents of the address, not the address. The L command is a “Load Halfword”, so it gets 16 bits or 2 bytes. The bytes loaded are from addresses SAVEAREA SAVEAREA+ Think of an array declared as Type Array[Length] The assembler address is similar to the index of the array The assembler contents is similar to the contents of the array entry.