DIV divides an unsigned dividend that is twice as wide as its single operand, the divisor. The registers are fixed:

DivisorDividendQuotientRemainder
byteAXALAH
wordDX:AXAXDX

The quotient is rounded down and the remainder is what is left over, so 200 ÷ 7 gives 28 remainder 4. There is no immediate form: DIV 10 does not exist, load the divisor into a register. A memory divisor needs BYTE PTR or WORD PTR when its size is not known.

Prints 28 4.
MOV AX, 200
XOR DX, DX ; DX:AX = 200: the high word must be 0
MOV BX, 7
DIV BX ; AX = 28, DX = 4
MOV CX, DX ; keep the remainder
AAM ; AH = tens, AL = ones
OR AX, 3030h ; both digits -> characters
MOV BX, AX
MOV DL, BH
MOV AH, 02h ; DOS: print DL
INT 21h
MOV DL, BL
MOV AH, 02h
INT 21h
MOV DL, ' '
MOV AH, 02h
INT 21h
MOV AL, CL
ADD AL, '0' ; digit -> character
MOV DL, AL
MOV AH, 02h ; DOS: print DL
INT 21h

Divide overflow

If the divisor is 0, or the quotient does not fit in AL (more than FFh) or AX (more than FFFFh), the CPU does not divide but raises interrupt 0. Under DOS this usually ends the program with a "Divide overflow" message. The classic cause is forgetting DX: a word DIV always divides the 32-bit DX:AX, so whatever was left in DX becomes part of the dividend. Clear it with XOR DX, DX before dividing a 16-bit number. The same goes for AH before a byte divide.

On the 8086 and 8088 the return address pushed for interrupt 0 points to the instruction after the DIV; from the 286 on it points at the DIV itself.

Flags

All six arithmetic flags are undefined afterwards. Test the quotient or remainder explicitly (OR AX, AX, CMP DX, 0) rather than reading ZF.

Printing a number in decimal

Repeated division by 10 yields the digits from the last one up. Push them, then pop them to print in the right order. This prints 12345:

MOV AX, 12345
MOV BX, 10
XOR CX, CX ; digit count
NEXT1:
XOR DX, DX
DIV BX ; AX = AX / 10, DX = last digit
PUSH DX
INC CX
OR AX, AX
JNZ NEXT1
PUT1:
POP DX
ADD DL, '0'
MOV AH, 02h
INT 21h
LOOP PUT1

Later CPUs

The 386 adds DIV ECX, dividing EDX:EAX. Dividing by a power of two is cheaper as a right shift (SHR).