83Plus:BCALLs:4060

From WikiTI
Revision as of 20:31, 20 April 2005 by Woozle (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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,...