Category Archives: DIVISION OF 8-BIT DATA

DIVISION OF 8-BIT DATA

To write an 8085 assembly language program to divide the two 8 bit numbers and to store the result in the memory location 8200H & 8201H.
ALGORITHM:
STEP 1: Load the B register with the data 1.
STEP 2: Load the C register with the data 2.
STEP 3: Move the data 00H to the register.
STEP 4: Move the contents of the B register to the accumulator.
STEP 5: Subtract the contents of B register with the accumulator.
STEP 6: If carry occurs then go to step 9.
STEP 7: Increment the contents of the D register.
STEP 8: Go to step 5 after incrementing the D register.
STEP 9: Add the contents of the C register with the accumulator.
STEP 10: Store the result in the memory location 8200H.
STEP 11: Move the contents of D register to the accumulator.
STEP 12: Store the quotient in memory location 8201H.
STEP 13: Stop the execution.
____________________________________________________________________________________________________
8085(4)