83Plus:BCALLs:4060

From WikiTI
Revision as of 04:31, 21 April 2005 by Woozle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
[[Category:83Plus:BCALLs:By Name|Trunc] 

Synopsis

Official Name: Trunc

BCALL Address: 4060

Truncates the fractional part of a floating point number in op1.

Inputs

  • op1 = floating point number

Outputs

  • op1 = integer part of floating point number

Registers Destroyed

  • AF, BC, DE, HL

Comments

This is similar to the BASIC function int().

Example

Suppose op1=00h,80h,28h,00h,... After B_CALL Trunc, op1=00h,80h,20h,00h,...

Suppose op1=00h,7Fh,20h,00h,... After B_CALL Trunc, op1=00h,80h,00h,00h,...