.th LDIV III 5/31/77 .sh NAME ldiv, lrem \*- long division .sh SYNOPSIS \f3ldiv \fP(hidividend, lodividend, divisor) .s3 \f3lrem \fP(hidividend, lodividend, divisor) .sh DESCRIPTION The concatenation of the signed 16-bit .it hidividend and the unsigned 16-bit .it lodividend is divided by .it divisor. The 16-bit signed quotient is returned by .it ldiv and the 16-bit signed remainder is returned by .it lrem. Divide check and erroneous results will occur unless the magnitude of the divisor is greater than that of the high-order dividend. .s3 An integer division of an unsigned dividend by a signed divisor may be accomplished by .s3 quo = ldiv(0, dividend, divisor); .s3 and similarly for the remainder operation. .s3 Often both the quotient and the remainder are wanted. Therefore .it ldiv leaves a remainder in the external cell .it ldivr. .sh BUGS No divide check check.