draw a flowchart and an assembly language program for performing a division of two 8 bit numbers stored in a memory locations 5200 H and 5201 h further display the remainder in Port 1.
Answers
Answered by
1
Here we will see 8085 program. This program will divide two 8-bit numbers using 8085 microprocessor.
Problem Statement −
Write an 8085 Assembly language program to divide two 8-bit numbers and store the result at locations 8020H and 8021H.
Discussion −
The 8085 has no division operation. To get the result of division, we should use the repetitive subtraction method.
By using this program, we will get the quotient and the remainder. 8020H will hold the quotient, and 8021H will hold remainder.
We are saving the data at location 8000H and 8001H. The result is storing at location 8050H and 8051H.
Input
The Dividend: 0EH
The Divisor 04H
The Quotient will be 3, and remainder will be 2
Flow Diagram
Attachments:
Similar questions