ENEE350 Computer Organization Lecture-6 Return to lecture notes

Address Modes Commonly Used in Commercial Processor Architectures: Operands in memory can be fetched and stored (and in general operated on) using a number of addressing modes. The most common addressing modes are

Immediate

Example: Load immediate (operand is in the instruction code):

LDI R0,1; (1 is loaded into R0)

Relative

Example: Load relative (operand is in location PC + address) where the address is a 2's complement number-

LDR R0,100; The operand in location PC + 100 is loaded into R0.

Direct

Example: Load direct (operand is in address)-

LDD R0,100; The operand in location 100 is loaded into R0.

Indirect

Example: Load indirect (operand is in address in address)-

LDT R0,100; The operand in location whose address is in 100 is loaded into R0.

Indexed

Example: Load indexed (operand is in the location whose address is in the index register)-

LDX R0,100,2; The operand in location (IX)+100 is loaded into R0; IX is incremented by 2 after the load.

Register

Example: Load register (operand is in the location whose address is in a register)-

LDG R0,R1; The operand in location (R1) is loaded into R0.

Autoincrement

Example: Load register+ (operand is in the location whose address is in a register)-

LD+ R0,R1; The operand in location (R1) is loaded into R0. R1 is incremented after the load

Autodecrement

Example: Load register- (operand is in the location whose address is in a register)-

LD+ R0,R1; R1 is decremented before the load and the operand in location (R1) is loaded into R0.


      

Return to lecture notes