Difference between revisions of "83Plus:BCALLs:408D"

From WikiTI
Jump to: navigation, search
(Synopsis)
m (Formatting)
 
Line 21: Line 21:
 
== Example ==
 
== Example ==
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
B_CALL InvOP1S  ;returns with OP1=-3
+
B_CALL InvOP1S  ;returns with OP1=-3</nowiki>
</nowiki>
+

Latest revision as of 07:26, 26 April 2005

Synopsis

Official Name: InvOP1S

BCALL Address: 408D

Negates the floating point number in OP1.

Inputs

  • OP1 = floating point number

Outputs

  • OP1 = -OP1

Registers Destroyed

  • AF

Comments

This routine inverts the sign bit of OP1 unless it is a floating point zero. If the value in OP1 is a floating point zero, then the sign bit is not inverted.

Example

B_CALL OP1Set3  ;OP1=floating point 3
B_CALL InvOP1S  ;returns with OP1=-3