Page 137 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 137

Unit 9: Introduction to 8085 Instructions


            For example:                                                                          Notes


              Task                  Op code    Operand      Binary Code     Hex Code
              Copy the
              contents of the
              accumulator in
              the register C.       MOV        C,A          01001111        4FH

              Add the contents
              of register B to
              the contents of
              the accumulator       ADD        B            1000 0000       80H
              Invert (compliment)
              each bit in the
              accumulator.          CMA                     00101111        2FH

            These instructions are 1-byte instructions performing three different tasks. In the first instruction,
            both operand registers are specified. In the second instruction, the operand B is specified and the
            accumulator is assumed. Similarly, in the third instruction, the accumulator is assumed to be the
            implicit operand. These instructions are stored in 8- bit binary format in memory; each requires
            one memory location.
            MOV rd, rs
            rd <— rs copies contents of rs into rd.

            Coded as 01 ddd sss where ddd is a code for one of the 7 general registers which is the destination
            of the data, sss is the code of the source register.

                    Example: MOV A, B


            Coded as 01111000 = 78H = 170 octal (octal was used extensively in instruction design of such
            processors).
            ADD r
            A <— A + r
            Two-Byte Instructions

            In a two-byte instruction, the first byte specifies the operation code and the second byte specifies
            the operand. Source operand is a data byte immediately following the opcode. For example:

              Task            Op code    Operand   Binary Code   Hex Code
              Load an 8-bit                                      Data 3E   First Byte
              data byte in
              the accumulator.  MVI      A,        0011 1110     Data      Second Byte

            Assume that the data byte is 32H. The assembly language instruction is written as

              Mnemonics                     Hex code
              MVI A, 32H                    3E 32H







                                             LOVELY PROFESSIONAL UNIVERSITY                                   131
   132   133   134   135   136   137   138   139   140   141   142