2. • Every instruction of a program has to operate on a data. The method of specifying the data to be operated by the instruction is called
Addressing.
• An addressing mode in a microprocessor defines the way in which the operand (data) is specified for an instruction. It determines how
the data is accessed from memory or registers and how it is operated upon
• The various addressing modes allow for flexibility in how instructions interact with data, making it possible to optimize performance,
minimize memory usage, and reduce code complexity.
• In 8085 Microprocessor, there are 5 types of Addressing Modes
1. Immediate Addressing Mode
2. Direct Addressing Mode
3. Register Indirect Addressing Mode
4. Implied/Implicit Addressing Mode
5. Register Addressing Mode
ADDRESSING MODES
5. • In immediate addressing mode, the data is specified in the instruction itself. The data will be a part of the program instruction.
• Specifically, the source operand is always data.
• If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the instruction will be of 4 bytes.
• Examples:
• MVI B 45H (move the data 45H immediately to register B)
• LXI H 3050H (load the H-L pair with the operand 3050H immediately)
• JMP address (jump to the operand address immediately)
• MVI B, 3EH - Move the data 3EH given in the instruction to B register
Immediate Addressing Mode
6. Direct Addressing Mode
• In this addressing mode, the program instructions and data can be stored in different memory
• The data to be operated is available inside a memory location and that memory location is directly specified as an operand.
• Hence, the operand is directly available in the instruction itself (the address of the data is specified in the instruction).
• Examples:
• LDA 2050 (load the contents of memory location into accumulator A)
• LHLD address (load contents of 16-bit memory location into H-L register pair)
• IN 35 (read the data from port whose address is 35)
• LDA 1050H - Load the data available in memory location 1050H in to accumulator
7. • In register indirect addressing mode, the instruction specifies the name of the register in which the address of the data is available.
• Here the data (to be operated) is available inside a memory and the address (memory location) is indirectly specified by a register pair.
• Examples:
• MOV A, M (move the contents of the memory location pointed by the H-L pair to the accumulator)
• LDAX B (move contents of B-C register to the accumulator)
• STAX B (store accumulator contents in memory pointed by register pair B-C)
Register Indirect Addressing Mode
8. Implied/Implicit Addressing Mode
• In implied/implicit addressing mode, the operand is hidden and the data to be operated is available in the instruction itself.
• Examples:
• CMA (finds and stores the 1’s complement of the contents of accumulator A in A)
• RRC (rotate accumulator A right by one bit)
• RLC (rotate accumulator A left by one bit)
9. • In Register Addressing Mode, the data to be operated is available inside the register(s) and register(s) is(are) operands.
• Therefore, the operation is performed within various registers of the microprocessor.
• The register addressing mode is used for instructions that manipulate the contents of the registers.
• Examples:
• MOV A, B (move the contents of register B to register A)
• ADD B (add the data in register B to the accumulator and store the result in accumulator)
• INR A (increment the contents of register A by one)
Register Addressing Mode
10. • A binary command that is used to perform a function in the microprocessor over provided data is known as instruction.
• A set of instructions is known as an instruction set that decides the microprocessor function.
• Every instruction includes two parts like Opcode & the Operand. Opcode is used to specify the function to be executed & operand gives
the data to be functioned on.
• The programmer writes a program in assembly language using these instructions.
• The 8085-instruction set can be classified into the following five functional headings
INSTRUCTION SET
11. • These instructions move data between registers, or between memory and registers.
• These instructions copy data from source to destination.
• While copying, the contents of source are not modified/altered. Hence the data transfer is copying operation.
Data Transfer Instructions
14. • These instructions perform arithmetic operations such as addition, subtraction, increment, and decrement
• The flag conditions are altered after execution of an instruction in this group.
Arithmetic Instructions
17. • These instructions perform various logical operations with the contents of the accumulator.
• Logical operations like AND, OR, EXCLUSIVE-OR, complement, compare and rotate instructions are grouped under this heading. The
flag conditions are altered after execution of an instruction in this group
Logical Instructions
20. • This group of instructions alters the sequence of program execution either conditionally or unconditionally.
• The instructions that are used to transfer the program control from one memory location to another memory location are grouped under
this heading.
Branching Instructions
• These instructions control machine functions such as Halt, Interrupt, or do nothing
Stack, I/O, and Machine Control Instructions
21. These instructions control machine functions such as Halt, Interrupt, or do nothing
Stack, I/O, and Machine Control Instructions