Texas Instruments TI89 Developer Guide - Page 416
bcdbcd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdneg, bcdsub, Two BCD16 numbers to add together.
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 416 highlights
374 Appendix A: System Routines - Direct Floating Point Operations bcdadd Declaration: BCD16 bcdadd (BCD16 a, BCD16 b) Category(ies): Direct Floating Point Operations Description: Add 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 add together. 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: bcdbcd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdneg, bcdsub Example: bcdresult a b sum = -10 = -20 = -30 = -40 . . . move.l b(a6),-(sp) ;push b (a 10-byte BCD16 value) move.l b+4(a6),-(sp) move.w b+8(a6),-(sp) move.l a(a6),-(sp) ;push a move.l a+4(a6),-(sp) move.w a+8(a6),-(sp) move.l bcdadd(a2),a0 ;assumes a2 -> jump table jsr (a0) ;call bcdadd(a, b) lea 20(sp),sp ;pop parameters ; BCD16 routine value is always at -10(a6) move.l bcdresult(a6),sum(a6) move.l bcdresult+4(a6),sum+4(a6) move.w bcdresult+8(a6),sum+8(a6) TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/416.png)