SlideShare ist ein Scribd-Unternehmen logo
1 von 107
INSTRUCTION SET OF 8085



          Presented By,
      Er. Swapnil Kaware,
    svkaware@yahoo.co.in,
        B.E.(Electronics).
BINARY TO DECIMAL NUMBER FORMAT
8   4   2   1   DECIMAL   8   4   2   1   DECIMAL



0   0   0   0   =0        1   0   0   0   =8

0   0   0   1   =1        1   0   0   1   =9

0   0   1   0   =2        1   0   1   0   = 10 = A

0   0   1   1   =3        1   0   1   1   = 11 = B

0   1   0   0   =4        1   1   0   0   = 12 = C

0   1   0   1   =5        1   1   0   1   = 13 = D

0   1   1   0   =6        1   1   1   0   = 14 = E

0   1   1   1   =7        1   1   1   1   = 15 = F
What is Instruction ?????
• An instruction is a binary pattern designed
  inside a microprocessor to perform a specific
  function.

• 8085 has 246 instructions.

• Each instruction is represented by an 8-bit
  binary value.
Classification Of Instruction Set
• There are 5 Types,

•   (1) Data Transfer Instruction,
•   (2) Arithmetic Instructions,
•   (3) Logical Instructions,
•   (4) Branching Instructions,
•   (5) Control Instructions,
(1) Data Transfer Instructions


• MOV Rd, Rs
• MOV M, Rs
• MOV Rd, M
• This instruction copies the contents of the
  source register into the destination register.
• The contents of the source register are not
  altered.
• Example: MOV B,A or MOV M,B or MOV C,M
BEFORE EXECUTION                             AFTER EXECUTION

A      20       B             MOV B,A   A    20       B        20




A           F                           A         F
B    30     C                           B   30    C
D           E
                              MOV M,B   D         E
H    20     L       50                  H   20    L       50        30




A           F                           A         F
B           C                           B         C       40
D           E
                              MOV C,M
                                        D         E
H    20     L       50   40             H   20    L       50        40
(2) Data Transfer Instructions

• MVI R, Data(8-bit)
• MVI M, Data(8-bit)

• The 8-bit immediate data is stored in the
  destination register (R) or memory (M), R is
  general purpose 8 bit register such as
  A,B,C,D,E,H and L.

• Example: MVI B, 60H or MVI M, 40H
BEFORE EXECUTION                      AFTER EXECUTION


   A           F                             A             F
   B           C                             B        60   C
   D           E
                           MVI B,60H         D             E
   H           L                             H             L




        BEFORE EXECUTION                         AFTER EXECUTION


204FH                             204FH

                                                 40
HL=2050H                          HL=2050H
                      MVI M,40H
2051H                             2051H
(3) Data Transfer Instructions

• LDA 16-bit address

• The contents of a memory location, specified
  by a 16-bit address in the operand, are
  copied to the accumulator (A).
• The contents of the source are not altered.

• Example: LDA 2000H
BEFORE EXECUTION               AFTER EXECUTION


A                                  A    30


               30      LDA 2000H                30
       2000H                            2000H
(4) Data Transfer Instructions


• LDAX Register Pair
• Load accumulator (A) with the contents of
  memory location whose address is specified
  by BC or DE or register pair.
• The contents of either the register pair or the
  memory location are not altered.

• Example: LDAX D
BEFORE EXECUTION                        AFTER EXECUTION


A        F                              A    80   F



B        C                80            B         C                80
                  2030H                                    2030H
                               LDAX D
D   20   E   30                         D    20   E   30
(5) Data Transfer Instructions

• STA 16-bit address

• The contents of accumulator are copied into
  the memory location i.e. address specified by
  the operand in the instruction.

• Example: STA 2000 H
BEFORE EXECUTION               AFTER EXECUTION


A       50                         A    50


                                                50
       2000H           STA 2000H        2000H
(6) Data Transfer Instructions

• STAX Register Pair

• Store the contents of accumulator (A) into
  the memory location whose address is
  specified by BC Or DE register pair.

• Example: STAX B
BEFORE EXECUTION                  AFTER EXECUTION



A   50   F                         A     50   F



B   10   C   20                    B     10   C   20           50
                  1020H                                1020H

D        E
                          STAX B   D          E
(7) Data Transfer Instructions

• SHLD 16-bit address

• Store H-L register pair in memory.
• The contents of register L are stored into
  memory location specified by the 16-bit
  address.
• The contents of register H are stored into the
  next memory location.

• Example: SHLD 2500 H
BEFORE EXECUTION                     AFTER EXECUTION


H      30       L      60           H      30       L        60




                                                        60
        204FH                               204FH


                                                        30
        2500H               SHLD 2500H      2500H



        2502H                               2502H
(8) Data Transfer Instructions

• XCHG

• The contents of register H are exchanged
  with the contents of register D.
• The contents of register L are exchanged with
  the contents of register E.

• Example: XCHG
BEFORE EXECUTION               AFTER EXECUTION



D       20    E        40          D    70    E      80




H       70    L        80   XCHG   H    20    L      40
(9) Data Transfer Instructions

• SPHL

• Move data from H-L pair to the Stack Pointer
  (SP)
• This instruction loads the contents of H-L pair
  into SP.

• Example: SPHL
BEFORE EXECUTION


SP
H       25          L          00




             SPHL



     AFTER EXECUTION

SP                      2500
H       25          L          00
(10) Data Transfer Instructions

• XTHL
• Exchange H–L with top of stack
• The contents of L register are exchanged with
  the location pointed out by the contents of
  the SP.
• The contents of H register are exchanged
  with the next location (SP + 1).

• Example: XTHL
L=SP
                        H=(SP+1)

     BEFORE EXECUTION                          AFTER EXECUTION


SP        2700                50          SP        2700             40
                      2700H                                  2700H
H         L                               H         L
     30          40           60               60       50           30
                      2701H                                  2701H
                                   XTHL
                      2702H                                  2702H
(11) Data Transfer Instructions

• PCHL

• Load program counter with H-L contents
• The contents of registers H and L are copied into
  the program counter (PC).
• The contents of H are placed as the high-order
  byte and the contents of L as the low-order byte.

• Example: PCHL
BEFORE EXECUTION          AFTER EXECUTION


PC                        PC        6000

H
     60
          L
              00
                   PCHL   H
                               60
                                     L
                                           00
(12) Data Transfer Instructions

• IN 8-bit port address

• Copy data to accumulator from a port with 8-
  bit address.
• The contents of I/O port are copied into
  accumulator.

• Example: IN 80 H
BEFORE EXECUTION

PORT 80H   10                 A




                    IN 80H


                AFTER EXECUTION

PORT 80H   10                 A    10
(13) Data Transfer Instructions

• OUT 8-bit port address

• Copy data from accumulator to a port with 8-
  bit address
• The contents of accumulator are copied into
  the I/O port.

• Example: OUT 50 H
BEFORE EXECUTION

