ASM program to add two 8 bit numbers using 8085

AIM: To perform addition of two 8 bit numbers using 8085.


  1. Start the program by loading the first data into Accumulator.
  2. Move the data to a register (B register).
  3. Get the second data and load into Accumulator.
  4. Add the two register contents.
  5. Check for carry.
  6. Store the value of sum and carry in memory location.
  7. Terminate the program.


      MVI C, 00 ;Initialize C register to 00
      LDA 4150  ;Load the value to Accumulator.
      MOV B, A  ;Move the content of Accumulator to B register.
      LDA 4151  ;Load the value to Accumulator.
      ADD B     ;Add the value of register B to A
      JNC LOOP  ;Jump on no carry.
      INR C     ;Increment value of register C
LOOP: STA 4152  ;Store the value of Accumulator (SUM).
      MOV A, C  ;Move content of register C to Acc.
      STA 4153  ;Store the value of Accumulator (CARRY)
      HLT       ;Halt the program.


Input:80 (4150)

80 (4251)
Output:00 (4152)

01 (4153)


Thus the program to add two 8-bit numbers were executed.

Editorial Team
Editorial Team

We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.