8085 Programming: 8 BIT DIVISION



8085 Programming








      LHLD 2501

      LDA 2503

      MOV B,A

      MVI C,08



LOOP:   DAD H

     MOV A,H

     SUB B

     JC AHEAD

     MOV H,A

     INR L



AHEAD: DCR C

      JNZ LOOP

      SHLD 2504

      HLT







INPUT:



LSB OF DIVIDEND - 9BH, MSB OF DIVIDEND - 48H , DIVISOR - 1AH







ANSWER

AT ADDRESS 2504 - F2H, QUOTIENT

AT ADDRESS 2505 - 07H, REMAINDER





Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C