Page 47 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 47

Unit 3: Assembly Language Programming of 8085


                                                                                                  Notes
                                      Table 3.3: Opcode Operation


               Opcode     Operand      Description
               ADD        R            Add
                                       (a) It ia a 1-byte instruction
                                       (b) Adds the contents of register R to the contents of
                                           Accumulator
               ADI        8-bit        Add Immediate
                                       (a) It is a 2-byte instruction
                                       (b) Adds the 8-bits (second byte) to the contents of the
                                           Accumulator

               SUB        R            Subtract
                                       (a) It is a 1-byte instruction
                                       (b) Subtracts the contents of register R from the contents
                                           of the Accumulator
               SUI        8-bit        Subtract Immediate
                                       (a) It is a 2-byte instruction
                                       (b) Subtract the 8-bit (second byte) from the contents of
                                           the Accumulator.

               INR        R            Increment
                                       (a) It is a 1-byte instruction
                                       (b) Increases the contents of R by 1
               DCR        R            Decrement
                                       (a) It is a 1-byte instruction
                                       (b) Decreases the contents of R by 1



            9. The INR (increment) and DCR (decrement) uses only one of the registers. These do not affect
               CY, even the result is larger than 8-bit.
            3.3.3 Logical Operations

            As 8085 microprocessor is a programmable logic chip, it can also perform hard-wired logic with
            its instruction set. The logical operations performed by includes AND, OR, XOR (Exclusive OR)
            and NOT (Complement). The logical instructions also assume that the Accumulator is one of the
            operands and also the place where the result is stored. These operations also do not affect the
            contents of source register. Except the CMA instruction, all other affect Z, P, and S flags according
            to the result. The logic operations performed are listed in Table 3.4. 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 AND, O red, or Exclusive-O Red 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.





                                             LOVELY PROFESSIONAL UNIVERSITY                                    41
   42   43   44   45   46   47   48   49   50   51   52