Difference between revisions of "83Plus:BCALLs:40C0"

From WikiTI
Jump to: navigation, search
m (moved cycles from output and capitalized name in categories)
Line 1: Line 1:
[[Category:83Plus:BCALLs:By Name:FP_Math|cos]] [[Category:83Plus:BCALLs:By Name|cos]] [[Category:83Plus:BCALLs:By Address|40C0 - cos]]
+
[[Category:83Plus:BCALLs:By Name:FP_Math|Cos]] [[Category:83Plus:BCALLs:By Name|Cos]] [[Category:83Plus:BCALLs:By Address|40C0 - Cos]]
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' Cos
 
'''Official Name:''' Cos
Line 12: Line 12:
 
=== Outputs ===
 
=== Outputs ===
 
* [[83Plus:RAM:8478|OP1]] = cosine of OP1
 
* [[83Plus:RAM:8478|OP1]] = cosine of OP1
* Approx. TStates: 150,000 to 200,000
 
  
 
=== Destroys ===
 
=== Destroys ===
Line 18: Line 17:
 
* OP1-OP5
 
* OP1-OP5
  
 
+
== Notes ==
 +
Takes approximately 150,000 to 200,000 clock cycles.
  
 
== Example ==
 
== Example ==
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
 
  <nowiki>B_CALL OP1Set3  ;OP1=floating point 3
 
B_CALL cos  ;returns with OP1=-0.9899924...</nowiki>
 
B_CALL cos  ;returns with OP1=-0.9899924...</nowiki>

Revision as of 14:11, 20 February 2006

Synopsis

Official Name: Cos

BCALL Address: 40C0

Computes the cosine of OP1 and returns the result in OP1.

Inputs

  • OP1 = floating point

Outputs

  • OP1 = cosine of OP1

Destroys

  • AF, BC, DE, HL
  • OP1-OP5

Notes

Takes approximately 150,000 to 200,000 clock cycles.

Example

B_CALL OP1Set3  ;OP1=floating point 3
B_CALL cos  ;returns with OP1=-0.9899924...