The document provides an overview of the instruction set and execution process of the 8085 microprocessor, detailing classifications based on functionality, length, and addressing modes. It outlines various types of instructions, including data transfer, arithmetic, logical, branching, and I/O operations, along with examples. Additionally, it explains the instruction execution cycle, machine cycles, and T-states involved in processing instructions.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views
lect 3 & 4 micro
The document provides an overview of the instruction set and execution process of the 8085 microprocessor, detailing classifications based on functionality, length, and addressing modes. It outlines various types of instructions, including data transfer, arithmetic, logical, branching, and I/O operations, along with examples. Additionally, it explains the instruction execution cycle, machine cycles, and T-states involved in processing instructions.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22
ET 8304 microprocessor and interfacing
MBEYA UNIVERSITY OF SCIENCE AN TECHNOLOGY
OCTOBER 2022
LECT 3 & 4 INSTRUCTION SET AND EXECUTION IN 8085 Outlines
• INSTRUCTION SET 8085
• Classification based on functionality • Classification based on instruction length: • Classification based on operand addressing Modes in Instructions • INSTRUCTION EXECUTION AND TIMING DIAGRAM: Instruction set • An instruction is a binary pattern designed inside a microprocessor to perform a specific function.
• Based on the design of the ALU and decoding unit, the
microprocessor manufacturer provides instruction set for every microprocessor. The instruction set consists of both machine code and mnemonics. • Microprocessor instructions can be classified based on the parameters such functionality, length and operand addressing. Classification based on functionality: • Data transfer operations: This group of instructions copies data from source to destination. The content of the source is not altered. • Arithmetic operations: Instructions of this group perform operations like addition, subtraction, increment & decrement. One of the data used in arithmetic operation is stored in accumulator and the result is also stored in accumulator. • Logical operations: Logical operations include AND, OR, EXOR, NOT. The operations like AND, OR and EXOR uses two operands, one is stored in accumulator and other can be any register or memory location. The result is stored in accumulator. NOT operation requires single operand, which is stored in accumulator. Cont.. • Branching operations: Instructions in this group can be used to transfer program sequence from one memory location to another either conditionally or unconditionally. • Machine control operations: Instruction in this group control execution of other instructions and control operations like interrupt, halt etc. Classification based on instruction length: • One-byte instructions: Instruction having one byte in machine code. Cont.. • Two-byte instructions: Instruction having two byte in machine code. Cont.. • Three-byte instructions: Instruction having three byte in machine code. Classification based on Addressing Modes in Instructions: • The process of specifying the data to be operated on by the instruction is called addressing. • The various formats for specifying operands are called addressing modes. The 8085 has the following five types of addressing: I. immediate addressing II. Memory direct addressing III. Register direct addressing IV. Indirect addressing V. Implicit addressing Immediate Addressing: • In this mode, the operand given in the instruction - a byte or word – transfers to the destination register or memory location. Ex: MVI A, 9AH The operand is a part of the instruction. The operand is stored in the register mentioned in the instruction. Memory Direct Addressing: • Memory direct addressing moves a byte or word between a memory location and register. The memory location address is given in the instruction. Ex: LDA 850FH This instruction is used to load the content of memory address 850FH in the accumulator. Register Direct Addressing • Register direct addressing transfer a copy of a byte or word from source register to destination register. Ex: MOV B, C It copies the content of register C to register B. Indirect Addressing: • Indirect addressing transfers a byte or word between a register and a memory location. Ex: MOV A, M
Here the data is in the memory location pointed to by the contents of
HL pair. The data is moved to the accumulator. Implicit Addressing • In this addressing mode the data itself specifies the data to be operated upon. Ex: CMA The instruction complements the content of the accumulator. No specific data or operand is mentioned in the instruction. 5 group of instructions in 8085 up • Data transfer instructions • Arithmetic instructions • Logical instructions • Branching instructions • I/O & machine control instructions DATA TRANSFER INSTRUCTION • MOV B,C MOV B, M • PUSH B or PUSH A • MVI B, 57 MVI M, 57 • POP H or POP A • LDA 2034 LDA XYZ • OUT 87 • LDAX LDAX B • IN 82 • LXI H, 2034 • LHLD 2040 • STA 4350 STA XYZ • STAX B • XCHG NONE (Hand L with D and E) Arithmetic Instructions: • ADD B OR ADD M • ADC B OR ADC M • ADI 45 • ACI 45 • DAD H • SUB B OR SUB M • SUBB B OR SUBB M • SUI 45 • SBI 45 • INCR B OR INR M • INX H • DCR B OR DCR M • DCX H • DAA Logical instructions • ANA R CMP R • ANA M CMP M • ANI 8BIT DATA CPI 8BIT • ORA R DATA CMA • ORA M CMC • ORI 8BIT DATA STC • XRA R RLC • XRA RRC • XRA 8BIT DATA BRANCHING INSTRUCTIONS • JMP 2034 • JZ • JC • JP • JPO I/O and machine control instructions • OUT 50H • IN 80H • NOP • HLT • DI • EI • RIM • SIM INSTRUCTION EXECUTION AND TIMING DIAGRAM: • Each instruction in 8085 microprocessor consists of two part- operation code (opcode) and operand. The opcode is a command such as ADD and the operand is an object to be operated on, such as a byte or the content of a register.
• Instruction Cycle: The time taken by the processor to complete the
execution of an instruction. An instruction cycle consists of one to six machine cycles.
• Machine Cycle: The time required to complete one operation; accessing
either the memory or I/O device. A machine cycle consists of three to six T- states. • T-State: Time corresponding to one clock period. It is the basic unit to calculate execution of instructions or programs in a processor. To execute a program, 8085 performs various operations as • Opcode fetch • Operand fetch • Memory read/write • I/O read/write External communication functions are: • Memory read/write • I/O read/write • Interrupt request acknowledge Assembly language programming for 8085up