5.86. Convert 16-Bit Integer to Floating Point


Addr
Mode  Mnemonic          Format/Opcode
                           8      4      4
                        ----------------------
R     FLT  RA,RB        |  E9  |  RA  |  RB  |
                        ----------------------

Description. The integer Derived Operand, DO (i.e., the contents of register RB), is converted to Single Precision floating point format and stored in register RA and RA+1. The condition status, CS, is set based on the results in RA and RA+1. The operation process is as follows: The exponent is initially considered to be 0F16. The integer value in RB is normalized, i.e., the number is left shifted and the exponent decremented for each shift until the sign bit and the next MSB are unequal, and the exponent and mantissa stored in the proper fields of RA and RA+1.

Note: RA may equal RB.

Register Transfer Description.

EA <-- 0, MA <-- 0, exit, if (RB) = 0;
EA <-- 0F16;
MA <-- (RB);
EA, MA <-- normalize EA, MA;
(CS) <-- 0010  if (RA,RA+1) = 0;
(CS) <-- 0001  if (RA,RA+1) < 0;
(CS) <-- 0100  if (RA,RA+1) > 0;



Registers Affected. RA, RA+1, CS