Sunday, February 28, 2016

8051 Addressing Modes

Addressing Modes in 8051

  • Instructions operate on data
  • Data can be the value itself or in CPU register or in internal memory or in external memory
  • Addressing mode refers to how you are accessing the data
  • Addressing modes are in integral part of each computer’s instruction set
  • There are 8 addressing mode determines how the operand byte is selected: Register, Direct, Indirect, Immediate, Relative, Absolute, Long, Indexed
  • Register: Data is in Registers
  • Direct: Data is in on-chip RAM
  • Indirect: Data is in memory but its location is computed during run time
  • Immediate: Data is a value which is stored immediately next to opcode in memory
  • Relative: Data is a relative address (8-bits) to which the program control has to be transferred
  • Absolute: Data is an absolute address (11-bits) to which the program control has to be transferred
  • Long: Data is an address (16-bits) location where the program branches
  • Indexed: Data, elements of look-up table entries, located in the program ROM space of the 8051
  • Addressing ModesInstruction
    RegisterMOV A, B
    DirectMOV 30H, A
    IndirectADD A, @R0
    ImmediateADD A,#80H
    RelativeSJMP +127/-128 of PC
    AbsoluteAJMP within 2K
    LongLJMP FAR
    IndexedMOVC A,@A+PC

Related topics:
8051 Register Addressing Mode   |   8051 Direct Addressing Mode   |   8051 Indirect Addressing Mode   |   8051 Immediate Addressing Mode   |   8051 Relative Addressing Mode   |   8051 Absolute Addressing Mode   |   8051 Long Addressing Mode   |   8051 Indexed Addressing Mode   |   8051 External Addressing Mode

List of topics: 8051

No comments:

Post a Comment