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
0 Comments