Skip to main content
Q. Write a program for absolute division of two numbers. Assume that the numbers are in
register B and C, and the result is to be displayed at output device 50H.

MVI B, 12H
MVI C, 03H
MVI D, 00H
MOV A, B
LABEL: INR D
SUB C
JNZ LABEL
MOV A, D
OUT 50H
HLT

Comments