PORT 50H   10                 A    40




                    OUT 50H


                AFTER EXECUTION

PORT 50H   40                 A    40
Arithematic Instructions
• These instructions perform the operations
  like:

•   Addition
•   Subtraction
•   Increment
•   Decrement
(1) Arithematic Instructions

• ADD R
• ADD M
• The contents of register or memory are added to
  the contents of accumulator.
• The result is stored in accumulator.
• If the operand is memory location, its address is
  specified by H-L pair.

• Example: ADD C or ADD M
BEFORE EXECUTION                      AFTER EXECUTION


     A         20                              A     50

     B               C   30                    B          C        30
     D               E             ADD C       D          E
                                               H          L
     H               L
                                   A=A+R


         BEFORE EXECUTION                      AFTER EXECUTION

A   20                             ADD M   A    30
B          C                               B         C
D          E
                                   A=A+M   D         E
H   20     L        50        10           H    20   L        50         10

                          2050                                          2050
(2) Arithematic Instructions

• ADC R
• ADC M
• The contents of register or memory and Carry Flag
  (CY) are added to the contents of accumulator.
• The result is stored in accumulator.
• If the operand is memory location, its address is
  specified by H-L pair. All flags are modified to reflect
  the result of the addition.

• Example: ADC C or ADC M
BEFORE EXECUTION                    AFTER EXECUTION


        CY       1                          CY       0

        A        50                         A        71
        B              C   20               B                 C     20
                                  ADC C
        D              E                    D                 E
                                 A=A+R+CY
        H              L                    H                 L




         BEFORE EXECUTION                   AFTER EXECUTION


    CY       1                                   CY       0
                      2050H 30   ADC M                             2050H 30
    A        20                                  A        51
                                 A=A+M+CY
H   20       L        50                    H        20        L    50
(3) Arithematic Instructions

• ADI 8-bit data


• The 8-bit data is added to the contents of
  accumulator.
• The result is stored in accumulator.

• Example: ADI 10 H
BEFORE EXECUTION                 AFTER EXECUTION




 A     50                          A     60

                   ADI 10H
                   A=A+DATA(8)
(4) Arithematic Instructions

• ACI 8-bit data


• The 8-bit data and the Carry Flag (CY) are
  added to the contents of accumulator.
• The result is stored in accumulator.

• Example: ACI 20 H
BEFORE EXECUTION              AFTER EXECUTION




CY   1             ACI 20H     CY   0

A    30
                   A=A+DATA    A    51


                   (8)+CY
(5) Arithematic Instructions

• DAD Register pair
• The 16-bit contents of the register pair are
  added to the contents of H-L pair.
• The result is stored in H-L pair.
• If the result is larger than 16 bits, then CY is
  set.

• Example: DAD D
BEFORE EXECUTION             AFTER EXECUTION




CY   0                       CY   0


SP                           SP
B
D    10
          C
          E   20
                   DAD D     B
                             D    10
                                       C
                                       E       20
H    20   L   50   HL=HL+R   H    30   L       70
(6) Arithematic Instructions

• SUB R
• SUB M
• The contents of the register or memory location are
  subtracted from the contents of the accumulator.
• The result is stored in accumulator.
• If the operand is memory location, its address is
  specified by H-L pair.

• Example: SUB B or SUB M
BEFORE EXECUTION                          AFTER EXECUTION


    A      50                                     A       20
    B      30   C                                 B       30        C
    D           E
                                 SUB B            D                 E
    H           L                A=A-R            H                 L




        BEFORE EXECUTION                          AFTER EXECUTION



                            10
A   50              1020H                A   40            1020H        10

H           L
                                 SUB M   H            L
    10              20
                                 A=A-M       10                20
(7) Arithematic Instructions

• SBB R
• SBB M
• The contents of the register or memory location and
  Borrow Flag (i.e.CY) are subtracted from the contents of the
  accumulator.
• The result is stored in accumulator.
• If the operand is memory location, its address is specified
  by H-L pair.

• Example: SBB C or SBB M
BEFORE EXECUTION                                 AFTER EXECUTION


        CY       1                                       CY       0

        A        40                                      A        19
        B             C    20
                                     SBB C               B             C    20
        D             E              A=A-R-CY            D             E
        H             L                                  H             L




        BEFORE EXECUTION                                 AFTER EXECUTION

    CY       1                                       CY       0
                                10                                               10
    A        50       2050H                          A        39       2050H
                                      SBB M
H            L                                   H            L
    20                50              A=A-M-CY       20                50
(8) Arithematic Instructions

• SUI 8-bit data

• OPERATION: A=A-DATA(8)
• The 8-bit immediate data is subtracted from
  the contents of the accumulator.
• The result is stored in accumulator.

• Example: SUI 45 H
(9) Arithematic Instructions

• SBI 8-bit data
• The 8-bit data and the Borrow Flag (i.e. CY) is
  subtracted from the contents of the
  accumulator.
• The result is stored in accumulator.

• Example: SBI 20 H
BEFORE EXECUTION                    AFTER EXECUTION




   CY   1                            CY   0

   A    50
                   SBI 20H           A    29
                   A=A-DATA(8)-CY
(10) Arithematic Instructions

• INR R
• INR M
• The contents of register or memory location are
  incremented by 1.
• The result is stored in the same place.
• If the operand is a memory location, its address
  is specified by the contents of H-L pair.

• Example: INR B or INR M
BEFORE EXECUTION                           AFTER EXECUTION


         A                                          A
         B       10    C                INR B       B    11    C
         D
         H
                       E
                       L
                                        R=R+1       D
                                                    H
                                                               E
                                                               L



         BEFORE EXECUTION                           AFTER EXECUTION




H            L                     30           H        L         31
                           2050H                                        2050H
    20            50
                                        INR M       20        50

                                        M=M+1
(11) Arithematic Instructions

• INX Rp


• The contents of register pair are incremented
  by 1.
• The result is stored in the same place.

• Example: INX H
BEFORE EXECUTION             AFTER EXECUTION




SP                           SP

B         C                  B         C
D         E        INX H     D         E
H    10   L   20             H    11   L       21
                   RP=RP+1
(12) Arithematic Instructions

• DCR R
• DCR M

• The contents of register or memory location are
  decremented by 1.
• The result is stored in the same place.
• If the operand is a memory location, its address
  is specified by the contents of H-L pair.
• Example: DCR E or DCR M
BEFORE EXECUTION                           AFTER EXECUTION



         A                                              A
         B            C                                 B            C
         D            E      20
                                       DCR E            D            E     19
         H            L                R=R-1            H            L



         BEFORE EXECUTION                               AFTER EXECUTION




                                               H            L
H            L                    21                                             20
                                                   20           50       2050H
                          2050H
    20           50                    DCR M
                                       M=M-1
(13) Arithematic Instructions

• DCX Rp


• The contents of register pair are decremented by
  1.
• The result is stored in the same place.

