A group of functions for testing and changing the sign of an fp number.
When FACCUM is non-zero, RST FTestSign jumps here to get the sign as an integer : 0x01 for positive, 0xFF for negative.
|Load A with the most-significant byte of FACCUM, the top-most bit of which holds the sign. Then we LXI into SignToInt.|
Inverts the sign byte in A before falling into SigntoInt.
|Simply invert A.|
Converts the sign byte in A to 0x01 for positive, 0xFF for negative.
|Get bit 7 into carry flag and subtract from itself with carry. If A was +ve then it is now 0, whereas if A was -ve then A is now FF.|
|Return if A is FF, otherwise return with A=1.|
Returns an integer that indicates FACCUM's sign. We do this by a simple call to FTestSign which gets the answer in A, then fall into FCharToFloat to get that answer back into FACCUM.
|Get FACCUM's sign in A. A will be 0x01 for positive, 0 for zero, and 0xFF for negative.|
Converts the signed byte in A to a floating-point number in FACCUM..
|Get the char value in A as an unnormlised floating-point number.|
|09E5||0688||FCharToFloat||MVI B,88||ie 2^8|
|]Set FACCUM's exponent to 2^8, in preparation for a jump into FNormalise.|
|Set FTEMP to 0x80, another preparation step for FNormalise.|
|Get sign into carry flag and jump to FNormalise.|
FACCUM = |FACCUM|.
|Return if FACCUM is already positive, otherwise fall into FNegate to make it positive.|
Negate FACCUM's sign, ie FACCUM = -FACCUM.