83Plus:BCALLs:4060

From WikiTI
Revision as of 08:15, 21 April 2005 by Dan Englender (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 OP11=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,...