• Example: DCX D
BEFORE EXECUTION             AFTER EXECUTION




SP                           SP

B         C                  B         C
D    10   E   20   DCX D     D    10   E       19
H         L                  H         L
                   RP=RP-1
(1) Logical Instructions

• ANA R
• ANA M

• AND specified data in register or memory with
  accumulator.
• Store the result in accumulator (A).

• Example: ANA B, ANA M
BEFORE EXECUTION                 1010 1010=AAH      AFTER EXECUTION
                                       0000 1111=0FH
          CY              AC                              CY      0    AC   1
                                       0000 1010=0AH
          A         AA                                    A      0A
          B         10
                    0F        C               ANA B       B      0F    C
          D                   E               A=A and R   D            E
          H                   L                           H            L




      BEFORE EXECUTION                                          AFTER EXECUTION

                                        0101 0101=55H
CY             AC                       1011 0011=B3H      CY      0   AC   1

                                  B3    0001 0001=11H                                B3
A    55             2050H                                  A      11        2050H

H    20        L         50                 ANA M          H      20   L        50
                                            A=A and M
(2) Logical Instructions

• ANI 8-bit data



• AND 8-bit data with accumulator (A).
• Store the result in accumulator (A)

• Example: ANI 3FH
BEFORE EXECUTION                 AFTER EXECUTION


                1011 0011=B3H
                0011 1111=3FH

                0011 0011=33H




CY        AC                     CY    0 AC   1
               ANI 3FH
A    B3        A=A and DATA(8)   A    33
(3) Logical Instructions

• XRA Register (8-bit)



• XOR specified register with accumulator.
• Store the result in accumulator.

• Example: XRA C
1010 1010=AAH
BEFORE EXECUTION    0010 1101=2DH   AFTER EXECUTION

                    1000 0111=87H


CY        AC                        CY   0    AC   0


A    AA                             A    87
B    10   C    2D                   B         C        2D
D         E
                      XRA C         D         E
H         L           A=A xor R     H         L
(4) Logical Instructions

• XRA M


• XOR data in memory (memory location
  pointed by H-L pair) with Accumulator.
• Store the result in Accumulator.

• Example: XRA M
0101 0101=55H
     BEFORE EXECUTION        1011 0011=B3H        AFTER EXECUTION
                             1110 0110=E6H




CY         AC                                CY   0    AC   0
                        B3   XRA M                                       B3
                2050H                        A    E6             2050H
A     55
                             A=A xor M
H     20   L      50                         H    20   L        50
(5) Logical Instructions

• XRI 8-bit data


• XOR 8-bit immediate data with accumulator (A).
• Store the result in accumulator.

• Example: XRI 39H
1011 0011=B3H
                    0011 1001=39H

BEFORE EXECUTION    1000 1010=8AH    AFTER EXECUTION




CY        AC                         CY     0 AC       0
                   XRI 39H
A    B3            A=A xor DATA(8)   A    8A
(6) Logical Instructions

• ORA Register


• OR specified register with accumulator (A).
• Store the result in accumulator.

• Example: ORA B
1010 1010=AAH
                       0001 0010=12H
    BEFORE EXECUTION                        AFTER EXECUTION
                       1011 1010=BAH




CY          AC                         CY     0    AC   0

                        ORA B
                        A=A or R

A      AA                              A      BA
B      12    C                         B      12   C
D            E                         D           E
H            L                         H           L
(7) Logical Instructions

• ORA M


• OR specified register with accumulator (A).
• Store the result in accumulator.

• Example: ORA M
0101 0101=55H
                               1011 0011=B3H
     BEFORE EXECUTION                               AFTER EXECUTION
                               1111 0111=F7H




    CY        AC                               CY      0 AC     0


                                 ORA M
                                 A=A or M
                          B3                                             B3
A        55       2050H                        A       F7       2050H
H        20   L     50                         H       20   L       50
(8) Logical Instructions

• ORI 8-bit data


• OR 8-bit data with accumulator (A).
• Store the result in accumulator.

• Example: ORI 08H
1011 0011=B3H
                   0000 1000=08H

BEFORE EXECUTION   1011 1011=BBH    AFTER EXECUTION




CY        AC                        CY     0 AC       0
                   ORI 08H
A    B3            A=A or DATA(8)   A    BB
(9) Logical Instructions

• CMP Register
• CMP M


• Compare specified data in register or memory
  with accumulator (A).
• Store the result in accumulator.

• Example: CMP D or CMP M
BEFORE EXECUTION        A>R: CY=0,Z=0     AFTER EXECUTION
                             A=R: CY=0,Z=1
      CY        Z            A<R: CY=1,Z=0         CY       0       Z       0


      A    B8                                      A     B8
      B    10       C               CMP D          B                    C
      D    B9       E               A-R            D     B9             E
      H             L                              H                    L




    BEFORE EXECUTION                                AFTER EXECUTION
                             A>M: CY=0,Z=0
                             A=M: CY=0,Z=1
                             A<M: CY=1,Z=0
CY         Z                                   CY       0       Z           1

                        B8                                                       B8
A     B8        2050H                          A        B8              2050H
                                       CMP M
H     20   L     50                    A-M     H        20      L           50
(10) Logical Instructions

• CPI 8-bit data

• Compare 8-bit immediate data with
  accumulator (A).
• Store the result in accumulator.

• Example: CPI 30H
A>DATA: CY=0,Z=0
                   A=DATA: CY=0,Z=1
BEFORE EXECUTION   A<DATA: CY=1,Z=0   AFTER EXECUTION




CY        Z                           CY     0 AC       0
                      CPI 30H
A    BA
                      A-DATA          A    BA




                   1011 1010=BAH
(11) Logical Instructions

• STC




• It sets the carry flag to 1.
• Example: STC
BEFORE EXECUTION          AFTER EXECUTION




CY   0                    CY   1
                   STC
                   CY=1
(12) Logical Instructions

• CMC




• It complements the carry flag.
• Example: CMC
BEFORE EXECUTION         AFTER EXECUTION




CY   1                   CY   0
                   CMC
(13) Logical Instructions

• CMA




• It complements each bit of the accumulator.
• Example: CMA
(14) Logical Instructions

• RLC
• Rotate accumulator left
• Each binary bit of the accumulator is rotated left
  by one position.
• Bit D7 is placed in the position of D0 as well as
  in the Carry flag.
• CY is modified according to bit D7.

• Example: RLC.
BEFORE EXECUTION




CY   B7    B6       B5    B4      B3    B2    B1    B0




                AFTER EXECUTION



B7    B6    B5       B4     B3     B2    B1    B0    B7
(15) Logical Instructions

• RRC
• Rotate accumulator right
• Each binary bit of the accumulator is rotated right by
  one
• position.
• Bit D0 is placed in the position of D7 as well as in the
  Carry flag.
• CY is modified according to bit D0.

• Example: RRC.
BEFORE EXECUTION




