Skip to main content

Arithmetic Group Instruction Set of 8085 Microprocessor | ADD, ADC, ACI, ADI, DAD, SUB, SBB, SUI, DCR, INR, INX, DCX instruction

Arithmetic Group of 8085 Microprocessor

    • ADD r
      • The data in Accumulator and entered register will get added and the result will copy to Accumulator
                                    Example - ADD B
                                                    (A) + (B)  ⇢   (A)    
    • ADD M
      • The data in Accumulator and data in the memory location pointed by HL pair will get added and the result will copy to Accumulator.
                                Example - ADD M
                                                    (A) + ((H-L)) ⇢  (A)
    • ADC M
      • The data in Accumulator, data in the memory location pointed by HL pair and value of Carry Bit will get added and the result will copy to Accumulator.
                                Example - ADC M
                                                  (A) + ((H-L)) + (CS) ⇢ (A)
    • ADC r
      • The data in Accumulator, data in entered register and value of Carry Bit will get added and the result will copy to Accumulator.
                                Example -  ADC B
                                                   (A) + (B) + (CS) ⇢ (A)
    • ACI data
      • The data in Accumulator, entered data and value of carry bit will get added and the result will copy to Accumulator.
                                Example - ACI 06
                                                    (A) + (06) + (CS) ⇢ (A)
    • ADI data
      • The data in Accumulator, entered data will get added and the result will copy to Accumulator.
                                Example  - ADI 06
                                                    (A) + (06) ⇢ (A)
    • DAD rp
      • The data in the memory location pointed by entered register pair and data in the memory location pointed by HL pair will get added and the result will copy to the memory location pointed by HL pair
                                Example - DAD B
                                                  ((B-C)) + ((H-L))⇢ ((H-L)) 
    • SUB r
      • The data in Accumulator and entered register will get subtracted and the result will copy to Accumulator
          Example - SUB C
                             (A) - (C)  ⇢   (A)    
    • SUB M
      • The data in Accumulator and data in the memory location pointed by HL pair will get subtracted and the result will copy to Accumulator.
          Example - SUB M
                            (A) - ((H-L)) ⇢  (A)
    • SBB M 
      • The data in Accumulator, data in the memory location pointed by HL pair and value of Carry Bit will get subtracted and the result will copy to Accumulator.
        Example - SBB M
                          (A) - ((H-L)) - (CS) ⇢ (A)
    • SBB r 
      • The data in Accumulator, entered data and value of carry bit will get subtracted and the result will copy to Accumulator.
          Example - SBB 07
                            (A) - (07) - (CS) ⇢ (A)
    • SUI data 
      • The data in Accumulator, entered data will get subtracted and the result will copy to Accumulator.
          Example - SUI 06
                            (A) - (06)  ⇢ (A)
    • SBI data 
      • The data in Accumulator, entered data and value of carry bit will get added and the result will copy to Accumulator.
      •   Example - SBI 06
                            (A) - (06) - (CS) ⇢ (A)
    • DCR r
      • This instruction is to decrease the value of entered register by 1.
                                Example - DCR B         
                                                   (B) - 1 ⇢ (B)
    • DCR M
      • This instruction is to decrease the value at the memory location pointed by HL pair by 1.
                               Example - DCR M
                                                  ((H-L)) -1 ⇢ ((H-L))    
    • INR r
      • This instruction is to increase the value of entered register by 1.
       Example - INR B         
                         (B) + 1 ⇢ (B)                          
    • INR M
      • This instruction is to increase the value at the memory location pointed by HL pair by 1.
                                Example -  INR M
                                                    ((H-L)) + 1 ⇢  ((H-L))
    • INX rp
      • This instruction is to increase the data in the memory location pointed by the entered register pair by 1.
                                Example - INX B
                                                   ((B-C)) + 1 ⇢  ((B-C))
    • DCX rp
      • This instruction is to decrease the data in the memory location pointed by the entered register pair by 1.
                                Example - DCX D
                                                   ((D-E)) - 1 ⇢  ((D-E))

Comments

Popular posts from this blog

Instruction Set and their types, Functions with examples and Addressing Models of 8085 Microprocessor

Instruction Set of 8085 Microprocessor An instruction is a command given to the computer to perform a specified operation on the given data. In 8085 microprocessor, the instructions are classified into five (5) groups. They are, Data Transfer Group  Arithmetic Group Logical Group Branch Control Group I/O and Machine Control Group Addressing Models: Each instruction requires certain data on which it has to operate. In Intel 8085 Microprocessor, there are 4 types of addressing mode. More on Addressing Models>>> Data Transfer Group MOV r1, r2 This means the data of register - 2 will move to register - 1                                         Example - MOV A, B MOV r, M This means the data stored in ((H - L)) will move to the specified register.                   ...

Logical Group Instruction Set of 8085 Microprocessor | ANA, ANI, ORA, ORI, XRA, XRI, CMA, CMC, STC, CMP, RLC, RAL, RRC, RAR instruction examples

Logical Group These Logical group instructions are used in the 8085 Microprocessor program. In this article, you would get the instructions with example. In some sections, referring images are also provided to make your understanding crystal clear. ANA r Here the data of r AND (Logical AND) with the data of Accumulator and the result will store in Accumulator.                                  Example -   ANA B                                                      (B) ⋀ (A) ⟶ (A)                                          ...