Appendix A: System Routines — Direct Floating Point Operations
375
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
bcdbcd
Declaration:
BCD16
bcdbcd
(long
a
)
Category(ies):
Direct Floating Point Operations
Description:
Convert an integer to BCD16 floating point. This routine performs the same
function as the C cast operator “(BCD16)” on a long integer value. This
routine is provided as a convenience for assembly language programs.
Inputs:
a
— A long integer.
Outputs:
Returns the BCD16 floating point equivalent of
a
.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: bcdadd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdneg, bcdsub
Example:
bcdresult = -10
bcda = -20
a = -24
.
.
.
move.l a(a6),-(sp) ;push a (a long integer)
move.l bcdbcd(a2),a0 ;assumes a2 -> jump table
jsr (a0) ;call bcdbcd(a)
addq.l #4,sp ;pop parameters
; BCD16 routine value is always at –10(a6)
move.l bcdresult(a6),bcda(a6)
move.l bcdresult+4(a6),bcda+4(a6)
move.w bcdresult+8(a6),bcda+8(a6)