Page 133 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 133

Unit 9: Introduction to 8085 Instructions


            Increment/Decrement: The 8-bit contents of a register or a memory location can be incremented  Notes
            or decrement by 1. Similarly, the 16-bit contents of a register pair (such as BC) can be incremented
            or decrement by 1. These increment and decrement operations differ from addition and subtraction
            in an important way; i.e., they can be performed in any one of the registers or in a memory
            location.
            The arithmetic instructions add, subtract, increment, or decrement data in registers or memory.
            ADD: Add to Accumulator

            ADI: Add Immediate Data to Accumulator
            ADC: Add to Accumulator Using Carry Flag
            ACI: Add Immediate data to Accumulator Using Carry
            SUB: Subtract from Accumulator

            SUI: Subtract Immediate Data from Accumulator
            SBB: Subtract from Accumulator Using Borrow (Carry) Flag
            SBI: Subtract Immediate from Accumulator Using Borrow (Carry) Flag

            INR: Increment Specified Byte by One
            DCR: Decrement Specified Byte by One
            INX: Increment Register Pair by One
            DCX: Decrement Register Pair by One

            DAD: Double Register Add; Add Content of Register
            Pair to H & L Register Pair




                     Write an assembly program to implement subtraction on two numbers.


            9.3 Logical Operations
            These instructions perform various logical operations with the contents of the accumulator. AND,
            OR Exclusive-OR - Any 8-bit number, or the contents of a register, or of a memory location can be
            logically ANDed, Ored, or Exclusive-ORed with the contents of the accumulator. The results are
            stored in the accumulator. Rotate- Each bit in the accumulator can be shifted either left or right to
            the next position. Compare- Any 8-bit number or the contents of a register, or a memory location
            can be compared for equality, greater than, or less than, with the contents of the accumulator.
            Complement - The contents of the accumulator can be complemented. All 0s are replaced by 1s
            and all 1s are replaced by 0s.

                       The logical AND, OR, and Exclusive OR instructions enable you to set specific bits
                       in the accumulator ON or OFF.


            ANA: Logical AND with Accumulator

            ANI: Logical AND with Accumulator Using Immediate Data
            ORA: Logical OR with Accumulator
            OR: Logical OR with Accumulator Using Immediate Data




                                             LOVELY PROFESSIONAL UNIVERSITY                                   127
   128   129   130   131   132   133   134   135   136   137   138