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

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)                                          ...

Pin Diagram of 8085A Microprocessor and working functions of each pin (Study Notes)

Pin Diagram of 8085A Microprocessor  Diagram: Pin Diagram of 8085 Microprocessor Functional of Each Pin (Briefly): πŸ‘‰A 8 – A 15 (Output): These are address bus and used for the eight most significant bits of the memory address or eight bits i/o address. πŸ‘‰ AD 0 – AD 7   (Both Input and Output): Thses are time multiplexed address/data bus that is served dual purpose. They are used for the LSB (Least Significant Bits) 8 bits of memory address and data during other time. πŸ‘‰ALE (Output): It is abbreviated as Address Latch Enable. It goes high when 8 lower bits of address is latched. πŸ‘‰IO/M* (Output): It is a status signal which distinguishes whether the address is for i/o or memory. When it goes high, the address bus is for an i/o device. And when it goes low, the address is for memory location because M is an active low signal. πŸ‘‰S 0 , S 1 (Ouput): These are status signal send by microprocessor to distinguish various types of operation. S 0 S 1 O...