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

From WikiTI
Jump to: navigation, search
(Synopsis)
m (Linked OP2)
 
Line 12: Line 12:
 
=== Outputs ===
 
=== Outputs ===
 
* OP1 = OP1^2
 
* OP1 = OP1^2
* OP2 = orginal value of OP1
+
* [[83Plus:RAM:8483|OP2]] = orginal value of OP1
  
 
=== Registers Destroyed ===
 
=== Registers Destroyed ===
Line 19: Line 19:
 
== Example ==
 
== Example ==
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
B_CALL FPSquare  ;returns with OP1=floating point 9
+
B_CALL FPSquare  ;returns with OP1=floating point 9</nowiki>
</nowiki>
+

Latest revision as of 15:29, 27 March 2006

Synopsis

Official Name: FPSquare

BCALL Address: 4081

Raises the floating point number in OP1 to the second power and stores the result in OP1.

Inputs

  • OP1 = floating point number

Outputs

  • OP1 = OP1^2
  • OP2 = orginal value of OP1

Registers Destroyed

  • AF, BC, DE, HL, OP3

Example

B_CALL OP1Set3  ;OP1=floating point 3
B_CALL FPSquare  ;returns with OP1=floating point 9