B7   B6   B5    B4    B3     B2    B1   B0   CY




               AFTER EXECUTION



B0   B7   B6     B5    B4     B3   B2   B1   B0
(16) Logical Instructions

• RAL
• Rotate accumulator left through carry
• Each binary bit of the accumulator is rotated left
  by one position through the Carry flag.
• Bit D7 is placed in the Carry flag, and the Carry
  flag is placed in the least significant position D0.
• CY is modified according to bit D7.

• Example: RAL.
BEFORE EXECUTION




     CY   B7    B6       B5    B4      B3    B2    B1    B0




                     AFTER EXECUTION



B7         B6    B5       B4     B3     B2    B1    B0    CY
(17) Logical Instructions

• RAR
• Rotate accumulator right through carry
• Each binary bit of the accumulator is rotated left
  by one position through the Carry flag.
• Bit D7 is placed in the Carry flag, and the Carry
  flag is placed in the least significant position D0.
• CY is modified according to bit D7.

• Example: RAR
BEFORE EXECUTION




B7   B6   B5    B4    B3     B2    B1   B0   CY




               AFTER EXECUTION



CY   B7   B6     B5    B4     B3   B2   B1    B0
Concept of Subroutine
• In 8085 microprocessor a subroutine is a
  separate program written aside from main
  program ,this program is basically the
  program which requires to be executed
  several times in the main program.
• The microprocessor can call subroutine any
  time using CALL instruction. after the
  subroutine is executed the subroutine hands
  over the program to main program using RET
  instruction.
Branching Instructions

• The branch group instructions allows the
  microprocessor to change the sequence of
  program either conditionally or under certain
  test conditions. The group includes,
• (1) Jump instructions,
• (2) Call and Return instructions,
• (3) Restart instructions,
(1) Branching Instructions
• JUMP ADDRESS
• BEFORE EXECUTION               AFTER EXECUTION
  PC                 JMP 2000H   PC     2000



• Jump unconditionally to the address.
• The instruction loads the PC with the address
  given within the instruction and resumes the
  program execution from specified location.
• Example: JMP 200H
Conditional Jumps
Instruction Code Decription            Condition For Jump

JC               Jump on carry         CY=1

JNC              Jump on not carry     CY=0

JP               Jump on positive      S=0

JM               Jump on minus         S=1

JPE              Jump on parity even   P=1

JPO              Jump on parity odd    P=0

JZ               Jump on zero          Z=1

JNZ              Jump on not zero      Z=0
(2) Branching Instructions
• CALL address

• Call unconditionally a subroutine whose
  starting address given within the
  instruction and used to transfer program
  control to a subprogram or subroutine.

• Example: CALL 2000H
Conditional Calls
Instruction Code     Description           Condition for CALL

CC                   Call on carry         CY=1

CNC                  Call on not carry     CY=0

CP                   Call on positive      S=0

CM                   Call on minus         S=1

CPE                  Call on parity even   P=1

CPO                  Call on parity odd    P=0

CZ                   Call on zero          Z=1

CNZ                  Call on not zero      Z=0
(3) Branching Instructions

• RET

• Return from the subroutine unconditionally.
• This instruction takes return address from the
  stack and loads the program counter with
  this address.

• Example: RET
BEFORE EXECUTION                 AFTER EXECUTION




SP     27FD           00         SP   27FF           00
              27FDH                          27FDH
PC                               PC   6200
              27FEH 62                       27FEH 62
                           RET
              27FFH                          27FFH
(4) Branching Instructions
• RST n
• Restart n (0 to 7)
• This instruction transfers the program control
  to a specific memory address. The processor
  multiplies the RST number by 8 to calculate
  the vector address.

• Example: RST 6
BEFORE EXECUTION                    AFTER EXECUTION

                        SP-1

SP     3000                         SP   2999               01
              2FFEH                                 2FFEH
PC     2000                         PC   0030
              2FFFH                                         20
                            RST 6                   2FFFH

              3000H                                 3000H



         ADDRESS OF THE NEXT INSTRUCTION IS 2001H
Vector Address For Return
                   Instructions
Instruction Code        Vector Address

RST 0                   0*8=0000H

RST 1                   0*8=0008H

RST 2                   0*8=0010H

RST 3                   0*8=0018H

RST 4                   0*8=0020H

RST 5                   0*8=0028H

RST 6                   0*8=0030H

Rst 7                   0*8=0038H
(1) Control Instructions
• NOP

• No operation
• No operation is performed.
• The instruction is fetched and decoded but no
  operation is executed.

• Example: NOP
(2) Control Instructions
• HLT

• Halt
• The CPU finishes executing the current
  instruction and halts any further execution.
• An interrupt or reset is necessary to exit from
  the halt state.

• Example: HLT
(3) Control Instructions
• RIM

• Read Interrupt Mask
• This is a multipurpose instruction used to read the
  status of interrupts 7.5, 6.5, 5.5 and read serial data
  input bit.
• The instruction loads eight bits in the accumulator
  with the following interpretations.

• Example: RIM
RIM INSTRUCTION
• SIM

• Set Interrupt Mask
• This is a multipurpose instruction and used to
  implement the 8085 interrupts 7.5, 6.5, 5.5, and
  serial data output.
• The instruction interprets the accumulator
  contents as follows.

• Example: SIM
SIM Instruction
END OF
INSTRUCTION SET

Weitere ähnliche Inhalte

Was ist angesagt?

Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualyeshwant gadave
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086Ikhlas Rahman
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086samirbharat77
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085ShivamSood22
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chipsSrikrishna Thota
 
itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085Shifali Sharma
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONSRamaPrabha24
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessorAvin Mathew
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modesVijay Kumar
 
Stack Operations
Stack Operations Stack Operations
Stack Operations RidaZaman1
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085shiji v r
 
3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptx3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptxISMT College
 

Was ist angesagt? (20)

Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Intel Pentium Pro
Intel Pentium ProIntel Pentium Pro
Intel Pentium Pro
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
Segment registers
Segment registersSegment registers
Segment registers
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessor
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 
Stack Operations
Stack Operations Stack Operations
Stack Operations
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
 
3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptx3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptx
 

Andere mochten auch

8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085techbed
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSSabin Gautam
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacingdeval patel
 
Stack in microprocessor 8085(presantation)
Stack in microprocessor 8085(presantation)Stack in microprocessor 8085(presantation)
Stack in microprocessor 8085(presantation)Safin Biswas
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture pptParvesh Gautam
 
Instruction set of intel 8085 microprocessor
Instruction set of intel 8085 microprocessorInstruction set of intel 8085 microprocessor
Instruction set of intel 8085 microprocessorSumit Swain
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085yedles
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
microp-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :Pmicrop-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :PJathin Kanumuri
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)Ravi Anand
 
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction setSaumitra Rukmangad
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instructionkashif Shafqat
 
Instruction Set 8085
Instruction Set 8085Instruction Set 8085
Instruction Set 8085Stupidsid.com
 
