Function Name
DSdiv
Purpose
Signed 16 bit by 16 bit division.
Call Address
$C16C
Input
Y - The address of the 16 bit divisor.
X - The address of the 16 bit dividend.
Output
X - The address of the 16 bit quotient.
R8 - $12-$13 - The 16 bit remainder.
Description
This routine is one of the GEOS math routines. X and Y each have the address of a term in the division. Both terms are made positive with Dabs. Ddiv is then called; if the result of the division should be negative, DNegate is called. The quotient is stored in place of the original dividend that X pointed to. The divisor is left untouched. The remainder is always a positive integer.


