|Description||Denormalize (floating to integer)|
|Affected||T, A, D|
DNZ is an assembly instruction. It converts the number in the floating point accumulator to a single precision fixed point number in the A register, using the scaling of the DNZ instruction as a scaling factor.
The scaling is given to the conversion of -128 to 127 (approximately 10-39 to 1039). -1 When converting to integers, a scaling factor of -1610 will give a fixed point number with the same value as the integer part of the floating point number. A larger scaling factor will result in a higher fixed point number on CPUs with 48-bit floating point units. On 32-bit floating point units a scaling factor of -1610 should always be used. Other values will not cause a different result but will affect the overflow test.
If the instruction causes underflow the A register will also be cleared.
If the resulting integer has an absolute value larger than 32767 overflow occurs and the error flag (Z) is set to one.
Internally the original floating point value will be truncated, and negative numbers will be converted to positive numbers before conversion, the result converted back to a negative number.
- DNZ-20 (code 152360) Convert from floating point, scaling factor -1610.
T-A-D value of 3.14 will result in A = 3
DNZ on 32-bit floating point CPUs
The ND-100/110 can have a 48-bit floating point CPU (standard configuration) or a 32-bit floating point CPU (customer option). For 32-bit floating point operations DNZ works as described above, except that the T register is not used or affected. On 32-bit floating point hardware only scaling factors of -1610 should be used.