Bcdsub - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Direct Floating Point Operations

bcdsub

Declaration:
BCD16 bcdsub (BCD16 a , BCD16 b )
Category(ies):
Direct Floating Point Operations
Description:
Calculate the difference between two TI binary-code decimal floating-point
numbers. This routine performs the same function as the C "-" operator on
BCD16 values. This routine is provided as a convenience for assembly
language programs.
Inputs:
a , b — Two BCD16 numbers to subtract.
Outputs:
Returns a - b as a BCD16 number.
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, bcdbcd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdneg
Example:
bcdresult
= -10
a
= -20
b
= -30
diff
= -40
.
.
.
move.l
move.l
move.w
move.l
move.l
move.w
move.l
jsr
lea
; BCD16 routine value is always at –10(a6)
move.l
move.l
move.w
TI-89 / TI-92 Plus Developer Guide
b(a6),-(sp)
b+4(a6),-(sp)
b+8(a6),-(sp)
a(a6),-(sp)
a+4(a6),-(sp)
a+8(a6),-(sp)
bcdsub(a2),a0
(a0)
20(sp),sp
bcdresult(a6),diff(a6)
bcdresult+4(a6),diff+4(a6)
bcdresult+8(a6),diff+8(a6)
Not for Distribution
;push b (a 10-byte BCD16 value)
;push a
;assumes a2 -> jump table
;call bcdsub(a, b)
;pop parameters
381
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents