The operand or the data item may reside in internal registers, RAM, may come from input device or can be assigned as immediate as part of an instruction. For accessing an operand there is a well-defined way or method. Therefore, we can define addressing modes as the methods of accessing the data byte(operands). 8085 has the following addressing modes :
a. Immediate Addressing Mode
b. Implicit or Implied Addressing Mode
c. Direct Register Addressing Mode
d. Direct Memory Addressing Mode
e. Indirect memory addressing mode
These modes are explained in the following paragraph
In this addressing mode the data byte is defined as part of the instruction. 8085 microprocessor supports an immediate to register or immediate to memory assignment, and use the instruction MVI for this purpose.
The general Syntax is : MVI Reg/Mem 8-bit Data
MVI A, 55h ; Transfers an immediate number 55h to Accumulator
MVI B, 55h ; Transfers an immediate number 55h to Register B
MVI M, 55h ; Transfers an immediate number 55h to Memory pointed by HL pair
ADI, SUI, ACI, SBI, ANI, XRI, ORI, CPI, LXI
This addressing mode does not specify any additional data, but the data is implied with the instruction, the data is referred by the name of the instruction. As an example CLA stands for clear the accumulator. Here no additional reference is made to locate the data. Instruction of this type is 1-byte instructions.
CMA (Complement the Accumulator)
RAL (Rotate Accumulator left through carry)
RAR (Rotate accumulator right through carry)
XCHG (Exchange the content of H-L register pair with D-E register pair)
RLC (Rotate Left)
RRC (Rotate Right)
CMC (Complement Carry)
STC (Set Carry)
RIM (Read Interrupt Mask)
SIM (Set Interrupt mask)
This addressing mode is used t transfer the data item from source register to a destination register. The source register must be loaded with data before using this instruction. This addressing mode uses MOV instruction for transferring data among registers.
MOV Rd, Rs
Here Rs is source register from the general purpose registers and Rd is the destination register from the general purpose registers.
MOV A, B ; Transfers 8-bit data from register B to accumulator
MOV D, E ; Transfers 8-bit data from register E to register D
DAD Rp ( Add Rp with HL)
The direct addressing mode refers to the data from / to the memory for transfer to or from the registers. Use of this addressing mode require setting the memory pointer. 8085 uses MOV instruction for this purpose.
OPCODE Rd, Addr
OPCODE Addr, Rs
LHLD Addr ; Loads HL pair with
In this addressing mode the data is accessed indirectly from the memory. The address from where the data is to be fetched is to be found at other place. 8085 uses instructions such as LDAX, STAX, LHLD, SHLD for indirect addressing. These are explained below:
LDAX [Rp] ; Will load accumulator with data from address given in register pair Rp(BC, DE, HL)
STAX [Rp] ; Will store data given in accumulator in memory at address given in register pair Rp.
MOV A, M ; Data Transfer from the memory whose address is pointed by HL pair
MOV M, A