Logical, Shift and Rotate Instructions 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Logical, Shift and Rotate Instructions of 8085: Logical instruction are used to perform the logical operations such as AND, OR, NOT, XOR, compare, rotate left, rotate right etc. These are described below with examples of each Logical Instructions: Name of Instruction Mnemonic and Format Description Flags Affected>/td> Logical Compare CMP opr Used to Compare ACC with operand which may be in Register or memory if A < opr: Carry Flag is set CPI Immidiate_opr Used to Compare ACC with immediate operand which may be in Register or memory if A < opr: Carry Flag is set; if A = opr: Zero Flag is set; Logical And Operation ANA opr Used to perform logical AND operation with Register or memory S, Z, P are modified to reflect the result of the operation. CY and AC are reset; ANI
Flag and Machine Control Instructions 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Flag Manipulation and a Processor Control Instructions These instructions control the functioning of the available hardware inside the processor chip. These instructions are categorized into two types: Flag Manipulation instructions. Machine Control instructions. 1. Flag Manipulation instructions The Flag manipulation instructions directly modify the carry flag. These are STC - Set the carry Flag CMC - Complement the carry Flag 2. Machine Control instructions The Machine control instructions control the bus usage and execution HLT – Halt the process. NOP – No operation. DI - Disable Interrupt EI - Enable Interrupt
Branch Type of Instructions 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Branch Type Instructions: Branch Type Instructions These type of instructions can be unconditional or conditional branch instruction. and are given below: Unconditional Branch JMP 16-bit Address (Label) CALL 16-bit Address (Label) RET ; Return from Subroutine RST n ; restart is a one byte call instruction, and jumps to the instruction at restart addre. Conditional Branch JZ 16-bit Address (Label) JNZ 16-bit Address (Label) JC 16-bit Address (Label) JNC 16-bit Address (Label) JP 16-bit Address (Label); if result is positive JM 16-bit Address (Label); if result is Minus JPE 16-bit Address (Label); If even parity JPO 16-bit Address (Label); if odd parity Unconditional Call CALL 16-bit Address RET 16-bit address Conditional Call Instructions Opcode Description
Arithmetic Instructions 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Arithmetic Instructions: The different instructions under this category are listed in table below: 1 ADDReg/Mem Adds accumulator with Reg or Memory word Acc ← Acc + Reg/Mem 2 ADC Reg/Mem Adds acc with carry to Reg or Memory Acc ← Acc + Reg/Mem + Cy 3 ADI 8-bit data Adds 8-bit immediate data to Accumulator Acc ← Acc + 8-bit data 4 ACI 8-bit data Adds with carry 8-bit data to Accumulator Acc ← Acc + 8-bit data + Cy 5 DAD Rp Add Register pair to HL HL ← HL + Rp 6 SUB Reg/Mem Subtract reg/Mem from accumulator Acc ← Acc + Reg/Mem 7 SBB Reg / Mem Subtract reg/Mem from acc with borrow Acc ← Acc – Reg/Mem - Cy 8 SUI 8-bit data subtract 8-bit data from acc Acc ← Acc – 8-bit data 9 SBI 8-bit data subtract 8-bit data from acc with borrow Acc ← Acc – 8-bit data - Cy 10 INR
Programming Model 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Programming Model of 8085: The programming model of 8085 consist of an 8-bit accumulator, one flag register, 6 general 8-bit purpose registers, and two 16-bit special purpose registers. These registers are critically required when programming a 8085 processor. The different register in the programming model are explained below: Figure-1: Programming Model of 8085: Accumulator: Accumulator is an 8-bit register. For processing the numbers, 8085 assumes that one of the numbers is in accumulator. After processing, the result is accumulated in accumulator. The usage of the accumulator is given below in assembly language format: MOV A, M ; this instruction moves the content of a memory location into accumulator MOV B, C ; It moves the content of register C into register B ADD B ; it add