78h UT$UDIV unsigned integer division
Input X register - Numerator.
D register - Denominator.
Output X register - Quotient.
D register - Remainder.
UTW_S2 - Quotient (a copy of X).
Description

2-byte by 2-byte unsigned integer division routine.

Divides X by D, putting the quotient into X and also into UTW_S2, and X modulo D into D.

Does not check for division by zero, which will cause an infinite loop.

Example
        LDD     UNSIGNED_DENOMINATOR
        BEQ     ERROR           ; divide by zero not checked for in UT$SDIV
        LDX     UNSIGNED_NUMERATOR
        OS      UT$UDIV
        STX     QUOTIENT
        STD     REMAINDER
Errors - none -