1206 Interrupts Of 8085
1206 Interrupts Of 80851206 Interrupts Of 8085
1206 Interrupts Of 8085techbed
 

Andere mochten auch (20)

8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
8085 instruction-set new
8085 instruction-set new8085 instruction-set new
8085 instruction-set new
 
Stack in microprocessor 8085(presantation)
Stack in microprocessor 8085(presantation)Stack in microprocessor 8085(presantation)
Stack in microprocessor 8085(presantation)
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
 
Instruction set of intel 8085 microprocessor
Instruction set of intel 8085 microprocessorInstruction set of intel 8085 microprocessor
Instruction set of intel 8085 microprocessor
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
microp-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :Pmicrop-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :P
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)
 
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
 
Shift rotate
Shift rotateShift rotate
Shift rotate
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
Instruction Set 8085
Instruction Set 8085Instruction Set 8085
Instruction Set 8085
 
Delay routine
Delay routineDelay routine
Delay routine
 
1206 Interrupts Of 8085
1206 Interrupts Of 80851206 Interrupts Of 8085
1206 Interrupts Of 8085
 

Ähnlich wie Instruction set of 8085 Microprocessor By Er. Swapnil Kaware

Instruction set class
Instruction set   classInstruction set   class
Instruction set classshiji v r
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction setJLoknathDora
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSSwapnil Mishra
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptxISMT College
 
8085 paper-presentation
8085 paper-presentation8085 paper-presentation
8085 paper-presentationJiMs ChAcko
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.pptsteffydean
 
Instruction set 8085
Instruction set 8085Instruction set 8085
Instruction set 8085varun sukheja
 
microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2Jathin Kanumuri
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3Sajan Agrawal
 
implementation of data instrucions in emu8086
implementation of data instrucions in emu8086implementation of data instrucions in emu8086
implementation of data instrucions in emu8086COMSATS Abbottabad
 
T imingdiagram
T imingdiagramT imingdiagram
T imingdiagrampuja00
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).pptKanikaJindal9
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setprakash y
 

Ähnlich wie Instruction set of 8085 Microprocessor By Er. Swapnil Kaware (20)

Instruction set class
Instruction set   classInstruction set   class
Instruction set class
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
Instruction set
Instruction setInstruction set
Instruction set
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx
 
8085 paper-presentation
8085 paper-presentation8085 paper-presentation
8085 paper-presentation
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
Instruction set 8085
Instruction set 8085Instruction set 8085
Instruction set 8085
 
microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3
 
implementation of data instrucions in emu8086
implementation of data instrucions in emu8086implementation of data instrucions in emu8086
implementation of data instrucions in emu8086
 
T imingdiagram
T imingdiagramT imingdiagram
T imingdiagram
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
 
instructions set of 8051.pdf
instructions set of 8051.pdfinstructions set of 8051.pdf
instructions set of 8051.pdf
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
13229286.ppt
13229286.ppt13229286.ppt
13229286.ppt
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 

Mehr von Prof. Swapnil V. Kaware

Corona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. KawareCorona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Basic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. KawrareBasic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. KawrareProf. Swapnil V. Kaware
 
Addressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. KawareAddressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Best Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. KawareBest Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. KawareLED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Microprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. KawareMicroprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Electronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. KawareElectronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Transistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil KawareTransistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil KawareProf. Swapnil V. Kaware
 
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil KawareBasic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil KawareProf. Swapnil V. Kaware
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareProf. Swapnil V. Kaware
 
Digital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil KawareDigital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil KawareProf. Swapnil V. Kaware
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareProf. Swapnil V. Kaware
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareProf. Swapnil V. Kaware
 

Mehr von Prof. Swapnil V. Kaware (20)

Corona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. KawareCorona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. Kaware
 
Basic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. KawrareBasic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. Kawrare
 
Addressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. KawareAddressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. Kaware
 
Best GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. KawareBest GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. Kaware
 
Best Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. KawareBest Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. Kaware
 
Chandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. KawareChandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. Kaware
 
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. KawareLED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
 
Combinational Logic Circuits
Combinational Logic CircuitsCombinational Logic Circuits
Combinational Logic Circuits
 
Microprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. KawareMicroprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. Kaware
 
LED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. KawareLED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. Kaware
 
Electronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. KawareElectronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. Kaware
 
Transistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil KawareTransistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil Kaware
 
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil KawareBasic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
 
Basic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil KawareBasic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil Kaware
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil Kaware
 
Digital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil KawareDigital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil Kaware
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil Kaware
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil Kaware
 

Kürzlich hochgeladen

The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptxmary850239
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Dave Phillips
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 

Kürzlich hochgeladen (20)

The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx
3.19.24 Urban Uprisings and the Chicago Freedom Movement.pptx
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 

