- Related Questions & Answers
- 8085 program to subtract two 8-bit numbers with or without borrow
- 8086 program to subtract two 16 bit BCD numbers
- 8086 program to add two 16-bit numbers with or without carry
- 8086 program to multiply two 16-bit numbers
- 8086 program to subtract two 8 bit BCD numbers
- 8086 program to add two 16 bit BCD numbers with carry
- 8085 program to add two 16 bit numbers
- 8085 program to divide two 16 bit numbers
- 8086 program to multiply two 8-bit numbers
- 8051 Program to Subtract two 8 Bit numbers
- 8085 Program to Subtract two 8 Bit numbers
- 8085 Program to multiply two 16-bit binary numbers
- 8086 program to add two 8 bit BCD numbers
- 8086 program to reverse 16 bit number using 8 bit operation
- Program to Subtract two 8 Bit numbers in 8085 Microprocessor

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this program we will see how to subtract two 16-bit numbers with and without borrow.

Write 8086 Assembly language program to subtract two 16-bit number stored in memory location 3000H – 3001H and 3002H – 3003H.

8086 is 16-bit register. We can simply take the numbers from memory to AX and BX register, then subtract them using SUB instruction. When the Borrow is present, the CY flag will be 1, so we can store borrow into memory, otherwise only store AX into memory.

Address | Data |
---|---|

… | … |

3000 | 2D |

3001 | FE |

3002 | AD |

3003 | BC |

… | … |

Address | Data |
---|---|

… | … |

3004 | 80 |

3005 | 41 |

3006 | 00 |

… | … |

Advertisements