Page 137 - Digital Electronics by harish
P. 137

Exchange  H  and  L  with  top  of  stack
                       pointer                                           XTHL
                       XTHL
                12.
                       The contents of the L register are exchanged with the stack location pointed by
                       the  contents  of  the  stack  pointer  register.  The  contents  of  the  H  register  are
                       exchanged with the next stack location (SP+1).
                       Push register pair onto stack                     PUSH B
                       PUSH Reg. pair                                    PUSH D
                       (PSW  „Processor  Status  Word‟  means  PUSH H
                13.
                       Accumulator and Flag register)                    PUSH PSW
                       The contents of the register pair designated in the operand are copied onto the
                       stack.
                                                                         POP B
                       Pop off stack to register pair                    POP D
                       POP Reg. pair                                     POP H
                14.
                                                                         POP PSW
                       The contents of the memory location pointed out by the stack pointer register are
                       copied to registers specified.

                       Output  data  from  accumulator  to  a
                       port with 8-bit address                           OUT 50H
                15.  OUT 8-bit port address
                       The  contents  of  the  accumulator  are  copied  into  the  I/O  port  specified  by  the
                       operand.
                       Input data to accumulator from a port
                       with 8-bit address                                IN 50H
                16.  IN 8-bit port address
                       The contents of the input port designated in the operand are read and loaded into
                       the accumulator.

               5.2.4.2  Arithmetic Instructions

               S.No                      Instruction                                     Example
                       Add       register      or     memory        to
                       accumulator                                       ADD B
                       ADD R                                             ADD M
                 1.
                       ADD M
                       The contents of the operand (register or memory) are added to the contents of the
                       accumulator and the result is stored in the accumulator.
                       Add register to accumulator with carry            ADC B
                       ADC R                                             ADC M
                       ADC M
                 2.
                       The contents of the operand (register or memory) and the Carry flag are added to
                       the contents of the accumulator and the result is stored in the accumulator.




                                                           137
   132   133   134   135   136   137   138   139   140   141   142