TI-89 / TI-92 Plus Developer Guide
Beta Version .02
Important information
Texas Instruments makes no warranty, either expressed or implied, including but not
limited to any implied warranties of merchantability and fitness for a particular purpose,
regarding any programs or book materials and makes such materials available solely on
an “as-is” basis.
In no event shall Texas Instruments be liable to anyone for special, collateral, incidental,
or consequential damages in connection with or arising out of the purchase or use of
these materials, and the sole and exclusive liability of Texas Instruments, regardless of
the form of action, shall not exceed the purchase price of this product. Moreover, Texas
Instruments shall not be liable for any claim of any kind whatsoever against the use of
these materials by any other party.
The latest version of this Guide, along with all other up-to-date information for
developers, is available at www.ti.com/calc/developers/.
© 2000, 2001 Texas Instruments Incorporated
,
TI-GRAPH LINK, and TI
Sierra C is a trademark of Sierra Systems.
FLASH
Studio are trademarks of Texas Instruments Incorporated.
Table of Contents
1. Introduction ..............................................................................................1
1.1. Purpose of this Guide...........................................................................................1
1.2. Chapter Layout.....................................................................................................1
1.3. Conventions Used in this Guide...........................................................................3
2. The 68000 TI AMS Operating System Overview......................................5
3. The TI-89 / TI-92 Plus Hardware Overview..............................................7
3.1. Overview..............................................................................................................7
3.2. Memory Map........................................................................................................8
3.2.1. Vector Table...........................................................................................................9
i
3.3. ASIC registers....................................................................................................11
4. User Interface Overview.........................................................................15
4.1. Windows.............................................................................................................15
4.2. Menus ................................................................................................................16
4.2.1. Toolbars................................................................................................................17
4.2.2. Pop-ups................................................................................................................17
4.2.2.1. Static Pop-ups.........................................................................................17
4.2.2.2. Dynamic Pop-ups....................................................................................18
4.2.2.3. Dynamic Pop-ups with Menu Features....................................................18
4.3. Dialog Boxes......................................................................................................18
4.4. Fonts..................................................................................................................19
4.5. The Status Line..................................................................................................22
5. Flash Applications vs. ASM Programs...................................................23
6. Assembly Language Programming Overview ........................................25
6.1. What are ASM Programs? .................................................................................25
6.2. Hardware Stack..................................................................................................25
6.3. Register Usage ..................................................................................................25
6.4. Calling Flash-ROM-Resident Routines ..............................................................26
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
ii
Table of Contents
6.5. Subroutine Linkage............................................................................................27
6.6. Sample ASM Program .......................................................................................29
7. Flash Application Layout........................................................................31
7.1. File Format.........................................................................................................31
7.1.1. Flash Header........................................................................................................31
7.1.2. Certificate Header.................................................................................................32
7.1.3. Application Header...............................................................................................33
7.1.3.1. Magic Number.........................................................................................33
7.1.3.2. Internal Application Name .......................................................................33
7.1.3.3. Flags........................................................................................................34
7.1.3.4. Length of Data Segment..........................................................................34
7.1.3.5. Byte Offset to Code Segment..................................................................34
7.1.3.6. Byte Offset to Initial Data Table...............................................................34
7.1.3.7. Length of Initial Data Table......................................................................35
7.1.3.8. Optional Header ......................................................................................35
7.1.4. Relocation Map.....................................................................................................35
7.1.5. Application Code ..................................................................................................35
7.1.6. Initial Data Table...................................................................................................35
7.1.7. Signature..............................................................................................................36
7.2. Layout in Memory...............................................................................................36
7.3. Source Layout....................................................................................................38
7.3.1. Interactive Applications.........................................................................................38
7.3.1.1. FRAME....................................................................................................39
7.3.1.2. Pointer to FRAME....................................................................................40
7.3.1.3. Object Frame Attributes...........................................................................40
7.3.1.3.1. Attribute OO_APP_FLAGS (0x1).........................................................40
7.3.1.3.2. Attribute OO_APP_NAME (0x2)..........................................................41
7.3.1.3.3. Attribute OO_APP_TOK_NAME (0x3).................................................41
7.3.1.3.4. Method OO_APP_PROCESS_EVENT (0x4)......................................41
7.3.1.3.5. Attribute OO_APP_DEFAULT_MENU (0x5) .......................................42
7.3.1.3.6. Attribute OO_APP_DEFAULT_MENU_HANDLE (0x6).......................42
7.3.1.3.7. Attribute OO_APP_EXT_COUNT (0x7)...............................................42
7.3.1.3.8. Attribute OO_APP_EXTENSIONS (0x8).............................................42
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
7.3.1.3.9. Attribute OO_APP_EXT_ENTRIES (0x9)............................................42
7.3.1.3.10. Method OO_APP_LOCALIZE (0xA)..................................................43
7.3.1.3.11. Method OO_APP_UNLOCALIZE (0xB).............................................43
7.3.1.3.12. Method OO_APP_CAN_DELETE (0xC)............................................43
7.3.1.3.13. Method OO_APP_CAN_MOVE (0xD)...............................................43
7.3.1.3.14. Method OO_APP_VIEWER (0xE).....................................................44
7.3.1.3.15. Attribute OO_APP_ICON (0xF).........................................................44
7.3.1.3.16. Method OO_APP_EXT_HELP (0x10) ...............................................44
7.3.1.3.17. Method OO_APP_NOTICE_INSTALL (0x11)....................................44
7.3.1.3.18. Method OO_APP_ABOUT (0x12) .....................................................44
7.3.1.3.19. Attribute OO_APPSTRING (0x1000 and up).....................................45
7.3.1.4. Example...................................................................................................45
7.3.2. TI-BASIC Extensions............................................................................................48
7.3.3. Shared-Code Library............................................................................................51
iii
7.3.3.1. Creating the Library Interface..................................................................51
7.3.3.2. Accessing a Library.................................................................................53
7.3.3.3. Frame Description Language..................................................................53
7.3.4. Language Localization..........................................................................................56
7.3.4.1. Localizer Template..................................................................................56
7.3.4.2. How Localization Works ..........................................................................60
8. Integrating a Flash Application...............................................................63
8.1. Mode Settings....................................................................................................63
8.1.1. Mode Notification Flags........................................................................................63
8.1.1.1. Modifying Mode Settings Within an App..................................................64
8.1.1.2. MO_option Array and Settings ................................................................64
8.2. Switching to the Home Screen...........................................................................66
8.3. Catalog...............................................................................................................67
8.3.1. Built-in Functions and Commands........................................................................67
8.3.2. User-Defined Functions and Programs................................................................67
8.3.3. Flash App Extensions...........................................................................................69
8.4. Interfacing with TI-BASIC...................................................................................70
8.5. Verifying the OS Version....................................................................................74
8.6. Optimizing Code Space .....................................................................................75
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
iv
Table of Contents
8.7. VAR-LINK...........................................................................................................76
9. Application Control Flow.........................................................................77
9.1. Event-Driven Architecture ..................................................................................77
9.2. Event Structure Layout.......................................................................................78
9.3. Commands.........................................................................................................79
9.4. Starting and Stopping an Application.................................................................84
9.5. Keyboard Events................................................................................................85
9.6. Menu Processing ...............................................................................................85
9.6.1. Static Menus.........................................................................................................86
9.6.2. Dynamic Menus....................................................................................................87
9.7. Paint Events.......................................................................................................88
9.8. Background Events............................................................................................88
9.9. Default Event Handler........................................................................................88
9.9.1. CM_KEY_PRESS.................................................................................................88
9.9.2. CM_PASTE_STRING...........................................................................................91
9.9.3. CM_PASTE_HANDLE..........................................................................................92
9.9.4. CM_STO...............................................................................................................92
9.9.5. CM_RCL...............................................................................................................92
9.9.6. CM_DEACTIVATE ...............................................................................................92
9.9.7. CM_ACTIVATE ....................................................................................................92
9.10. Installing, Moving, and Deleting an Application................................................92
10. Error Handling......................................................................................95
10.1. Throwing an Error..........................................................................................95
10.2. Delayed Error Messages ...............................................................................95
10.3. Throwing Your Own Errors ............................................................................96
10.4. Catching Errors..............................................................................................97
10.5. Cleaning Up...................................................................................................97
10.6. Caveats..........................................................................................................98
10.6.1. Jumping Out of TRY Blocks..........................................................................98
10.6.2. Referencing Auto Variables in ONERR/FINALLY Blocks..............................99
10.6.3. Where Not to Throw Errors ...........................................................................99
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
11. Creating the User Interface................................................................101
11.1. Common Screen Components.....................................................................101
11.1.1. Screen/Window Regions and Coordinates..................................................101
11.1.2. BITMAP.......................................................................................................102
11.1.3. ICON ...........................................................................................................102
11.2. Windows ......................................................................................................102
11.2.1. Window Regions and Coordinates..............................................................103
11.2.2. Window Routines ........................................................................................104
11.3. Menus..........................................................................................................105
11.3.1. Menu-Draw Structure..................................................................................106
11.3.2. Menu IDs.....................................................................................................106
11.3.3. Menu Routines............................................................................................106
11.4. Dialog Boxes................................................................................................108
v
11.4.1. Dialog Routines...........................................................................................108
11.4.2. Dialog Fields................................................................................................109
11.4.2.1. Field Index ...............................................................................................109
11.4.2.2. DYNPOPUP.............................................................................................109
11.4.2.3. EDIT_FIELD.............................................................................................109
11.4.2.4. HEADER..................................................................................................110
11.4.2.5. HEDIT......................................................................................................110
11.4.2.6. HPOPUP..................................................................................................110
11.4.2.7. MENU ......................................................................................................110
11.4.2.8. POPUP ....................................................................................................111
11.4.2.9. SCROLL_REGION ..................................................................................111
11.4.2.10. TEXT......................................................................................................112
11.4.2.11. XFLAGS.................................................................................................112
11.4.3. Dialog Flags ................................................................................................113
11.4.4. Dialog Call-Backs........................................................................................114
11.5. Resource Compiler......................................................................................115
11.5.1. DIALOG Boxes............................................................................................117
11.5.2. MENUs........................................................................................................118
11.5.3. POPUPs......................................................................................................119
11.6. Example.......................................................................................................120
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
vi
Table of Contents
11.6.1. Files in Example and Explanation of Details...............................................123
12. Basic Text Editing Facility ..................................................................127
12.1. How to Edit Text...........................................................................................127
12.2. Simple Text Edit Example............................................................................128
12.3. Clipboard .....................................................................................................129
13. Memory Management ........................................................................131
13.1. The Heap (Dynamic RAM Storage).............................................................131
13.2. File System..................................................................................................132
13.2.1. Opening Multiple Files for WRITE Mode.....................................................133
13.3. Managing Variables.....................................................................................134
13.3.1. Normal Symbol Routines.............................................................................136
13.3.2. Storing and Retrieving Variable Data..........................................................137
13.3.2.1. Store and Recall Look-up Paths..............................................................138
13.3.2.2. Recall Look-up Path.................................................................................138
13.3.2.3. Store Look-up Path..................................................................................139
13.3.2.4. HSYM VarRecall (BYTE *
13.3.2.5. HSYM VarStore (BYTE *
WORD
13.3.2.6. General Data Storage..............................................................................142
13.3.2.7. System Functions ....................................................................................143
SourceSize
[,
parm1
, RECALL_FLAGS
Var
] [,
, WORD
parm2
DestVar
] [,
)..........................139
Flags
,
Flags
] . . . )..........................141
parm3
13.3.3. Low-Level Routines.....................................................................................143
13.3.3.1. Utilities .....................................................................................................144
13.3.3.2. Low-Level Folder Routines......................................................................144
13.3.3.3. Low-Level Symbol Routines ....................................................................144
14. Data Types.........................................................................................145
14.1. Expression...................................................................................................147
14.1.1. Non-Negative or Negative Integers.............................................................147
14.1.2. Positive or Negative Fractions.....................................................................147
14.1.3. Floating-Point Numbers...............................................................................148
14.1.4. All Other Tags Not Listed Here ...................................................................148
14.2. List ...............................................................................................................148
14.3. Matrix...........................................................................................................149
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
vii
14.4. Data Variable...............................................................................................150
14.5. Text Variable................................................................................................151
14.6. String Variable .............................................................................................151
14.7. Graph Database ..........................................................................................152
14.8. Bitmap PIC Images......................................................................................156
14.9. Tokenized Programs and Functions............................................................157
14.10. Programs and Functions in Text Format ...................................................159
14.11. Third Party Data.........................................................................................160
14.12. Assembly Program.....................................................................................160
15. Expressions and the Expression Stack..............................................161
15.1. Overview......................................................................................................161
15.2. Contiguous Tokenized Polish Representation.............................................161
15.2.1. Tags ............................................................................................................162
15.2.2. Numbers......................................................................................................163
15.2.3. Variables, Units and Physical Constants.....................................................165
15.2.4. Other Constants..........................................................................................166
15.2.5. One-argument Tags....................................................................................167
15.2.6. Two-argument Tags....................................................................................167
15.2.7. Tags That Take More Than Two or a Variable Number of Arguments ......168
15.2.8. Lists and Matrices .......................................................................................169
15.2.9. Primary, Secondary, and Command Tags..................................................169
15.2.10. User and Application Defined Functions and Programs............................170
15.3. External Versus Internal Tokenized Polish..................................................170
15.4. Most Main Ordering and Internal Representations of
Exponentiation, Multiplication, and Addition ................................................172
15.5. The Expression Stack..................................................................................174
15.6. An Example of Working on the EStack........................................................175
15.6.1. Estack Arguments and Results...................................................................176
15.6.2. Estack Calculations.....................................................................................177
15.7. Working With Lists.......................................................................................178
16. Working with Numbers.......................................................................181
16.1. Overview......................................................................................................181
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
viii
Table of Contents
16.2. Rational System vs. Float System...............................................................181
16.3. EXACT/APPROX/AUTO Modes..................................................................182
16.4. Floating Point Numbers ...............................................................................183
16.5. Rational Numbers........................................................................................185
16.6. EStack Arithmetic.........................................................................................185
16.7. Complex Numbers.......................................................................................186
17. Graphing ............................................................................................189
17.1. The Graph Screen .......................................................................................189
17.2. Working with the Graph Application.............................................................190
17.3. Two Graph Mode.........................................................................................192
17.4. Graphing Functions .....................................................................................193
17.5. Graph Application Memory Usage...............................................................194
17.6. Available Graph System Routines and Global Variables.............................195
18. TI FLASH Studio (IDE) Overview.......................................................199
18.1. Introduction..................................................................................................199
18.2. Development System...................................................................................199
18.2.1. Requirements..............................................................................................199
18.2.2. Installation...................................................................................................200
18.2.3. Compiler/Assembler/Linker.........................................................................201
18.2.4. Simulator/Debugger ....................................................................................201
18.2.5. IDE Overview ..............................................................................................201
18.2.6. Uninstalling..................................................................................................203
18.2.7. Support........................................................................................................203
18.2.8. References..................................................................................................203
18.3. TI FLASH Studio Interface...........................................................................204
18.3.1. File Menu.....................................................................................................205
18.3.2. Edit Menu....................................................................................................206
18.3.3. View Menu...................................................................................................207
18.3.4. Project Menu...............................................................................................211
18.3.5. Debug Menu................................................................................................212
18.3.6. Simulator Menu...........................................................................................214
18.3.7. Link Menu....................................................................................................215
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
18.3.8. Window Menu..............................................................................................215
18.3.9. Help Menu...................................................................................................216
ix
18.4. Example.......................................................................................................216
18.4.1. Creating a Flash Studio Project...................................................................216
18.4.2. Building the Application...............................................................................217
18.4.3. Loading the Application into the Simulator..................................................217
18.4.4. Debugging the Application ..........................................................................217
18.4.5. Terminating TI FLASH Studio .....................................................................217
18.4.6. Preparing the Application for Site Testing...................................................218
18.4.6.1. Educational and Professional Developers...............................................218
18.4.7. Preparing for Public Release.......................................................................219
Glossary...................................................................................................221
Appendix A: System Routines..................................................................225
Algebra Utilities .......................................................................................................227
are_expressions_identical............................................................................................231
compare_expressions ..................................................................................................232
did_push_lincf...............................................................................................................234
factor_base_index........................................................................................................235
factor_exponent_index.................................................................................................236
has_different_variable..................................................................................................237
im_index.......................................................................................................................238
index_if_pushed_binomial_info....................................................................................239
index_if_pushed_qquad_info........................................................................................240
index_numeric_term.....................................................................................................242
index_of_lead_base_of_lead_term ..............................................................................244
index_reductum_with_tag_base...................................................................................245
index_rmng_factor........................................................................................................246
index_rmng_fctrs_start_base.......................................................................................247
index_rmng_fctrs_start_base_tag................................................................................248
index_rmng_fctrs_start_fctr_tag...................................................................................249
is_free_of_tag...............................................................................................................250
is_independent_of........................................................................................................251
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
x
Table of Contents
is_independent_of_tail..................................................................................................252
is_polynomial_in_var_or_kern......................................................................................255
is_tail_independent_of..................................................................................................256
is_term_improper..........................................................................................................257
is_totally_polynomial ....................................................................................................258
lead_base_index ..........................................................................................................259
lead_factor_index.........................................................................................................260
lead_term_index...........................................................................................................262
linear_degree................................................................................................................264
main_gen_var_index....................................................................................................265
map_unary_over_comparison......................................................................................266
next_var_or_kernel_index............................................................................................267
numeric_factor_index...................................................................................................268
push_but_factor............................................................................................................270
push_but_term..............................................................................................................271
push_constant_factors .................................................................................................272
push_denominator........................................................................................................273
push_dependent_factors..............................................................................................274
push_dependent_terms................................................................................................275
push_desolve ...............................................................................................................276
push_div_dif_1c............................................................................................................277
push_div_dif_1f ............................................................................................................278
push_independent_factors...........................................................................................279
push_independent_terms.............................................................................................280
push_integer_gcd.........................................................................................................281
push_integer_lcm.........................................................................................................282
push_nonconstant_factors ...........................................................................................283
push_nonconstant_terms.............................................................................................284
push_nonnumeric_factors............................................................................................285
push_numerator ...........................................................................................................286
push_percent................................................................................................................287
push_poly_deg_in_var_or_kernel ................................................................................288
push_subst_no_simp....................................................................................................289
push_substitute_simplify ..............................................................................................290
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
push_substitute_using_such_that................................................................................291
push_var_kern_tail.......................................................................................................292
re_index........................................................................................................................293
reductum_index............................................................................................................294
remaining_factors_index ..............................................................................................296
replace_top2_with_imre ...............................................................................................298
Apps........................................................................................................................299
EV_getAppID................................................................................................................301
EV_quit.........................................................................................................................302
OO_appGetPublicStorage............................................................................................303
OO_appIsMarkedDelete...............................................................................................304
OO_appMarkDelete......................................................................................................305
OO_AppNameToACB ..................................................................................................306
OO_appSetPublicStorage............................................................................................307
xi
OO_CondGetAttr..........................................................................................................309
OO_Deref.....................................................................................................................310
OO_Destroy..................................................................................................................311
OO_DestroyAll..............................................................................................................312
OO_GetAppAttr............................................................................................................313
OO_GetAttr...................................................................................................................314
OO_HasAttr..................................................................................................................315
OO_InstallAppHook......................................................................................................316
OO_InstallAppHookByName........................................................................................318
OO_InstallSystemHook................................................................................................320
OO_New.......................................................................................................................322
OO_NextACB...............................................................................................................323
OO_PrevACB...............................................................................................................324
OO_SetAppAttr.............................................................................................................325
OO_SetAttr...................................................................................................................326
OO_UninstallAppHook .................................................................................................327
OO_UninstallAppHookByName....................................................................................328
OO_UninstallSystemHook............................................................................................329
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xii
Table of Contents
Certificates..............................................................................................................331
freeIdList.......................................................................................................................333
LIO_SendIdList.............................................................................................................334
Data Utilities............................................................................................................335
DataTypeNames...........................................................................................................337
gen_version..................................................................................................................338
GetDataType................................................................................................................339
GetFuncPrgmBodyPtr ..................................................................................................340
QSysProtected .............................................................................................................341
SmapTypeStrings.........................................................................................................342
Dialog......................................................................................................................343
Dialog ...........................................................................................................................345
DialogAdd.....................................................................................................................347
DialogDo.......................................................................................................................349
DialogNew....................................................................................................................350
DlgMessage..................................................................................................................353
DrawStaticButton..........................................................................................................354
ERD_dismissNotice......................................................................................................356
ERD_notice ..................................................................................................................357
VarNew.........................................................................................................................358
VarOpen.......................................................................................................................360
VarSaveAs....................................................................................................................362
Direct Floating Point Operations .............................................................................363
acos..............................................................................................................................367
acosh............................................................................................................................368
asin...............................................................................................................................369
asinh.............................................................................................................................370
atan...............................................................................................................................371
atan2.............................................................................................................................372
atanh.............................................................................................................................373
bcdadd..........................................................................................................................374
bcdbcd..........................................................................................................................375
bcdcmp.........................................................................................................................376
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
bcddiv...........................................................................................................................377
bcdlong.........................................................................................................................378
bcdmul..........................................................................................................................379
bcdneg..........................................................................................................................380
bcdsub..........................................................................................................................381
cacos............................................................................................................................382
cacosh..........................................................................................................................383
casin.............................................................................................................................384
casinh...........................................................................................................................385
catan.............................................................................................................................386
catanh...........................................................................................................................387
ccos..............................................................................................................................388
ccosh............................................................................................................................389
ceil................................................................................................................................390
xiii
cexp..............................................................................................................................391
ck_valid_float................................................................................................................392
cln.................................................................................................................................393
clog10...........................................................................................................................394
cos................................................................................................................................395
cosh..............................................................................................................................396
csin...............................................................................................................................397
csinh.............................................................................................................................398
csqrt..............................................................................................................................399
ctan...............................................................................................................................400
ctanh.............................................................................................................................401
estack_number_to_Float..............................................................................................402
estack_to_float .............................................................................................................403
exp................................................................................................................................404
fabs...............................................................................................................................405
floor...............................................................................................................................406
fmod..............................................................................................................................407
frexp10..........................................................................................................................408
is_float_infinity..............................................................................................................409
is_float_negative_zero..................................................................................................410
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xiv
Table of Contents
is_float_positive_zero...................................................................................................411
is_float_signed_infinity .................................................................................................412
is_float_transfinite.........................................................................................................413
is_float_unsigned_inf_or_nan.......................................................................................414
is_float_unsigned_zero.................................................................................................415
is_nan...........................................................................................................................416
log.................................................................................................................................417
log10.............................................................................................................................418
modf..............................................................................................................................419
pow...............................................................................................................................420
push_Float....................................................................................................................421
push_Float_to_nonneg_int...........................................................................................422
round12 ........................................................................................................................423
round12_err..................................................................................................................424
round14 ........................................................................................................................426
sin.................................................................................................................................427
sinh...............................................................................................................................428
sqrt................................................................................................................................429
tan.................................................................................................................................430
tanh...............................................................................................................................431
Display ....................................................................................................................433
ClientToScr...................................................................................................................435
display_statements.......................................................................................................436
DrawStrWidth ...............................................................................................................437
DrawStrWidthP.............................................................................................................438
Parms2D.......................................................................................................................439
Parse1DExpr................................................................................................................440
Parse2DExpr................................................................................................................442
Parse2DMultiExpr.........................................................................................................443
Print2DExpr..................................................................................................................444
sf_width ........................................................................................................................445
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
Error Handling.........................................................................................................447
clear_error_context.......................................................................................................449
ER_catch......................................................................................................................450
ER_success..................................................................................................................451
ER_throwFrame ...........................................................................................................452
ER_throwVar................................................................................................................454
ERD_dialog ..................................................................................................................455
find_error_message......................................................................................................456
EStack Arithmetic....................................................................................................457
add_to_top....................................................................................................................461
add1_to_top..................................................................................................................462
can_be_approxed.........................................................................................................463
compare_complex_magnitudes....................................................................................465
compare_Floats............................................................................................................466
xv
compare_numbers........................................................................................................467
did_push_cnvrt_Float_to_integer.................................................................................468
divide_top.....................................................................................................................469
get_lb............................................................................................................................470
get_ub...........................................................................................................................471
integer_non_unknown..................................................................................................472
is_cFloat_agg...............................................................................................................473
is_complex_Float..........................................................................................................475
is_complex0..................................................................................................................476
is_complex_number .....................................................................................................477
is_constant ...................................................................................................................478
is_Float_exact_whole_number.....................................................................................479
is_minus1 .....................................................................................................................480
is_pos_int_and_eq_quantum .......................................................................................481
is_reciprocal_of_quantum ............................................................................................482
is_whole_number .........................................................................................................483
is0.................................................................................................................................484
is1.................................................................................................................................485
negate_top....................................................................................................................486
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xvi
Table of Contents
push_arg_minus_1.......................................................................................................487
push_arg_plus_1..........................................................................................................488
push_difference............................................................................................................489
push_gcd_numbers......................................................................................................490
push_is_prime..............................................................................................................491
push_minus_recip_of_quantum ...................................................................................492
push_negate.................................................................................................................493
push_negate_quantum_as_negint...............................................................................494
push_pi.........................................................................................................................495
push_pi_on_quantum...................................................................................................496
push_product................................................................................................................497
push_quantum_as_nonnegative_int.............................................................................498
push_quantum_pair_as_pos_frac................................................................................499
push_ratio.....................................................................................................................500
push_reciprocal............................................................................................................501
push_reciprocal_of_quantum.......................................................................................502
push_sum.....................................................................................................................503
push0............................................................................................................................504
push1............................................................................................................................505
replace_top_with_reciprocal.........................................................................................506
replace_top2_with_difference.......................................................................................507
replace_top2_with_prod...............................................................................................508
replace_top2_with_ratio ...............................................................................................509
replace_top2_with_sum................................................................................................510
subtract_from_top.........................................................................................................511
subtract1_from_top.......................................................................................................512
times_top......................................................................................................................513
EStack Utilities ........................................................................................................515
check_estack_size .......................................................................................................517
delete_between............................................................................................................518
delete_expression ........................................................................................................519
deleted_between..........................................................................................................520
deleted_expression ......................................................................................................521
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
estack_to_short............................................................................................................522
estack_to_ushort..........................................................................................................523
GetValue.......................................................................................................................524
move_between_to_top.................................................................................................525
moved_between_to_top...............................................................................................526
next_expression_index.................................................................................................527
push_between..............................................................................................................528
push_expression ..........................................................................................................529
push_Float_to_rat.........................................................................................................530
push_long_to_integer...................................................................................................531
push_quantum..............................................................................................................532
push_ulong_to_integer.................................................................................................533
push_ushort_to_integer................................................................................................534
reset_estack_size.........................................................................................................535
xvii
Expression Evaluation / Algebraic Simplification.....................................................537
ForceFloat ....................................................................................................................539
NG_approxESI .............................................................................................................540
NG_execute..................................................................................................................541
NG_rationalESI.............................................................................................................542
push_approx.................................................................................................................543
push_equals.................................................................................................................544
push_greater_than .......................................................................................................545
push_greater_than_or_equals......................................................................................546
push_internal_simplify..................................................................................................547
push_less_than ............................................................................................................548
push_less_than_or_equals...........................................................................................549
push_not_equals..........................................................................................................550
push_simplify................................................................................................................551
push_simplify_statements............................................................................................552
replace_top_with_post_simplified.................................................................................553
Files.........................................................................................................................555
FAccess........................................................................................................................557
FClose..........................................................................................................................558
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xviii
Table of Contents
FCreate.........................................................................................................................559
FDelete.........................................................................................................................560
FEof..............................................................................................................................561
FFindFirst .....................................................................................................................562
FFindNext.....................................................................................................................563
FGetC...........................................................................................................................564
FGetPos .......................................................................................................................565
FGetSize.......................................................................................................................566
FOpen...........................................................................................................................567
FPutC ...........................................................................................................................570
FRead...........................................................................................................................571
FSetBufSize..................................................................................................................572
FSetPos........................................................................................................................573
FSetSize.......................................................................................................................574
FSetVer ........................................................................................................................575
FStatus.........................................................................................................................576
FType ...........................................................................................................................577
FWrite...........................................................................................................................578
TokenizeName .............................................................................................................579
Graphing .................................................................................................................581
CkValidDelta.................................................................................................................583
cmd_clrdraw.................................................................................................................584
cmd_clrgraph................................................................................................................585
cmd_rclgdb...................................................................................................................586
cmd_stogdb..................................................................................................................587
CptDeltax......................................................................................................................588
CptDeltay......................................................................................................................589
CptFuncX......................................................................................................................590
CptIndep.......................................................................................................................591
EQU_select ..................................................................................................................593
EQU_setStyle...............................................................................................................594
FindFunc.......................................................................................................................595
FindGrFunc...................................................................................................................596
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
gr_CptIndepInc.............................................................................................................597
gr_delete_fldpic............................................................................................................599
gr_DispLabels...............................................................................................................600
gr_xres_pixel................................................................................................................601
GraphActivate...............................................................................................................602
GrAxes..........................................................................................................................606
GrClipLine.....................................................................................................................607
GrLineFlt.......................................................................................................................609
GT_Regraph.................................................................................................................610
GT_Regraph_if_neccy..................................................................................................611
StepCk..........................................................................................................................612
XCvtFtoP......................................................................................................................613
XCvtPtoF......................................................................................................................614
YCvtFtoP......................................................................................................................615
xix
YCvtPtoF......................................................................................................................616
Home Screen..........................................................................................................617
cmd_clrhome................................................................................................................619
cmd_disphome.............................................................................................................620
HomeAlone...................................................................................................................621
HomeExecute...............................................................................................................622
HS_getAns ...................................................................................................................623
HS_getEntry.................................................................................................................624
HS_popEStack.............................................................................................................625
Interrupts.................................................................................................................627
idle................................................................................................................................629
off..................................................................................................................................631
OSSetSR......................................................................................................................632
Keyboard.................................................................................................................633
alphaLockOff ................................................................................................................635
alphaLockOn ................................................................................................................636
GetAlphaStatus ............................................................................................................637
GKeyFlush....................................................................................................................638
GKeyIn..........................................................................................................................639
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xx
Table of Contents
kbhit..............................................................................................................................641
KeyYesOrNo.................................................................................................................642
ngetchx.........................................................................................................................643
OSCheckBreak.............................................................................................................644
OSClearBreak ..............................................................................................................645
OSDisableBreak...........................................................................................................646
OSEnableBreak............................................................................................................647
OSInitBetweenKeyDelay..............................................................................................648
OSInitKeyInitDelay .......................................................................................................649
push_getkey.................................................................................................................650
pushkey........................................................................................................................651
QModeKey....................................................................................................................652
QSysKey.......................................................................................................................653
restoreAlphaLock..........................................................................................................654
Link..........................................................................................................................655
BatTooLowFlash...........................................................................................................657
LIO_RecvData..............................................................................................................658
LIO_SendData..............................................................................................................659
OSCheckLinkOpen.......................................................................................................660
OSLinkClose.................................................................................................................661
OSLinkOpen.................................................................................................................662
OSLinkReset ................................................................................................................663
Lists and Matrices...................................................................................................665
all_tail ...........................................................................................................................669
any_tail.........................................................................................................................670
cmd_sorta.....................................................................................................................671
cmd_sortd.....................................................................................................................672
did_map_aggregate_arg ..............................................................................................673
is_matrix.......................................................................................................................674
is_square_matrix..........................................................................................................675
last_element_index.......................................................................................................676
map_tail........................................................................................................................677
push_augment..............................................................................................................678
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
push_coldim .................................................................................................................679
push_colnorm...............................................................................................................680
push_cross_product.....................................................................................................681
push_cumsum..............................................................................................................682
push_determinant.........................................................................................................683
push_diag.....................................................................................................................684
push_dimension ...........................................................................................................685
push_dot_add...............................................................................................................686
push_dot_div................................................................................................................687
push_dot_mult..............................................................................................................688
push_dot_sub...............................................................................................................689
push_dotproduct...........................................................................................................690
push_eigvc ...................................................................................................................691
push_eigvl ....................................................................................................................692
xxi
push_identity_mat ........................................................................................................693
push_list_to_mat ..........................................................................................................694
push_mat_to_list ..........................................................................................................695
push_matnorm..............................................................................................................696
push_mean...................................................................................................................697
push_median................................................................................................................698
push_mrow...................................................................................................................700
push_mrowadd.............................................................................................................702
push_newlist.................................................................................................................703
push_newmat...............................................................................................................704
push_prodlist................................................................................................................705
push_randmat...............................................................................................................706
push_red_row_ech.......................................................................................................707
push_reversed_tail.......................................................................................................708
push_row_echelon .......................................................................................................709
push_rowadd................................................................................................................710
push_rowdim................................................................................................................711
push_rownorm..............................................................................................................712
push_rowswap..............................................................................................................713
push_sign.....................................................................................................................714
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xxii
push_stddev.................................................................................................................715
push_submat................................................................................................................716
push_sumlist.................................................................................................................718
push_transpose_aux....................................................................................................719
push_unitv....................................................................................................................721
push_variance..............................................................................................................722
remaining_element_count............................................................................................723
Table of Contents
Logic........................................................................................................................725
and_onto_top................................................................................................................727
is_equivalent_to............................................................................................................728
is_negative ...................................................................................................................729
is_never0......................................................................................................................730
is_nonnegative .............................................................................................................731
is_nonpositive...............................................................................................................732
is_positive.....................................................................................................................733
is_real...........................................................................................................................734
is_undefined.................................................................................................................735
lead_conjunct_factor_index..........................................................................................736
lead_disjunct_term_index.............................................................................................737
or_onto_top ..................................................................................................................738
push_and......................................................................................................................739
push_but_conjunct_factor ............................................................................................740
push_not.......................................................................................................................741
push_or.........................................................................................................................742
push_when...................................................................................................................743
remaining_conjuncts_index..........................................................................................744
remaining_disjuncts_index...........................................................................................745
replace_top2_with_and ................................................................................................746
replace_top2_with_or...................................................................................................747
Math........................................................................................................................749
are_units_consistent.....................................................................................................755
did_push_anti_deriv .....................................................................................................756
did_push_approx_inflection_point................................................................................757
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
did_push_series ...........................................................................................................758
push_1st_derivative......................................................................................................760
push_abs......................................................................................................................761
push_acos....................................................................................................................762
push_acosh..................................................................................................................763
push_asin.....................................................................................................................764
push_asinh...................................................................................................................765
push_atan.....................................................................................................................766
push_atanh...................................................................................................................767
push_ceiling..................................................................................................................768
push_comb...................................................................................................................769
push_comdenom..........................................................................................................770
push_conj.....................................................................................................................771
push_constant_terms...................................................................................................772
xxiii
push_cos......................................................................................................................773
push_cosh....................................................................................................................774
push_def_int.................................................................................................................775
push_degrees...............................................................................................................776
push_dot_exponentiate................................................................................................777
push_exp......................................................................................................................778
push_expand................................................................................................................779
push_exponentiate.......................................................................................................780
push_extended_prod....................................................................................................781
push_factor...................................................................................................................782
push_factorial...............................................................................................................784
push_floor.....................................................................................................................785
push_fractional_part.....................................................................................................786
push_gcd_then_cofactors ............................................................................................787
push_im........................................................................................................................788
push_integer_part.........................................................................................................789
push_integer_quotient..................................................................................................790
push_integer_remainder...............................................................................................791
push_left.......................................................................................................................792
push_lim.......................................................................................................................794
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xxiv
Table of Contents
push_ln.........................................................................................................................795
push_log10...................................................................................................................796
push_make_proper.......................................................................................................797
push_max.....................................................................................................................798
push_max1...................................................................................................................799
push_max2...................................................................................................................800
push_mid......................................................................................................................801
push_min......................................................................................................................803
push_min1....................................................................................................................804
push_min2....................................................................................................................805
push_mod.....................................................................................................................806
push_next_arb_int........................................................................................................807
push_next_arb_real......................................................................................................808
push_nint......................................................................................................................809
push_nth_derivative .....................................................................................................810
push_perm....................................................................................................................811
push_phase..................................................................................................................812
push_poly_qr................................................................................................................813
push_r_cis....................................................................................................................814
push_rand.....................................................................................................................815
push_radians................................................................................................................816
push_randpoly..............................................................................................................817
push_re.........................................................................................................................818
push_rec_to_angle.......................................................................................................819
push_right.....................................................................................................................820
push_rotate...................................................................................................................822
push_round...................................................................................................................824
push_sequence............................................................................................................825
push_shift.....................................................................................................................827
push_simult ..................................................................................................................829
push_sin.......................................................................................................................831
push_sin2.....................................................................................................................832
push_sinh.....................................................................................................................833
push_sqrt......................................................................................................................834
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
push_square.................................................................................................................835
push_standardize.........................................................................................................836
push_summation..........................................................................................................837
push_tan.......................................................................................................................838
push_tanh.....................................................................................................................839
push_trig.......................................................................................................................840
raise_to_top..................................................................................................................841
replace_top2_with_pow................................................................................................842
Memory Management.............................................................................................843
HeapAlloc.....................................................................................................................845
HeapAllocHigh..............................................................................................................846
HeapAllocHighThrow....................................................................................................847
HeapAllocThrow...........................................................................................................848
HeapAvail.....................................................................................................................849
xxv
HeapCompress.............................................................................................................850
HeapDeref....................................................................................................................851
HeapFree......................................................................................................................852
HeapFreeIndir...............................................................................................................853
HeapGetLock................................................................................................................854
HeapLock .....................................................................................................................855
HeapMax......................................................................................................................856
HeapMoveHigh.............................................................................................................857
HeapPtrToHandle.........................................................................................................858
HeapRealloc.................................................................................................................859
HeapShuffle..................................................................................................................860
HeapSize......................................................................................................................861
HeapUnlock..................................................................................................................862
HeapWalk.....................................................................................................................863
HLock ...........................................................................................................................865
memcpy........................................................................................................................866
memmove.....................................................................................................................867
memset.........................................................................................................................868
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xxvi
Table of Contents
Menus .....................................................................................................................869
DynMenuAdd................................................................................................................871
DynMenuChange..........................................................................................................873
FKeyI_H........................................................................................................................874
MenuAddIcon ...............................................................................................................875
MenuAddText...............................................................................................................876
MenuBegin ...................................................................................................................878
MenuCheck ..................................................................................................................880
MenuEnd......................................................................................................................881
MenuFlags....................................................................................................................882
MenuGetTopRedef.......................................................................................................883
MenuItemDef................................................................................................................884
MenuKey ......................................................................................................................885
MenuLoad.....................................................................................................................886
MenuNew .....................................................................................................................888
MenuOff........................................................................................................................890
MenuOn........................................................................................................................891
MenuPopup..................................................................................................................892
MenuSubStat................................................................................................................893
MenuTopRedef.............................................................................................................894
MenuTopSelect ............................................................................................................897
MenuTopStat................................................................................................................898
PopupAddText..............................................................................................................899
PopupBegin..................................................................................................................900
PopupBeginDo .............................................................................................................902
PopupClear...................................................................................................................903
PopupDo.......................................................................................................................904
PopupNew....................................................................................................................905
PopupText....................................................................................................................906
QMenuTopSelect..........................................................................................................907
Mode Screen Settings............................................................................................909
MO_currentOptions......................................................................................................911
MO_digestOptions........................................................................................................912
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Table of Contents
Operating System ...................................................................................................913
EV_captureEvents........................................................................................................915
EV_defaultHandler .......................................................................................................918
EV_getc........................................................................................................................920
EV_restorePainting.......................................................................................................921
EV_sendEvent..............................................................................................................922
EV_setCmdCheck........................................................................................................923
EV_setCmdState..........................................................................................................924
EV_setFKeyState.........................................................................................................925
EV_startApp .................................................................................................................926
EV_suspendPainting....................................................................................................927
EV_switch.....................................................................................................................928
EX_getBasecodeParmBlock ........................................................................................929
FL_getHardwareParmBlock .........................................................................................930
xxvii
handleRclKey ...............................................................................................................932
handleVarLinkKey ........................................................................................................933
LOC_formatDate ..........................................................................................................934
LOC_getLocalDateFormat............................................................................................935
LOC_localVersionDate.................................................................................................936
Program I/O Screen................................................................................................937
cmd_clrio......................................................................................................................939
cmd_disp......................................................................................................................940
Solver......................................................................................................................941
push_csolve..................................................................................................................943
push_czeros.................................................................................................................944
push_nSolve.................................................................................................................945
push_solve ...................................................................................................................946
push_zeros...................................................................................................................947
Statistics..................................................................................................................949
cmd_showstat...............................................................................................................951
push_randnorm ............................................................................................................952
QstatRcl........................................................................................................................953
statEnd .........................................................................................................................954
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
xxviii
statFree ........................................................................................................................955
statStart........................................................................................................................956
Table of Contents
Status Line..............................................................................................................959
ST_angle......................................................................................................................961
ST_busy .......................................................................................................................962
ST_eraseHelp...............................................................................................................963
ST_folder......................................................................................................................964
ST_helpMsg .................................................................................................................965
ST_progressBar ...........................................................................................................966
ST_progressDismiss ....................................................................................................967
ST_progressIncrement.................................................................................................968
ST_progressUpdate .....................................................................................................969
ST_readOnly ................................................................................................................970
Strings.....................................................................................................................971
cmpstri..........................................................................................................................973
FirstNonblank ...............................................................................................................974
hStrAppend...................................................................................................................975
memchr.........................................................................................................................976
memcmp.......................................................................................................................977
memucmp.....................................................................................................................978
push_char.....................................................................................................................979
push_instring................................................................................................................980
push_ord.......................................................................................................................981
push_str_to_expr..........................................................................................................982
push_string...................................................................................................................984
push_zstr......................................................................................................................985
sprintf............................................................................................................................986
strcat.............................................................................................................................989
strchr.............................................................................................................................990
strcmp...........................................................................................................................991
strcpy............................................................................................................................992
strcspn..........................................................................................................................993
stricmp..........................................................................................................................994
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001