‹ back to Computer Architecture

NotesComputer Architecture · 14 November 2015

Addressing Modes

In Last Lecture we discussed format of instructions. We went through a example of microinstruction for

ADD X,Y

· Where X was in register

· And Y was in memory

1. How ever there can be different modes to address the data . So this takes to a new topic of Addressing modes.

2. Addressing modes help us to realize the data in particular manner s

Register Mode

· The register its self hold the data .

· Means Data is already available in register

Register Direct Mode

· The Address is hold by register , and data is somewhere in memory

· And bus activity is initiated for fetching data

mov ax, cs:[1234h]

Indirect Addressing

· In this case the data is referred indirectly

· This is also called Deffered Mode

In this mode, the register contents addresses to another address which points to the operand

MOV A, @R0

Here the value inside R0 is considered as an address, which holds the data to be transferred to accumulator.

Can you answer the following

Index Mode

· X :INDEX

· This X is to be added to some address register (Base Register) to calculate effective address

· R+X=EA (Effective Address )

Syntax

Index Deferred Mode

· In this mode the displacement does not point towards to effective address, but to another address

· R+X=Address of another address

Auto Increment Mode

· In Direct addressing the register hold the address , similarly in auto increment Mode , the register does hold address but after , the address is used to bring data, the register contents are automatically incremented

LOAD (Rauto)‏+, Ri.

Auto decrement Mode

· Its similar to Auto increment mode , how ever the effective address is decremented

LOAD (Rauto)‏-, Ri.

Immediate Mode

· Instruction mode is a mode , where the address is available in instruction (memory location ) instead of a register

Relative Addressing

· In relative addressing , the Effective address is achieved by increment of decrement of current address. Previously we had different modes for these purposes

We started this lecture with a example , and we discussed the instruction format . Now we can further elaborate the instruction format. And we can now have a look at operand field

Instruction Format

Hence the operands can be addressed using any of the above mentioned addressing modes . The mode for source and register and destination register can be same or different , depending on the processor that which combination does it allow

Example 1 : Register Mode

Lets say the data for both source and destination are in register, hence register mode would have been used. Now lets say the mode is represented by some predefined random code Z. So now the instruction format for the following example will be something like this

ADD X,Y

Hence

This instruction will be some thing like this

First published on fatsup.wordpress.com ↗