8051 Addressing Modes | Addressing modes of 8051 Microcontroller
Addressing Modes :- The CPU can access data in a register or in memory or be provided as an immediate value. These various ways of accessing data are called addressing modes. The 8051 provides a total of five distinct addressing modes. They are as follows:- 1) Immediate addressing modes. 2) Register addressing modes. 3) Direct addressing modes. 4) Register indirect - addressing mode. 5) Indexed addressing mode. Let us study different modes with selective examples:- 1) Immediate Addressing mode:- In This addressing mode, the source operated is a constant i.e. immediate data. Note that the immediate data must be preceded by the pound sign"#". Example:- MOV A, # 82H ; load 82H into A MOV R4, # 100 ; load the decimal value 100 in to R4 MOV B, # 40H ; l