Difference between revisions of "83Plus:BCALLs:4087"

From WikiTI
Jump to: navigation, search
 
Line 5: Line 5:
 
'''BCALL Address:''' 4087
 
'''BCALL Address:''' 4087
  
Adjusts op1 to normalized floating point form.
+
Adjusts op1 to normalized floating point form and rounds to the 14th digit.  
  
 
=== Inputs ===
 
=== Inputs ===
Line 20: Line 20:
  
 
== Example ==
 
== Example ==
Suppose op1 = 00h,80h,01h,23h,45h... After calling this BCALL, op1 = 00h,7Fh,12h,34h
+
Suppose op1=00h,80h,01h,23h,45h,55h,55,55h,55h,55h.  
 +
After calling this BCALL, op1=00h,7Fh,12h,34h,55h,55h,55h,55h,56h,00h

Revision as of 20:57, 30 March 2005

Synopsis

Official Name: LJRND

BCALL Address: 4087

Adjusts op1 to normalized floating point form and rounds to the 14th digit.

Inputs

  • op1 = floating point, not necessarily normalized

Outputs

  • op1 = normalized floating point

Registers Destroyed

  • A, C, HL

Comments

This shifts all digits in the mantissa of the floating point in op1 leftward if there are any leading zeros in the mantissa. The exponent is adjusted appropriately after the shift.

Example

Suppose op1=00h,80h,01h,23h,45h,55h,55,55h,55h,55h. After calling this BCALL, op1=00h,7Fh,12h,34h,55h,55h,55h,55h,56h,00h