Instruction set of 8085 Microprocessor By Er. Swapnil Kaware

  • 1. INSTRUCTION SET OF 8085 Presented By, Er. Swapnil Kaware, svkaware@yahoo.co.in, B.E.(Electronics).
  • 2. BINARY TO DECIMAL NUMBER FORMAT 8 4 2 1 DECIMAL 8 4 2 1 DECIMAL 0 0 0 0 =0 1 0 0 0 =8 0 0 0 1 =1 1 0 0 1 =9 0 0 1 0 =2 1 0 1 0 = 10 = A 0 0 1 1 =3 1 0 1 1 = 11 = B 0 1 0 0 =4 1 1 0 0 = 12 = C 0 1 0 1 =5 1 1 0 1 = 13 = D 0 1 1 0 =6 1 1 1 0 = 14 = E 0 1 1 1 =7 1 1 1 1 = 15 = F
  • 3. What is Instruction ????? • An instruction is a binary pattern designed inside a microprocessor to perform a specific function. • 8085 has 246 instructions. • Each instruction is represented by an 8-bit binary value.
  • 4. Classification Of Instruction Set • There are 5 Types, • (1) Data Transfer Instruction, • (2) Arithmetic Instructions, • (3) Logical Instructions, • (4) Branching Instructions, • (5) Control Instructions,
  • 5. (1) Data Transfer Instructions • MOV Rd, Rs • MOV M, Rs • MOV Rd, M • This instruction copies the contents of the source register into the destination register. • The contents of the source register are not altered. • Example: MOV B,A or MOV M,B or MOV C,M
  • 6. BEFORE EXECUTION AFTER EXECUTION A 20 B MOV B,A A 20 B 20 A F A F B 30 C B 30 C D E MOV M,B D E H 20 L 50 H 20 L 50 30 A F A F B C B C 40 D E MOV C,M D E H 20 L 50 40 H 20 L 50 40
  • 7. (2) Data Transfer Instructions • MVI R, Data(8-bit) • MVI M, Data(8-bit) • The 8-bit immediate data is stored in the destination register (R) or memory (M), R is general purpose 8 bit register such as A,B,C,D,E,H and L. • Example: MVI B, 60H or MVI M, 40H
  • 8. BEFORE EXECUTION AFTER EXECUTION A F A F B C B 60 C D E MVI B,60H D E H L H L BEFORE EXECUTION AFTER EXECUTION 204FH 204FH 40 HL=2050H HL=2050H MVI M,40H 2051H 2051H
  • 9. (3) Data Transfer Instructions • LDA 16-bit address • The contents of a memory location, specified by a 16-bit address in the operand, are copied to the accumulator (A). • The contents of the source are not altered. • Example: LDA 2000H
  • 10. BEFORE EXECUTION AFTER EXECUTION A A 30 30 LDA 2000H 30 2000H 2000H
  • 11. (4) Data Transfer Instructions • LDAX Register Pair • Load accumulator (A) with the contents of memory location whose address is specified by BC or DE or register pair. • The contents of either the register pair or the memory location are not altered. • Example: LDAX D
  • 12. BEFORE EXECUTION AFTER EXECUTION A F A 80 F B C 80 B C 80 2030H 2030H LDAX D D 20 E 30 D 20 E 30
  • 13. (5) Data Transfer Instructions • STA 16-bit address • The contents of accumulator are copied into the memory location i.e. address specified by the operand in the instruction. • Example: STA 2000 H
  • 14. BEFORE EXECUTION AFTER EXECUTION A 50 A 50 50 2000H STA 2000H 2000H
  • 15. (6) Data Transfer Instructions • STAX Register Pair • Store the contents of accumulator (A) into the memory location whose address is specified by BC Or DE register pair. • Example: STAX B
  • 16. BEFORE EXECUTION AFTER EXECUTION A 50 F A 50 F B 10 C 20 B 10 C 20 50 1020H 1020H D E STAX B D E
  • 17. (7) Data Transfer Instructions • SHLD 16-bit address • Store H-L register pair in memory. • The contents of register L are stored into memory location specified by the 16-bit address. • The contents of register H are stored into the next memory location. • Example: SHLD 2500 H
  • 18. BEFORE EXECUTION AFTER EXECUTION H 30 L 60 H 30 L 60 60 204FH 204FH 30 2500H SHLD 2500H 2500H 2502H 2502H
  • 19. (8) Data Transfer Instructions • XCHG • The contents of register H are exchanged with the contents of register D. • The contents of register L are exchanged with the contents of register E. • Example: XCHG
  • 20. BEFORE EXECUTION AFTER EXECUTION D 20 E 40 D 70 E 80 H 70 L 80 XCHG H 20 L 40
  • 21. (9) Data Transfer Instructions • SPHL • Move data from H-L pair to the Stack Pointer (SP) • This instruction loads the contents of H-L pair into SP. • Example: SPHL
  • 22. BEFORE EXECUTION SP H 25 L 00 SPHL AFTER EXECUTION SP 2500 H 25 L 00
  • 23. (10) Data Transfer Instructions • XTHL • Exchange H–L with top of stack • The contents of L register are exchanged with the location pointed out by the contents of the SP. • The contents of H register are exchanged with the next location (SP + 1). • Example: XTHL
  • 24. L=SP H=(SP+1) BEFORE EXECUTION AFTER EXECUTION SP 2700 50 SP 2700 40 2700H 2700H H L H L 30 40 60 60 50 30 2701H 2701H XTHL 2702H 2702H
  • 25. (11) Data Transfer Instructions • PCHL • Load program counter with H-L contents • The contents of registers H and L are copied into the program counter (PC). • The contents of H are placed as the high-order byte and the contents of L as the low-order byte. • Example: PCHL
  • 26. BEFORE EXECUTION AFTER EXECUTION PC PC 6000 H 60 L 00 PCHL H 60 L 00
  • 27. (12) Data Transfer Instructions • IN 8-bit port address • Copy data to accumulator from a port with 8- bit address. • The contents of I/O port are copied into accumulator. • Example: IN 80 H
  • 28. BEFORE EXECUTION PORT 80H 10 A IN 80H AFTER EXECUTION PORT 80H 10 A 10
  • 29. (13) Data Transfer Instructions • OUT 8-bit port address • Copy data from accumulator to a port with 8- bit address • The contents of accumulator are copied into the I/O port. • Example: OUT 50 H
  • 30. BEFORE EXECUTION PORT 50H 10 A 40 OUT 50H AFTER EXECUTION PORT 50H 40 A 40
  • 31. Arithematic Instructions • These instructions perform the operations like: • Addition • Subtraction • Increment • Decrement
  • 32. (1) Arithematic Instructions • ADD R • ADD M • The contents of register or memory are added to the contents of accumulator. • The result is stored in accumulator. • If the operand is memory location, its address is specified by H-L pair. • Example: ADD C or ADD M
  • 33. BEFORE EXECUTION AFTER EXECUTION A 20 A 50 B C 30 B C 30 D E ADD C D E H L H L A=A+R BEFORE EXECUTION AFTER EXECUTION A 20 ADD M A 30 B C B C D E A=A+M D E H 20 L 50 10 H 20 L 50 10 2050 2050
  • 34. (2) Arithematic Instructions • ADC R • ADC M • The contents of register or memory and Carry Flag (CY) are added to the contents of accumulator. • The result is stored in accumulator. • If the operand is memory location, its address is specified by H-L pair. All flags are modified to reflect the result of the addition. • Example: ADC C or ADC M
  • 35. BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 A 50 A 71 B C 20 B C 20 ADC C D E D E A=A+R+CY H L H L BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 2050H 30 ADC M 2050H 30 A 20 A 51 A=A+M+CY H 20 L 50 H 20 L 50
  • 36. (3) Arithematic Instructions • ADI 8-bit data • The 8-bit data is added to the contents of accumulator. • The result is stored in accumulator. • Example: ADI 10 H
  • 37. BEFORE EXECUTION AFTER EXECUTION A 50 A 60 ADI 10H A=A+DATA(8)
  • 38. (4) Arithematic Instructions • ACI 8-bit data • The 8-bit data and the Carry Flag (CY) are added to the contents of accumulator. • The result is stored in accumulator. • Example: ACI 20 H
  • 39. BEFORE EXECUTION AFTER EXECUTION CY 1 ACI 20H CY 0 A 30 A=A+DATA A 51 (8)+CY
  • 40. (5) Arithematic Instructions • DAD Register pair • The 16-bit contents of the register pair are added to the contents of H-L pair. • The result is stored in H-L pair. • If the result is larger than 16 bits, then CY is set. • Example: DAD D
  • 41. BEFORE EXECUTION AFTER EXECUTION CY 0 CY 0 SP SP B D 10 C E 20 DAD D B D 10 C E 20 H 20 L 50 HL=HL+R H 30 L 70
  • 42. (6) Arithematic Instructions • SUB R • SUB M • The contents of the register or memory location are subtracted from the contents of the accumulator. • The result is stored in accumulator. • If the operand is memory location, its address is specified by H-L pair. • Example: SUB B or SUB M
  • 43. BEFORE EXECUTION AFTER EXECUTION A 50 A 20 B 30 C B 30 C D E SUB B D E H L A=A-R H L BEFORE EXECUTION AFTER EXECUTION 10 A 50 1020H A 40 1020H 10 H L SUB M H L 10 20 A=A-M 10 20
  • 44. (7) Arithematic Instructions • SBB R • SBB M • The contents of the register or memory location and Borrow Flag (i.e.CY) are subtracted from the contents of the accumulator. • The result is stored in accumulator. • If the operand is memory location, its address is specified by H-L pair. • Example: SBB C or SBB M
  • 45. BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 A 40 A 19 B C 20 SBB C B C 20 D E A=A-R-CY D E H L H L BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 10 10 A 50 2050H A 39 2050H SBB M H L H L 20 50 A=A-M-CY 20 50
  • 46. (8) Arithematic Instructions • SUI 8-bit data • OPERATION: A=A-DATA(8) • The 8-bit immediate data is subtracted from the contents of the accumulator. • The result is stored in accumulator. • Example: SUI 45 H
  • 47. (9) Arithematic Instructions • SBI 8-bit data • The 8-bit data and the Borrow Flag (i.e. CY) is subtracted from the contents of the accumulator. • The result is stored in accumulator. • Example: SBI 20 H
  • 48. BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 A 50 SBI 20H A 29 A=A-DATA(8)-CY
  • 49. (10) Arithematic Instructions • INR R • INR M • The contents of register or memory location are incremented by 1. • The result is stored in the same place. • If the operand is a memory location, its address is specified by the contents of H-L pair. • Example: INR B or INR M
  • 50. BEFORE EXECUTION AFTER EXECUTION A A B 10 C INR B B 11 C D H E L R=R+1 D H E L BEFORE EXECUTION AFTER EXECUTION H L 30 H L 31 2050H 2050H 20 50 INR M 20 50 M=M+1
  • 51. (11) Arithematic Instructions • INX Rp • The contents of register pair are incremented by 1. • The result is stored in the same place. • Example: INX H
  • 52. BEFORE EXECUTION AFTER EXECUTION SP SP B C B C D E INX H D E H 10 L 20 H 11 L 21 RP=RP+1
  • 53. (12) Arithematic Instructions • DCR R • DCR M • The contents of register or memory location are decremented by 1. • The result is stored in the same place. • If the operand is a memory location, its address is specified by the contents of H-L pair. • Example: DCR E or DCR M
  • 54. BEFORE EXECUTION AFTER EXECUTION A A B C B C D E 20 DCR E D E 19 H L R=R-1 H L BEFORE EXECUTION AFTER EXECUTION H L H L 21 20 20 50 2050H 2050H 20 50 DCR M M=M-1
  • 55. (13) Arithematic Instructions • DCX Rp • The contents of register pair are decremented by 1. • The result is stored in the same place. • Example: DCX D
  • 56. BEFORE EXECUTION AFTER EXECUTION SP SP B C B C D 10 E 20 DCX D D 10 E 19 H L H L RP=RP-1
  • 57. (1) Logical Instructions • ANA R • ANA M • AND specified data in register or memory with accumulator. • Store the result in accumulator (A). • Example: ANA B, ANA M
  • 58. BEFORE EXECUTION 1010 1010=AAH AFTER EXECUTION 0000 1111=0FH CY AC CY 0 AC 1 0000 1010=0AH A AA A 0A B 10 0F C ANA B B 0F C D E A=A and R D E H L H L BEFORE EXECUTION AFTER EXECUTION 0101 0101=55H CY AC 1011 0011=B3H CY 0 AC 1 B3 0001 0001=11H B3 A 55 2050H A 11 2050H H 20 L 50 ANA M H 20 L 50 A=A and M
  • 59. (2) Logical Instructions • ANI 8-bit data • AND 8-bit data with accumulator (A). • Store the result in accumulator (A) • Example: ANI 3FH
  • 60. BEFORE EXECUTION AFTER EXECUTION 1011 0011=B3H 0011 1111=3FH 0011 0011=33H CY AC CY 0 AC 1 ANI 3FH A B3 A=A and DATA(8) A 33
  • 61. (3) Logical Instructions • XRA Register (8-bit) • XOR specified register with accumulator. • Store the result in accumulator. • Example: XRA C
  • 62. 1010 1010=AAH BEFORE EXECUTION 0010 1101=2DH AFTER EXECUTION 1000 0111=87H CY AC CY 0 AC 0 A AA A 87 B 10 C 2D B C 2D D E XRA C D E H L A=A xor R H L
  • 63. (4) Logical Instructions • XRA M • XOR data in memory (memory location pointed by H-L pair) with Accumulator. • Store the result in Accumulator. • Example: XRA M
  • 64. 0101 0101=55H BEFORE EXECUTION 1011 0011=B3H AFTER EXECUTION 1110 0110=E6H CY AC CY 0 AC 0 B3 XRA M B3 2050H A E6 2050H A 55 A=A xor M H 20 L 50 H 20 L 50
  • 65. (5) Logical Instructions • XRI 8-bit data • XOR 8-bit immediate data with accumulator (A). • Store the result in accumulator. • Example: XRI 39H
  • 66. 1011 0011=B3H 0011 1001=39H BEFORE EXECUTION 1000 1010=8AH AFTER EXECUTION CY AC CY 0 AC 0 XRI 39H A B3 A=A xor DATA(8) A 8A
  • 67. (6) Logical Instructions • ORA Register • OR specified register with accumulator (A). • Store the result in accumulator. • Example: ORA B
  • 68. 1010 1010=AAH 0001 0010=12H BEFORE EXECUTION AFTER EXECUTION 1011 1010=BAH CY AC CY 0 AC 0 ORA B A=A or R A AA A BA B 12 C B 12 C D E D E H L H L
  • 69. (7) Logical Instructions • ORA M • OR specified register with accumulator (A). • Store the result in accumulator. • Example: ORA M
  • 70. 0101 0101=55H 1011 0011=B3H BEFORE EXECUTION AFTER EXECUTION 1111 0111=F7H CY AC CY 0 AC 0 ORA M A=A or M B3 B3 A 55 2050H A F7 2050H H 20 L 50 H 20 L 50
  • 71. (8) Logical Instructions • ORI 8-bit data • OR 8-bit data with accumulator (A). • Store the result in accumulator. • Example: ORI 08H
  • 72. 1011 0011=B3H 0000 1000=08H BEFORE EXECUTION 1011 1011=BBH AFTER EXECUTION CY AC CY 0 AC 0 ORI 08H A B3 A=A or DATA(8) A BB
  • 73. (9) Logical Instructions • CMP Register • CMP M • Compare specified data in register or memory with accumulator (A). • Store the result in accumulator. • Example: CMP D or CMP M
  • 74. BEFORE EXECUTION A>R: CY=0,Z=0 AFTER EXECUTION A=R: CY=0,Z=1 CY Z A<R: CY=1,Z=0 CY 0 Z 0 A B8 A B8 B 10 C CMP D B C D B9 E A-R D B9 E H L H L BEFORE EXECUTION AFTER EXECUTION A>M: CY=0,Z=0 A=M: CY=0,Z=1 A<M: CY=1,Z=0 CY Z CY 0 Z 1 B8 B8 A B8 2050H A B8 2050H CMP M H 20 L 50 A-M H 20 L 50
  • 75. (10) Logical Instructions • CPI 8-bit data • Compare 8-bit immediate data with accumulator (A). • Store the result in accumulator. • Example: CPI 30H
  • 76. A>DATA: CY=0,Z=0 A=DATA: CY=0,Z=1 BEFORE EXECUTION A<DATA: CY=1,Z=0 AFTER EXECUTION CY Z CY 0 AC 0 CPI 30H A BA A-DATA A BA 1011 1010=BAH
  • 77. (11) Logical Instructions • STC • It sets the carry flag to 1. • Example: STC
  • 78. BEFORE EXECUTION AFTER EXECUTION CY 0 CY 1 STC CY=1
  • 79. (12) Logical Instructions • CMC • It complements the carry flag. • Example: CMC
  • 80. BEFORE EXECUTION AFTER EXECUTION CY 1 CY 0 CMC
  • 81. (13) Logical Instructions • CMA • It complements each bit of the accumulator. • Example: CMA
  • 82. (14) Logical Instructions • RLC • Rotate accumulator left • Each binary bit of the accumulator is rotated left by one position. • Bit D7 is placed in the position of D0 as well as in the Carry flag. • CY is modified according to bit D7. • Example: RLC.
  • 83. BEFORE EXECUTION CY B7 B6 B5 B4 B3 B2 B1 B0 AFTER EXECUTION B7 B6 B5 B4 B3 B2 B1 B0 B7
  • 84. (15) Logical Instructions • RRC • Rotate accumulator right • Each binary bit of the accumulator is rotated right by one • position. • Bit D0 is placed in the position of D7 as well as in the Carry flag. • CY is modified according to bit D0. • Example: RRC.
  • 85. BEFORE EXECUTION B7 B6 B5 B4 B3 B2 B1 B0 CY AFTER EXECUTION B0 B7 B6 B5 B4 B3 B2 B1 B0
  • 86. (16) Logical Instructions • RAL • Rotate accumulator left through carry • Each binary bit of the accumulator is rotated left by one position through the Carry flag. • Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0. • CY is modified according to bit D7. • Example: RAL.
  • 87. BEFORE EXECUTION CY B7 B6 B5 B4 B3 B2 B1 B0 AFTER EXECUTION B7 B6 B5 B4 B3 B2 B1 B0 CY
  • 88. (17) Logical Instructions • RAR • Rotate accumulator right through carry • Each binary bit of the accumulator is rotated left by one position through the Carry flag. • Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0. • CY is modified according to bit D7. • Example: RAR
  • 89. BEFORE EXECUTION B7 B6 B5 B4 B3 B2 B1 B0 CY AFTER EXECUTION CY B7 B6 B5 B4 B3 B2 B1 B0
  • 90. Concept of Subroutine • In 8085 microprocessor a subroutine is a separate program written aside from main program ,this program is basically the program which requires to be executed several times in the main program. • The microprocessor can call subroutine any time using CALL instruction. after the subroutine is executed the subroutine hands over the program to main program using RET instruction.
  • 91. Branching Instructions • The branch group instructions allows the microprocessor to change the sequence of program either conditionally or under certain test conditions. The group includes, • (1) Jump instructions, • (2) Call and Return instructions, • (3) Restart instructions,
  • 92. (1) Branching Instructions • JUMP ADDRESS • BEFORE EXECUTION AFTER EXECUTION PC JMP 2000H PC 2000 • Jump unconditionally to the address. • The instruction loads the PC with the address given within the instruction and resumes the program execution from specified location. • Example: JMP 200H
  • 93. Conditional Jumps Instruction Code Decription Condition For Jump JC Jump on carry CY=1 JNC Jump on not carry CY=0 JP Jump on positive S=0 JM Jump on minus S=1 JPE Jump on parity even P=1 JPO Jump on parity odd P=0 JZ Jump on zero Z=1 JNZ Jump on not zero Z=0
  • 94. (2) Branching Instructions • CALL address • Call unconditionally a subroutine whose starting address given within the instruction and used to transfer program control to a subprogram or subroutine. • Example: CALL 2000H
  • 95. Conditional Calls Instruction Code Description Condition for CALL CC Call on carry CY=1 CNC Call on not carry CY=0 CP Call on positive S=0 CM Call on minus S=1 CPE Call on parity even P=1 CPO Call on parity odd P=0 CZ Call on zero Z=1 CNZ Call on not zero Z=0
  • 96. (3) Branching Instructions • RET • Return from the subroutine unconditionally. • This instruction takes return address from the stack and loads the program counter with this address. • Example: RET
  • 97. BEFORE EXECUTION AFTER EXECUTION SP 27FD 00 SP 27FF 00 27FDH 27FDH PC PC 6200 27FEH 62 27FEH 62 RET 27FFH 27FFH
  • 98. (4) Branching Instructions • RST n • Restart n (0 to 7) • This instruction transfers the program control to a specific memory address. The processor multiplies the RST number by 8 to calculate the vector address. • Example: RST 6
  • 99. BEFORE EXECUTION AFTER EXECUTION SP-1 SP 3000 SP 2999 01 2FFEH 2FFEH PC 2000 PC 0030 2FFFH 20 RST 6 2FFFH 3000H 3000H ADDRESS OF THE NEXT INSTRUCTION IS 2001H
  • 100. Vector Address For Return Instructions Instruction Code Vector Address RST 0 0*8=0000H RST 1 0*8=0008H RST 2 0*8=0010H RST 3 0*8=0018H RST 4 0*8=0020H RST 5 0*8=0028H RST 6 0*8=0030H Rst 7 0*8=0038H
  • 101. (1) Control Instructions • NOP • No operation • No operation is performed. • The instruction is fetched and decoded but no operation is executed. • Example: NOP
  • 102. (2) Control Instructions • HLT • Halt • The CPU finishes executing the current instruction and halts any further execution. • An interrupt or reset is necessary to exit from the halt state. • Example: HLT
  • 103. (3) Control Instructions • RIM • Read Interrupt Mask • This is a multipurpose instruction used to read the status of interrupts 7.5, 6.5, 5.5 and read serial data input bit. • The instruction loads eight bits in the accumulator with the following interpretations. • Example: RIM
  • 105. • SIM • Set Interrupt Mask • This is a multipurpose instruction and used to implement the 8085 interrupts 7.5, 6.5, 5.5, and serial data output. • The instruction interprets the accumulator contents as follows. • Example: SIM