Bcdmul - 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

bcdmul

Declaration:
BCD16 bcdmul (BCD16 a , BCD16 b )
Category(ies):
Direct Floating Point Operations
Description:
Calculate the product of 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 multiply.
Outputs:
Returns 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, bcdbcd, bcdcmp, bcddiv, bcdlong, bcdneg, bcdsub
Example:
bcdresult
= -10
a
= -20
b
= -30
prod
= -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 as a BCD16 number.
b(a6),-(sp)
b+4(a6),-(sp)
b+8(a6),-(sp)
a(a6),-(sp)
a+4(a6),-(sp)
a+8(a6),-(sp)
bcdmul(a2),a0
(a0)
20(sp),sp
bcdresult(a6),prod(a6)
bcdresult+4(a6),prod+4(a6)
bcdresult+8(a6),prod+8(a6)
Not for Distribution
;push b (a 10-byte BCD16 value)
;push a
;assumes a2 -> jump table
;call bcdmul(a, b)
;pop parameters
379
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