Problem – Write a program in 8086 microprocessor to find out the addition of two 8-bit BCD numbers, where numbers are stored from starting memory address 2000 : 500 and store the result into memory address 2000 : 600 and carry at 2000 : 601.
Example –

Algorithm –
- Load data from offset 500 to register AL (first number)
- Load data from offset 501 to register BL (second number)
- Add these two numbers (contents of register AL and register BL)
- Apply DAA instruction (decimal adjust)
- Store the result (content of register AL) to offset 600
- Set register AL to 00
- Add contents of register AL to itself with carry
- Store the result (content of register AL) to offset 601
- Stop
Program –
| MEMORY ADDRESS | MNEMONICS | COMMENT |
|---|---|---|
| 400 | MOV AL, [500] | AL<-[500] |
| 404 | MOV BL, [501] | BL<-[501] |
| 408 | ADD AL, BL | AL<-AL+BL |
| 40A | DAA | DECIMAL ADJUST AL |
| 40B | MOV [600], AL | AL->[600] |
| 40F | MOV AL, 00 | AL<-00 |
| 411 | ADC AL, AL | AL<-AL+AL+cy(prev) |
| 413 | MOV [601], AL | AL->[601] |
| 417 | HLT | END |
Explanation –
- MOV AL, [500]: load data from offset 500 to register AL
- MOV BL, [501]: load data from offset 501 to register BL
- ADD AL, BL: ADD contents of registers AL AND BL
- DAA: decimal adjust AL
- MOV [600], AL: store data from register AL to offset 600
- MOV AL, 00: set value of register AL to 00
- ADC AL, AL: add contents of register AL to AL with carry
- MOV [601], AL: store data from register AL to offset 601
- HLT: stop
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- 8086 program to add two 16 bit BCD numbers with carry
- 8086 program to subtract two 8 bit BCD numbers
- 8086 program to subtract two 16 bit BCD numbers
- 8086 program to convert an 8 bit BCD number into hexadecimal number
- 8086 program to convert 8 bit ASCII to BCD number
- 8086 program to convert 8 bit BCD number into ASCII Code
- 8086 program to add two 16-bit numbers with or without carry
- 8086 program to divide a 16 bit number by an 8 bit number
- 8086 program to reverse 8 bit number using 8 bit operation
- 8086 program to reverse 16 bit number using 8 bit operation
- 8086 program to subtract two 16-bit numbers with or without borrow
- 8086 program to multiply two 16-bit numbers
- 8086 program to multiply two 8 bit numbers
- 8085 program to add 2-BCD numbers
- 8085 program to convert 8 bit BCD number into ASCII Code
- 8085 program to convert an 8 bit BCD number into hexadecimal number
- 8086 program to find sum of digits of 8 bit number
- 8086 program to Print a 16 bit Decimal number
- 8086 program to convert a 16 bit decimal number to binary
- 8086 program to convert a 16 bit Decimal number to Octal
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

