Sunday, February 28, 2016

8051 Direct Addressing Mode

Direct Addressing Mode

8051 Direct and Indirect Addressing Mode

  • This mode allows you to specify the operand by giving its actual memory address or by giving its abbreviated name.
  • Direct addressing can access any on-chip variable or hardware register
  • Used for accessing SFR
  • SFR can be accessed by their name or by their address
  • Operand address should be known at assemble-time
  • The value to be stored in memory is obtained by directly retrieving it from another memory location
  • In the 8051, only direct addressing mode is allowed for accessing the stack. Pushing R3 of bank 0 is coded as “PUSH 03″. “POP 04″ will pop the top of the stack into R4 of bank 0.
  • Example:
  • MOV A, P3
    The above instruction transfer the content of P3 to accumulator
    MOV A, 20H
    The above instruction transfer the content of RAM location 20H to accumulator

8051 Direct Addressing Mode Example

Related topics:
8051 Addressing Modes   |   8051 Register 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