Addressing in the Memory


Posted on April 15, 2013 by GuruKPO

Each instruction needs data on which it has to perform the specified operation. The data may be in the accumulator, GPR (general purpose registers) or in some specified memory location. The techniques of specifying the address of the data are known as addressing modes. The important addressing modes are as follows:

  1. Direct Addressing

  2. Register Addressing

  3. Register Indirect Addressing

  4. Immediate Addressing

  5. Relation Addressing

  1. Direct Addressing: In this, the address of the data is specified within the instruction itself. Example of direct addressing is :

    1. STA 2500H: store the contents of accumulator in the memory location 2500H.

  2. Register Addressing: In register addressing, the operands are located in the general purpose registers. In other words the contents of the register are the operands. Therefore only this name of the register is to be specified in the instruction. E.g. of register addressing are :

    1. MOV A, B: Transfer the contents of register B to register A.

  3. Register Indirect Addressing: In this, the address of the operand is given directly. The contents of a register or a registers pairs are the address of the operand.Example : LX1 H, 2400H–> load H-L pair with 2400 H.

    1. MOV A, M: Move the contents of the memory location whose address is in H-L pair to the accumulator.

  4. Immediate addressing: In this the operand in given in the instruction itself. E.g.

    1. MVI A, 06: Move 06 to accumulator.

  5. Relation Addressing: In this a signed displacement is added to the current value of the program counter to form the effective address. This is also known as PC relative addressing.


你可能感兴趣的:(Addressing in the Memory)