Texas Instruments TI-89 Developer's Manual

Texas Instruments TI-89 Developer's Manual

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

Advertisement

TI-89 / TI-92 Plus Developer Guide
Beta Version .02

Advertisement

Table of Contents
loading

Summary of Contents for Texas Instruments TI-89

  • Page 1 TI-89 / TI-92 Plus Developer Guide Beta Version .02...
  • Page 2: Important Information

    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 FLASH Studio are trademarks of Texas Instruments Incorporated. Sierra C is a trademark of Sierra Systems.
  • Page 3: Table Of Contents

    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 3.3.
  • Page 4 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 5 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...
  • Page 6 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 7 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...
  • Page 8 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 9 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...
  • Page 10 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.
  • Page 11 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.
  • Page 12 ... 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 13 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...
  • Page 14 ... 368 asin ... 369 asinh ... 370 atan... 371 atan2... 372 atanh... 373 bcdadd... 374 bcdbcd ... 375 bcdcmp ... 376 TI-89 / TI-92 Plus Developer Guide Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 15 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 xiii Beta Version January 26, 2001...
  • Page 16 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 17 ... 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...
  • Page 18 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 19 ... 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 xvii Beta Version January 26, 2001...
  • Page 20 ... 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 21 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...
  • Page 22 ... 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 23 ... 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...
  • Page 24 ... 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 25 ... 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 xxiii Beta Version January 26, 2001...
  • Page 26 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 27 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...
  • Page 28 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 29 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 xxvii Beta Version January 26, 2001...
  • Page 30 ... 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 Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 31 ... 1025 push_setfold ... 1026 ResetSymFlags ... 1028 SetOK ... 1029 SymAdd ... 1031 SymDel ... 1032 SymFind ... 1033 SymFindFirst ... 1034 SymFindFoldername ... 1036 TI-89 / TI-92 Plus Developer Guide Not for Distribution xxix Beta Version January 26, 2001...
  • Page 32 Timer ... 1075 OSFreeTimer... 1077 OSRegisterTimer... 1078 OSTimerCurVal ... 1079 OSTimerExpired ... 1080 OSTimerRestart... 1081 Token Operations... 1083 get_key_ptr... 1085 GetTagStr ... 1087 TI-89 / TI-92 Plus Developer Guide Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 33 HSYMtoName... 1120 is_variable ... 1121 StrToTokN ... 1122 SymSysVar... 1123 TokenizeSymName ... 1124 TokToStrN ... 1125 Variables ... 1127 checkCurrent ... 1129 cmd_archive ... 1130 TI-89 / TI-92 Plus Developer Guide Not for Distribution xxxi Beta Version January 26, 2001...
  • Page 34 WinBitmapPut... 1158 WinBitmapSize ... 1159 WinBitmapSizeExt ... 1160 WinChar... 1161 WinCharXY... 1162 WinClose ... 1164 WinClr... 1165 WinDeactivate ... 1166 WinDupStat ... 1167 TI-89 / TI-92 Plus Developer Guide Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 35 WinStrXYWrap ... 1196 WinWidth ... 1197 Appendix B: Global Variables...1199 Algebra Utilities ... 1203 ARb_int_count ... 1203 ARb_real_count... 1204 NG_control ... 1205 NG_such_that_index ... 1208 RAtionalize_tol... 1209 TI-89 / TI-92 Plus Developer Guide Not for Distribution xxxiii Beta Version January 26, 2001...
  • Page 36 1231 gr_flags... 1241 Keyboard... 1243 OSFastArrows ... 1243 OSModKeyStatus ... 1244 Logic... 1245 index_false ... 1245 index_true... 1246 Math ... 1247 Float0Index... 1247 TI-89 / TI-92 Plus Developer Guide Table of Contents Not for Distribution Beta Version January 26, 2001...
  • Page 37 Appendix C: Macros ...1273 Character Classification / Conversion ... 1275 isalnum ... 1275 isalpha ... 1276 isascii... 1277 iscsym... 1278 iscsymf... 1279 isdigit ... 1280 isgreek ... 1281 TI-89 / TI-92 Plus Developer Guide Not for Distribution xxxv Beta Version January 26, 2001...
  • Page 38 TRY ... 1296 Operating System ... 1297 Access_AMS_Global_Variables... 1297 Appendix D: TI-89 / TI-92 Plus “Small” Character Font ...1299 Appendix E: TI-89 / TI-92 Plus “Large” Character Font ...1307 Appendix F: TI-89 / TI-92 Plus “Huge” Character Font ...1317 Reference List — System Routines ...1329 Reference List —...
  • Page 39 Figure 11.2: Screen Shot from Test Menu Example... 117 Figure 13.1: Token Representation of VarName A23456... 135 Figure 17.1: Upper Left Corner of Graph Screen... 190 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 40 Table of Contents Figure 18.1: TI FLASH Studio Home Screen... 202 Figure 18.2: TI FLASH Studio Menu Bar ... 204 Figure 18.3: TI FLASH Studio Toolbar... 204 Figure 18.4: File Menu ... 205 Figure 18.5: Edit Menu... 206 Figure 18.6: View Menu ... 207 Figure 18.7: Registers...
  • Page 41 Table 14.10: Data Object for a String Variable ... 151 Table 14.11: Data Object for a Graph Database ... 152 Table 14.12: Data Object for a PIC... 156 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 42 Table 15.8: Examples of Arithmetic Operations and the Store Operation ... 168 Table 15.9: Examples of Other Binary Operations ... 168 Table 15.10: Secondary Tag Examples... 169 Table 15.11: Command Tag Examples ... 170 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 43: Introduction

    The purpose of this guide is to provide the application developer with a thorough understanding of the ideas and concepts necessary for application design on the TI-89 / TI-92 Plus Operating System (OS). This Operating System is referred to as the Advanced Mathematics Software (AMS). Key components of the AMS such as event-driven architecture, memory management, and the user interface are discussed in detail.
  • Page 44 VAR-LINK. More details are provided for interfacing with TI-BASIC. This chapter also provides tips on optimizing code space and identifying the active AMS version.
  • Page 45: Conventions Used In This Guide

    Chapter 1: Introduction Chapter 18, TI FLASH Studio ™ (IDE) Overview , is the users manual for TI FLASH Studio. It provides information on PC requirements, the installation process, and the interface. It also contains an example that steps through the application development process.
  • Page 46 Chapter 1: Introduction TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 47: The 68000 Ti Ams Operating System Overview

    After responding to an event message, the application then returns to the event manager and awaits the next event. The event manager puts the calculator into low power mode until another event occurs. This process is illustrated in Figure 2.1.
  • Page 48: Figure 2.2: Application/Os Interface

    ASM programs are generally small ( 8 K for AMS 2.03 and and execute in RAM. They are intended to offer the same speed and efficient hardware access as Flash applications but as subroutines called from TI-BASIC instead of fully integrated applications.
  • Page 49: The Ti-89 / Ti-92 Plus Hardware Overview

    When creating applications, understanding the capabilities and limitations of the platform are important to creating a good interface to the user. Pictured below is a block diagram of the TI-89 / TI-92 Plus from a programmer’s perspective. 68000...
  • Page 50: Memory Map

    A black and white LCD display (100 lines of 160 pixels for the TI-89, 128 lines • of 240 pixels for the TI-92 Plus). A set-line / scan-line style matrix keyboard. • A three line (D0, D1, and ground) serial IO interface.
  • Page 51: Vector Table

    Chapter 3: The TI-89 / TI-92 Plus Hardware Overview TI-89 0x000000 0x0003FF 0x000400 0x0041FF 0x004200 0x004203 0x004204 0x004BFF 0x004C00 0x005AFF 0x005B00 (Border can vary)****** (Border can vary)****** 0x3FFFF 0x200000 0x20FFFF 0x210000 0x211FFF 0x212000 0x21FFFF 0x220000 (Border can vary)****** (Border can vary)******...
  • Page 52 0x0000C0 Unassigned / reserved 0x0000A8 Unassigned / reserved 0x0000AC 0x0003FF TI-89 / TI-92 Plus Developer Guide Chapter 3: The TI-89 / TI-92 Plus Hardware Overview TI-89 / TI-92 Plus Usage Initial supervisor stack pointer Not used Not used Not used...
  • Page 53: Asic Registers

    Chapter 3: The TI-89 / TI-92 Plus Hardware Overview 3.3. ASIC registers When accessing the ASIC registers, it is important to modify only the intended bits. 0x600000 System Configuration — Detect stack overflow. When Bit 2 is set, logic is enabled that triggers a level 7 interrupt on any write to addresses 0xE000000 through 0xFFFFFF and 0x000000 through 0x00003FF.
  • Page 54: Table 3.5: Dbus Configuration Register

    When this bit is set, the state machine and barrel shifter that decode the DBus protocol and perform serial to parallel conversion are disabled. TI-89 / TI-92 Plus Developer Guide Chapter 3: The TI-89 / TI-92 Plus Hardware Overview CAIE CTX D0 In D1 Out D0 Out Table 3.6: Link Register...
  • Page 55 Bits 8–11 allow for enabling or disabling their corresponding interrupts. Bits 2–7 allow monitoring of the link port. These registers are modeled on RS232 control/status registers; programming serial IO on the TI-89 / TI-92 Plus is somewhat akin to writing an RS232 handler.
  • Page 56 Chapter 3: The TI-89 / TI-92 Plus Hardware Overview TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 57: User Interface Overview

    User Interface Overview The TI-92 Plus has a display of 240 by 128 pixels. The TI-89 display size is 160 by 100 pixels. On both calculators, the display is divided into two regions: the window region and the status line. The bottom seven lines of the display are always used for the status line.
  • Page 58: Menus

    Figure 4.4. POPUP mPopupTest, 0, 0 { "POPUP 1", MID_1 "POPUP 2", MID_2 "SELECT THIS", MID_CORRECT TI-89 / TI-92 Plus Developer Guide Chapter 4: User Interface Overview Figure 4.2: CHAR Menu Not for Distribution Beta Version January 26, 2001...
  • Page 59: Toolbars

    Static Pop-ups The simplest use of pop-ups is to define a static pop-up with the resource compiler and then execute it with the MenuPopup function. TI-89 / TI-92 Plus Developer Guide Figure 4.4: mPop-upTest Screen Shot — Create an empty dynamic menu.
  • Page 60: Dynamic Pop-Ups

    POPUP, {DF_TAB_ELLIPSES, DLG_DEF_X0, 28}, “Overwrite?”, OverwritePopup, 0 EDIT, {DF_TAB_ELLIPSES, DLG_DEF_X0, 41}, “New name”, 0, 17, 18 HEADER, {0,0,0}, TI-89 / TI-92 Plus Developer Guide Chapter 4: User Interface Overview — Create an empty dynamic pop-up. — Add to or change a dynamic pop-up.
  • Page 61: Fonts

    (F_8x10). The Small font is used in the status bar and dialog box headers. The Small font is also used in the dialog boxes and toolbars on the TI-89. Some of the Small font characters, especially the international characters, are difficult to distinguish from each other and so care should be exercised when using the Small font.
  • Page 62: Figure 4.7: Example Using The A_Reverse Attribute

    Figure 4.7: Example Using the A_REVERSE Attribute Shading is used to denote unselectable items. It is often used in menus, as shown in Figure 4.8. Figure 4.8: Example Using the A_SHADED Attribute TI-89 / TI-92 Plus Developer Guide Chapter 4: User Interface Overview Background Foreground Unchanged Every other pixel on.
  • Page 63: Table 4.2: Character Set

    LSD 0 NULL BELL Note: For actual character representation of each font, see Appendix D: TI-89 / TI-92 Plus “Small” Character Font, Appendix E: TI-89 / TI-92 Plus “Large” Character Font, or Appendix F: TI-89 / TI-92 Plus “Huge” Character Font.
  • Page 64: The Status Line

    The following routines allow access to the status line: ST_angle ST_busy ST_eraseHelp ST_folder ST_helpMsg ST_readOnly TI-89 / TI-92 Plus Developer Guide Chapter 4: User Interface Overview Figure 4.9: Status Line — Change the RAD/DEG indicator in the status line. — Turn on/off the BUSY indicator.
  • Page 65: Flash Applications Vs. Asm Programs

    Executes in Size Data segment Copy protection O menu User interaction TI-89 / TI-92 Plus Developer Guide Flash Application protected Flash memory — The Flash memory occupied by the OS and applications is protected from inadvertent or malicious changes. protected Flash memory — Flash apps are executed in place, i.e., the...
  • Page 66 Localization TI-BASIC extensions Shared code Object-oriented features TI-89 / TI-92 Plus Developer Guide Chapter 5: Flash Applications vs. ASM Programs Flash Application Yes — Flash applications can override many system features. Yes — Calculator language localization is provided by Flash applications.
  • Page 67: Assembly Language Programming Overview

    Assembly Language Programming Overview This chapter covers how to use assembly language to write programs for the TI-89 / TI-92 Plus calculator. You should already know how to write programs in assembly language and be familiar with Motorola 68000 architecture. See the TI Web site and the TI-89 / TI-92 Plus Guidebook.
  • Page 68: Calling Flash-Rom-Resident Routines

    0xC8,a2 move.l kbhit(a2),a0 (a0) tst.w TI-89 / TI-92 Plus Developer Guide Chapter 6: Assembly Language Programming Overview ; an alternative to A7 instructions with register A6 to access subroutine unlk ; a2 -> jump table ; get address of kbhit routine ;...
  • Page 69: Subroutine Linkage

    Use the instruction to save and restore registers. Example: subroutine linkage for subroutine mySubr with eight bytes of local variables and two parameters. TI-89 / TI-92 Plus Developer Guide #5,-(sp) ; push size of myid myid(a6) ;...
  • Page 70: Figure 6.1: Example Of Asm Stack Memory

    Here is how stack memory looks in the above example after subroutine entry. 12 bytes L20(a6) saved D3, D4, and A2 TI-89 / TI-92 Plus Developer Guide Chapter 6: Assembly Language Programming Overview a6,#-8 ; allocate 8 bytes for local ;...
  • Page 71: Sample Asm Program

    /* Pop character number into variable */ VarStore(varname, STOF_ESI, 0, top_estack); To get a keypress code into, say, variable k, in your TI-BASIC program call waitkey (“k”). TI-89 / TI-92 Plus Developer Guide accepts a keypress from the user. It...
  • Page 72: Ti-89 / Ti-92 Plus Developer Guide Not For Distribution Beta Version January

    Chapter 6: Assembly Language Programming Overview TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 73: Flash Application Layout

    7.1. File Format AMS application files are embedded within three layers of headers: the Flash header used by TI-GRAPH LINK™ software, the certificate header needed for license tracking, and the application header needed by the AMS OS. Flash header Certificate header...
  • Page 74: Certificate Header

    (zero-padded on the right end if length < 8 bytes) filler (zeros) device type (0x98 = TI-89, 0x88 = TI-92 Plus) data type (0x24 = application) filler (zeros) length of data following header Table 7.1: Flash Header Format...
  • Page 75: Application Header

    Note: This field must match the internal application name in the Flash header. The internal application names in the app header and Flash header are case sensitive and must be identical. TI-89 / TI-92 Plus Developer Guide Contents magic number (0x167B533D)
  • Page 76: Flags

    7.1.3.4. Length of Data Segment The data segment length is the amount of static RAM to allocate to the application when it is loaded into the calculator. It consists of the static initialized (.data) and uninitialized (.bss) RAM sections. 7.1.3.5.
  • Page 77: Length Of Initial Data Table

    The application’s data segment is initialized when the application is installed and reinitialized every time the application is moved in Flash memory because of garbage collection. TI-89 / TI-92 Plus Developer Guide Contents hole offset base (2 bits) and relative value to place in hole (22 bits) Table 7.4: Relocation Map Format...
  • Page 78: Signature

    7.2. Layout in Memory The OS creates an Application Control Block (ACB) for each app in the calculator whether it is one of the built-in apps that come preinstalled from the factory or installed later as a Flash app.
  • Page 79 The data segment contains the app’s Application Control Block, initialized data (.data), and uninitialized data (.bss). The OS frees the data segment when the application is deleted. TI-89 / TI-92 Plus Developer Guide 0x1000 — ACB_BG, app receives background processing.
  • Page 80: Source Layout

    An AMS application can serve several purposes. It can have an interactive user interface through windows and the keyboard — the most common usage. It can extend TI-BASIC with a library of functions and programs. It can implement a shared-code library — routines which can be called from other applications. And, it can override tables in the OS or another application to provide local language customization.
  • Page 81: Frame

    Note: The OS does not check that attribute selectors are in increasing order. You must make sure the attributes are in order when you create the frame. Attribute look-up will fail if they are not. TI-89 / TI-92 Plus Developer Guide , a pointer to the root of the object hierarchy OO_SYSTEM_FRAME...
  • Page 82: Pointer To Frame

    7.3.1.3.1. Attribute OO_APP_FLAGS (0x1) APP_Flags GetAppFlags(AppID) 0x0001 APP_INTERACTIVE 0x0002 APP_CON TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout macro. ENDFRAME macros create data structures which reside in Flash const before any other initialized static variables, the first Application has an interactive interface.
  • Page 83: Attribute Oo_App_Name (0X2)

    Pointer to the application’s name. This name is displayed in the app’s pop-up menu if the application has an interactive interface. The length of the name should be no more than 20 characters on the TI-89 and no more than 32 characters on the TI-92 Plus.
  • Page 84: Attribute Oo_App_Default_Menu (0X5)

    APP_EXT_ENTRY const * GetAppExtEntries(AppID) Pointer to an array of each exported TI-BASIC function or program. An entry contains a pointer to the C routine which implements the extension, and a flag word which indicates whether the extension is a function or program.
  • Page 85: Method Oo_App_Localize (0Xa)

    The OS uses this method to query applications while it is preparing to garbage collect Flash memory. This method is optional. Implement it only if you have special requirements for when your app can be moved. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 86: Method Oo_App_Viewer (0Xe)

    This method is optional. It should only be implemented if the application exports TI-BASIC extensions. The system implementation of this method displays the extension’s help string if this method is not implemented.
  • Page 87: Attribute Oo_Appstring (0X1000 And Up)

    /* Event handler - the OS calls this routine when an event has occurred void main(pFrame self, PEvent event) static short deltaX = 1, deltaY = 1; static short boxcount = -1; TI-89 / TI-92 Plus Developer Guide . The menu system and language localizers OO_APPSTRING /* This is an interactive app */...
  • Page 88 = MAX_BOX; if (box.x0 < 0) deltaX = sabs(deltaX); if (box.x1 > width) deltaX = -sabs(deltaX); TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout deltaX = -deltaX; deltaY = -deltaY; Not for Distribution Beta Version January 26, 2001...
  • Page 89 = 29; if (seed == 0) seed = 1; seed *= 16807; if (seed < 0) seed = -seed; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 90: Ti-Basic Extensions

    7.3.2. TI-BASIC Extensions Applications can extend TI-BASIC with functions and programs written in C or assembly language. The TI-BASIC interpreter interfaces with apps through the OO_APP_EXT_COUNT This example illustrates a simple application which implements a couple of TI-BASIC extensions.
  • Page 91 BYTE const HomeFolder[] = {0, 127, 0}; push_quantum (END_TAG); pSym = SymFindFirst(&HomeFolder[2], FO_NONE); while (pSym != NULL) push_zstr((char *)pSym->Name); pSym = SymFindNext(); push_quantum (LIST_TAG); TI-89 / TI-92 Plus Developer Guide help string #, OO_APPSTRING+H_HELP+H_folders, OO_APPSTRING+H_HELP+H_vars, APP_EXT_FUNCTION}, APP_EXT_FUNCTION} /* export two extension functions */...
  • Page 92 The C name of a function need not be the same as its TI-BASIC name — a language localizer may, in fact, override the exported name. The second field of each entry specifies whether the extension is a function (APP_EXT_FUNCTION) which returns a value on the estack, or a program (APP_EXT_PROGRAM) which does not return a value.
  • Page 93: Shared-Code Library

    Pascal. Function parameters list only the order and type of arguments. Do not include • parameter names. TI-89 / TI-92 Plus Developer Guide PlayerFileTable: FILE *; PlayerFileOpen(AppID, char const *): int; PlayerFileRead(AppID, int, char *, int): int; PlayerFileWrite(AppID, int, char const *, int): int;...
  • Page 94 FRAME(playerObj, OO_SYSTEM_FRAME, 0, OO_APP_FLAGS, . . .) ATTR(OO_APP_FLAGS, . . .) ATTR(OO_PLAYER_FILE_TABLE_COUNT, &fileTableCount) ATTR(OO_PLAYER_FILE_TABLE, fileTable) ATTR(OO_PLAYER_FILE_OPEN, fileOpen) ATTR(OO_PLAYER_FILE_READ, fileRead) ATTR(OO_PLAYER_FILE_WRITE, fileWrite) ATTR(OO_PLAYER_FILE_CLOSE, fileClose) ENDFRAME TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout Not for Distribution Beta Version January 26, 2001...
  • Page 95: Accessing A Library

    [ slot-number ] func-name (AppID [, type . . . ]) : type ; Comments begin with the pound sign (#) and extend to end of line. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 96 /* int * PlayerFileTableCount */ #define OO_PLAYER_FILE_TABLE_COUNT (65536) #define GetPlayerFileTableCount(obj) \ (int *)OO_GetAppAttr(obj,65536) #define SetPlayerFileTableCount(obj,value) \ OO_SetAppAttr(obj,65536,(void *)value) TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout fileio.h 2000.04.13 09:10 fileio.fdl Frame Description Language compiler, version 2.000 Not for Distribution...
  • Page 97 C compiler will correctly type-check arguments and function return value. Imagine trying to create that macro manually! TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 98: Language Localization

    7.3.4. Language Localization Menu titles and item names, dialog text, help strings, error messages, TI-BASIC extension names, the name of the application as it appears on the app’s pop-up menu, any string which appears in the app’s object frame, can be overridden with a localizer app to add language customization.
  • Page 99 /* Place the translated strings here. Keep the following OO_Hdr structure and target strings array together. The OO_Hdr structure is an object frame header for the following array of string attributes. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 100 PACKs or UNINSTALLs. **********************************************************************/ void observer(pFrame self, PEvent e) Access_AMS_Global_Variables; pFrame super = OO_SuperFrame; switch (e->command) TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout // <---------------- local translation of strings Not for Distribution Beta Version January 26, 2001...
  • Page 101 We have just been notified that a new app was installed. Is it our Target application? If so, apply our localization to it. **********************************************************************/ void noticeInstall(pFrame self, ACB const *pacb) if (strcmp((char *)pacb->appHeader->name, (char *)TargetApp) == 0) localize(self, XR_stringPtr(XR_NativeLanguage)); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 102: How Localization Works

    A string search would begin with the app frame then proceed to the system frame. After installing a localizer, the ACB is redirected to point first to the localizer frame. TI-89 / TI-92 Plus Developer Guide Chapter 7: Flash Application Layout system frame system frame app attributes &...
  • Page 103: Figure 7.4: Redirected App Frame

    The localizer app uninstalls its language hook when it sees the target app is about to be deleted or moved. It can reinstall its hook when it sees the target app has finished a move. TI-89 / TI-92 Plus Developer Guide system frame system frame app attributes &...
  • Page 104 Chapter 7: Flash Application Layout TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 105: Integrating A Flash Application

    Mode Settings A user can change the mode settings by either using the MODE screen or by executing the TI-BASIC setMode function. When any mode settings have changed, the array where they are stored is updated appropriately. In addition, all applications are sent a CM_MODE_CHANGE event message. The mode notification flags in the event message indicate which mode settings changed.
  • Page 106: Modifying Mode Settings Within An App

    MO_option Array and Settings Index Setting MO_OPT_CURRENT_FOLDER MO_OPT_SPLIT_SCREEN MO_OPT_NUMBER_OF_GRAPHS TI-89 / TI-92 Plus Developer Guide Chapter 8: Integrating a Flash Application — Graph mode change for graph 2 if in 2 graph mode. — The screen size has changed. — Angle mode has changed.
  • Page 107 Chapter 8: Integrating a Flash Application Index Setting MO_OPT_GRAPH_TYPE_1 MO_OPT_GRAPH_TYPE_2 MO_OPT_SPLIT_1 MO_OPT_SPLIT_2 MO_OPT_SPLIT_RATIO MO_OPT_ANGLE MO_OPT_PRECISION MO_OPT_FIX MO_OPT_NUMBER_FORMAT MO_OPT_VECTOR_FORMAT MO_OPT_COMPLEX_FORMAT TI-89 / TI-92 Plus Developer Guide Description D_GRAPH_TYPE_FUNCTION=1, D_GRAPH_TYPE_PARAMETRIC, D_GRAPH_TYPE_POLAR, D_GRAPH_TYPE_SEQUENCE, D_GRAPH_TYPE_3D, D_GRAPH_TYPE_DIFF_EQUATIONS D_GRAPH_TYPE_FUNCTION=1, D_GRAPH_TYPE_PARAMETRIC, D_GRAPH_TYPE_POLAR, D_GRAPH_TYPE_SEQUENCE, D_GRAPH_TYPE_3D, D_GRAPH_TYPE_DIFF_EQUATIONS The app ID which is implemented as the memory handle of the first application’s...
  • Page 108: Switching To The Home Screen

    Switching to the Home Screen Under certain circumstances such as low memory, an application may need to quit and default back to the Home screen application. If the calculator is in full screen then simply exiting the application using EV_quit will cause the Home screen application to start.
  • Page 109: Catalog

    F1: Help dialog. Once in the catalog, if any user-defined functions or programs exist then the F4: User-Defined catalog toolbar selection item will be available. The † function key will display the user-defined functions and TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 110: Figure 8.3: User Program

    Figure 8.3: User Program Figure 8.4: User-Defined Catalog Figure 8.5: Help Dialog for User-Defined Catalog TI-89 / TI-92 Plus Developer Guide Chapter 8: Integrating a Flash Application Not for Distribution Beta Version January 26, 2001...
  • Page 111: Flash App Extensions

    Flash applications loaded in the calculator installed App Extensions. Pressing the … function key will display the list of App Extensions in alphabetical order by function name with the name of the application that installed the App Extension to the right of the function or program name.
  • Page 112: Interfacing With Ti-Basic

    Stack for a description of this stack and its contents. For a description of the data types used by TI-BASIC see chapter 14. Data Types. An app can also embed entire TI-BASIC programs or data. In fact, an app can consist of essentially nothing but TI-BASIC programs and data as shown in the following example.
  • Page 113 ENDTRY return hVal; BOOL RunProg( char *ProgName ) HANDLE hCommand, hResult; char *pCommand; SINT errCode; TI-89 / TI-92 Plus Developer Guide hResult = HS_popEStack(); ProgSize, ProgEnd(Prog))) if (hVal = SymPtr->hVal) memcpy( HeapDeref(hVal), Prog, ProgSize ); Not for Distribution Beta Version January 26, 2001...
  • Page 114 EV_defaultHandler(e); break; The previous example showed how to run a TI-BASIC program from an application. If an application just needs to execute a function or expression to return some value then the following example will do that. The function tCmdLineDriver below inputs a string from the user using a dialog box.
  • Page 115 In the CmdLine example above, the SET_SIDE_EFFECTS_FORBIDDEN and SET_SIDE_EFFECTS_PERMITTED macros can be removed in order to run TI-BASIC commands. This will cause no problems for an app if the user enters define or store commands. Or if the app itself issues the commands, it can know...
  • Page 116: Verifying The Os Version

    Graph or DspTbl. These commands, along with several others, cause a context switch which the app must handle. See the example app in section 8.4 Interfacing with TI-BASIC (specifically the runningBASIC flag) for how to handle the context switch.
  • Page 117: Optimizing Code Space

    AP_EventHandler routine and used instead of &appW. Since there was only one additional reference to appWRect an additional pointer to access that global was not created. TI-89 / TI-92 Plus Developer Guide | WF_DUP_SCR)) Not for Distribution...
  • Page 118: Var-Link

    See the FOpen routine for an example app viewer. In terms of sample code see the VarCreateFolderPopup routine for the source to VAR-LINK’s F2 (view) key. TI-89 / TI-92 Plus Developer Guide Chapter 8: Integrating a Flash Application Not for Distribution...
  • Page 119: Application Control Flow

    9.1. Event-Driven Architecture The TI AMS Operating System (OS) implements an event-driven architecture. After initializing the system, the operating system goes into a loop checking each hardware device for an event such as a keypress or clock tick. When a device indicates it needs processing, the OS packages information about the event into a message and sends it to the currently active application.
  • Page 120: Event Structure Layout

    } Event, *PEvent; command — sourceID — TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow statement to decode what kind of event it switch A command number encoding which event occurred. This may be, among others, a keyboard event, a message from the window system, or an application-to-application message.
  • Page 121: Commands

    0x700 – 0x7BF System commands 0x700 0x701 TI-89 / TI-92 Plus Developer Guide Which side of the screen the application’s window occupies. An application sharing the screen with another application in split screen mode can tell which side of the screen it is on, either AP_SIDE_A for the top or left side, or AP_SIDE_B for the bottom or right side.
  • Page 122 0x703 0x704 0x705 0x706 0x707 TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow CM_START Sent to an application when it is being started. Included in the start message is a rectangle with the requested window location and size chosen by the user from the mode screen settings.
  • Page 123 0x70D 0x70E 0x70F 0x710 TI-89 / TI-92 Plus Developer Guide CM_RESTART Notifies the current application that the user has chosen to start the same application from the APPS menu. Applications may choose to ignore this command and there is no default handling.
  • Page 124 0x726 0x727 0x730 0x740 0x750 TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow CM_CUT Cut selected text to the clipboard. This and the following text editing commands are generated by menu choices or translated from CM_KEY_PRESS commands by the default event handler.
  • Page 125 Display information about the application. CM_MODE_CHANGE Sent to every application when mode settings have been changed on the MODE screen or by the TI-BASIC setMode function. Flags in the event message indicate which mode settings changed. CM_SWITCH_GRAPH Sent to every application when the user switches between graphs in two-graph mode.
  • Page 126: Starting And Stopping An Application

    9.4. Starting and Stopping an Application The calculator OS starts an application by sending it the CM_START message. A field in the start message points to a window rectangle. This rectangle defines the window location and size previously established by the user with split window mode settings.
  • Page 127: Keyboard Events

    The CM_QUIT message tells the application to save the user’s work and close its window (WinClose). If the user has the calculator in split screen mode, he can switch the focus to the application on the other side of the screen. When this happens, the application receives CM_UNFOCUS and CM_DEACTIVATE messages in that order.
  • Page 128: Static Menus

    See section 11.5. Resource Compiler on how to compose a menu source file and use the resource compiler to create an object file suitable for linking with your application. TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow Not for Distribution...
  • Page 129: Dynamic Menus

    OO_APP_DEFAULT_MENU attribute. If it finds a pointer to a menu there, it calls MenuBegin to draw the menu across the top of the calculator screen, and saves a handle to the menu in application frame attribute OO_APP_DEFAULT_MENU_HANDLE.
  • Page 130: Paint Events

    CM_KEY_PRESS The info.keyInfo.keyCode field of the CM_KEY_PRESS event contains a value indicating which key the user pressed. Many keypresses are translated into a TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow Not for Distribution Beta Version January 26, 2001...
  • Page 131: Table 9.1: Keypress Translations

    KB_SIGMA (TI-92 Plus only) KB_INTEGRAL KB_DIFF KB_ROOT KB_OPTION + '0' KB_OPTION + '=' KB_OPTION + '.' Table 9.1: Keypress Translations Several keypresses initiate special handling. TI-89 / TI-92 Plus Developer Guide Translated String Ans(1) sin( cos( tan( & © Not for Distribution...
  • Page 132: Table 9.2 Keypress Actions

    KB_CUSTOM KB_MODE KB_MENU KB_FLASH_APPS KB_MEM KB_INSERT TI-89 / TI-92 Plus Developer Guide Chapter 9: Application Control Flow Action Sends CM_STO command to the current app. Sends CM_RCL command to the current app. Initiates menu processing using the menu registered by the current app.
  • Page 133: Cm_Paste_String

    CM_PASTE_STRING is not handled by the application, the default event handler breaks the paste string up and feeds each character back to the app in CM_KEY_PRESS events. TI-89 / TI-92 Plus Developer Guide Action Terminates the current app and switches to the Home screen.
  • Page 134: Cm_Paste_Handle

    Installing, Moving, and Deleting an Application The OS sends CM_INSTALL to an application after it is downloaded into Flash memory, and when the calculator is reset. The OS allocates RAM for the application’s data segment, zeros uninitialized static variables and sets the values of initialized static variables.
  • Page 135 Any memory handles the application allocated when it was installed or while it was active should be deleted at this time to prevent memory leaks. TI-89 / TI-92 Plus Developer Guide publicstorage . When the application receives the unpack...
  • Page 136 Chapter 9: Application Control Flow TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 137: Error Handling

    The Sierra C™ compiler generates more compact code for the ER_throw macro. 10.2. Delayed Error Messages You should not throw an error while processing events CM_START, CM_ACTIVATE, CM_FOCUS, CM_UNFOCUS, CM_DEACTIVATE, CM_QUIT, CM_WPAINT, CM_INSTALL, CM_UNINSTALL, CM_PACK, CM_UNPACK, TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 138: Throwing Your Own Errors

    This can happen when another app calls routines in your shared-code library or when a TI-BASIC program calls an extension function defined in your app. How do you throw application errors if your app is not the current app? ER_throwFrame to the rescue! ER_throwFrame takes two arguments —...
  • Page 139: Catching Errors

    HANDLE h1 = H_NULL, h2 = H_NULL, h3 = H_NULL; h1 = HeapAllocThrow(BUF1_SIZE); h2 = HeapAllocThrow(BUF2_SIZE); h3 = HeapAllocThrow(BUF3_SIZE); ONERR HeapFreeIndir(&h1); HeapFreeIndir(&h2); PASS; ENDTRY TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 140: Caveats

    ONERR or FINALLY macro is reached. It is very important that the code in a TRY block does nothing to corrupt the TRY stack. TI-89 / TI-92 Plus Developer Guide Chapter 10: Error Handling Not for Distribution...
  • Page 141: Referencing Auto Variables In Onerr/Finally Blocks

    CM_FOCUS, CM_UNFOCUS, CM_DEACTIVATE, CM_QUIT, CM_WPAINT, CM_INSTALL, CM_UNINSTALL, CM_PACK, CM_UNPACK, CM_INIT, or CM_MODE_CHANGE. See section 10.2. Delayed Error Messages for details on how to signal exceptions under these circumstances. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 142 Chapter 10: Error Handling TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 143: Creating The User Interface

    { struct { SCR_COORDS x0, y0; SCR_COORDS x1, y1; } xy; unsigned long l; } SCR_RECT; TI-89 / TI-92 Plus Developer Guide WINDOW typedef signed short WIN_COORDS; typedef struct { WIN_COORDS x0, y0; WIN_COORDS x1, y1; } WIN_RECT;...
  • Page 144: Bitmap

    MENUs. 11.2. Windows The Window routines provide a method to write to the screen of the calculator. Each active window must have an associated WINDOW structure. The Window routines use the WIN_RECT structure (defined in section 11.1.1. Screen/Window Regions and Coordinates) to define regions.
  • Page 145: Window Regions And Coordinates

    WIN_RECT that defines the region of its window. This region is based on whether the calculator is in full or split screen mode and the side of the screen split of the current app. An app can create additional windows which may overlap.
  • Page 146: Window Routines

    WinHome WinLine WinLineExt WinLineRel TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface — Make a window the current active window. — Set the attribute for the next write to a window. — Change the current default attribute for the background of a window.
  • Page 147: Menus

    Internally, menus are kept as a MENU structure that contain one or more MENU_ITEM structures at the end. Static menus are created with the resource TI-89 / TI-92 Plus Developer Guide — Draw a line from the current pen location.
  • Page 148: Menu-Draw Structure

    DynMenuAdd DynMenuChange FKeyI_H MenuAddIcon TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface — Add a new entry (text, icon, or bitmap) to a dynamic menu or pop-up. — Change an entry in a dynamic menu or pop-up.
  • Page 149 PopupBeginDo PopupClear PopupDo PopupNew TI-89 / TI-92 Plus Developer Guide — Add a text entry to a dynamic menu. — Begin the use of a menu by allocating a menu-draw structure and drawing the menu’s top-level. — Set, clear, flip, or return the status of a check mark for a menu item.
  • Page 150: Dialog Boxes

    DrawStaticButton — Utility routine to draw dialog box style buttons at the VarNew VarOpen VarSaveAs TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface — Return a pointer to the text of a dynamically created pop-up. — Return the currently selected top-level menu item as set by MenuTopSelect.
  • Page 151: Dialog Fields

    Buffer array ( Flen ), and a display length in characters, not pixels ( Dlen ). The data in the Buffer array is copied to the display when Dialog is first TI-89 / TI-92 Plus Developer Guide char * TextPtr , HANDLE (* GetPopup ) (WORD),...
  • Page 152: Header

    This value is the field index of the item that will now be the top-most item in the dialog box. This scheme allows for multipage dialog boxes like the MODE screen on the calculator, see example TI-89 / TI-92 Plus Developer Guide...
  • Page 153: Popup

    DF_SCROLLABLE bit set in their flag byte. The coordinates of the scrollable fields are relative to the dialog box except that they may extend beyond the TI-89 / TI-92 Plus Developer Guide char * TextPtr , MENU * Popup , WORD OptionIndex...
  • Page 154: Text

    The XFLAGS field defines an array of four extended WORD flags. Currently only the first WORD is used and may contain the following flags. The remaining three WORDs should always be set to zero for future compatibility. TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface char * TextPtr VL_VarName );...
  • Page 155: Dialog Flags

    ° is pressed in a dialog box, the dialog box will be closed and VAR-LINK will be activated. XF_NO_ALPHA_LOCK On the TI-89, Alpha-Lock is turned on for all dialog boxes with edit fields. Setting this extended flag disables this feature. XF_VARLINK_SELECT_ONLY...
  • Page 156: Dialog Call-Backs

    See section 11.4.2.7. MENU for more details. EDIT — Address pointing to the data the user just entered. TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface Redraw the dialog box and ignore the key just pressed by the user.
  • Page 157: Resource Compiler

    Resource Compiler The resource compiler (rc2.exe) is used to create dialog boxes, menus, and pop-ups. Normally, the TI FLASH Studio™ (IDE) will call the Resource Compiler. The resource compiler translates resource descriptions into internal structures usable by the AMS. To call the Resource Compiler manually, the following syntax is used.
  • Page 158 F2 and F3 are bitmaps, the width of the corresponding tabs is not as wide as if they had been defined as ICONs which are always assumed to be 16 by 16 in a menu. TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface character followed by the...
  • Page 159: Dialog Boxes

    Each item within the dialog structure has a Flags byte and an (x, y) coordinate of the upper left pixel of the field. All coordinates in a dialog box are relative to the upper left corner of the dialog box. TI-89 / TI-92 Plus Developer Guide TotNumFields , FieldHeight Not for Distribution...
  • Page 160: Menus

    .h). The default numbers may be changed by following a name with an equals sign and then a number specifying the modified ID value. TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface Not for Distribution...
  • Page 161: Popups

    This value may be overridden as long as the size of any title is taken into account. TI-89 / TI-92 Plus Developer Guide is not a parent since it is a stand-alone entry. It can is a special case. It is a parent...
  • Page 162: Example

    WinStr( &appW, "Just activated\n" ); break; case CM_DEACTIVATE: WinEndPaint( &appW ); break; case CM_QUIT: if (appW.Next) { TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface /* Must be 1st! */ WinClr( &appW ); EV_quit(); WinClose( &appW ); appW.Next = NULL;...
  • Page 163 #define ACM_NOTHING #define ACM_HFONT // APPR1.R #include "app1.h" #include "tiams.h" TI-89 / TI-92 Plus Developer Guide if ((key <= 0xFF && isprint(key)) || KB_ENTER == key) { WinChar( &appW, key ); else EV_defaultHandler(e); vSelect = PopupDo( hPopup, -1, -1, 0 );...
  • Page 164 POPUP Popup1, RC_NO_IDS, 0 { "Item 1-1", 1 "Item 1-2", 2 POPUP Popup2, RC_NO_IDS, 0 { "Item 2-1", 1 "Item 2-2", 2 "Item 2-3", 3 TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface ACM_WINSTR ACM_DIALOG ACM_POPUP ACM_NOTHING ACM_HFONT...
  • Page 165: Files In Example And Explanation Of Details

    Line 36 Line 37 Line 38 Line 39 TI-89 / TI-92 Plus Developer Guide Specifies the standard header tiams.h, our header file app1.h, and the resource file appr1.h (generated by the resource compiler). All apps must have a frame that defines the interface between it and the system.
  • Page 166 Lines 65 . . . 67 Lines 68 . . . 70 Lines 73 . . . 77 TI-89 / TI-92 Plus Developer Guide Chapter 11: Creating the User Interface When another app is switched to in split screen mode or our app is about to be closed a deactivate message is sent and we restore the saved screen state.
  • Page 167 Lines 119, 120 Lines 121, 122 Lines 126 . . . 134 This example can be built using the TI FLASH Studio™. TI-89 / TI-92 Plus Developer Guide If there were no errors adding the dynamic elements to the pop-up (memory full), we execute the pop-up and display the results as with the dialog box.
  • Page 168 Chapter 11: Creating the User Interface TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 169: Basic Text Editing Facility

    TE_shrinkWrap. This routine selects and highlights all the text in the edit buffer. Call TE_close to close out a text edit record and release its memory. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 170: Simple Text Edit Example

    Text will scroll within the edit field if it is too long to be displayed. Arrows appear at either end to indicate some text has scrolled out of the edit field. TI-89 / TI-92 Plus Developer Guide Chapter 12: Basic Text Editing Facility CM_CUT...
  • Page 171: Clipboard

    CB_replaceTEXT can later be pasted into a text edit field. Likewise, text placed in the clipboard by the text editor can be retrieved by the app with a call to CB_fetchTEXT. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 172 Chapter 12: Basic Text Editing Facility TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 173: Memory Management

    HeapAllocHigh, HeapAllocHighThrow HeapAvail HeapCompress HeapDeref HeapFree HeapFreeIndir TI-89 / TI-92 Plus Developer Guide — Allocate memory from the heap. — Return the total amount of free bytes in the heap. — Coalesce all used heap blocks, deleting any free blocks from the heap if possible (garbage collection).
  • Page 174: File System

    For files opened in FM_READ mode, the FClose will merely update the mode of the file in the FILES structure to closed and clear the associated error status. TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management —...
  • Page 175: Opening Multiple Files For Write Mode

    FCreate to create multiple files that must be opened simultaneously in WRITE mode before they are opened. This will insure TI-89 / TI-92 Plus Developer Guide — Close a file, this is required for files opened in write mode.
  • Page 176: Managing Variables

    The hVal is the handle of the data for the symbol. • In general, symbol table routines do not return direct pointers to SYM_ENTRYs (the exceptions being SymFindFirst, SymFindNext, and SymFindPrev). TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management Not for Distribution Beta Version January 26, 2001...
  • Page 177: Figure 13.1: Token Representation Of Varname A23456

    Reserved function names (y1, y99, xt1, . . . ) • System commands (AndPic, BldData, Circle, . . . ) • • System functions (abs, sin, cos, . . . ) TI-89 / TI-92 Plus Developer Guide ‘3’ ‘4’ ‘5’ ‘6’ Not for Distribution...
  • Page 178: Normal Symbol Routines

    The system variables and reserved function names is a finite list that is defined in Appendix B of the TI-89 / TI-92 Plus Guidebook and cannot be used for anything else. The system commands and functions are also reserved; but an application localizer can redefine their spelling for a particular language.
  • Page 179: Storing And Retrieving Variable Data

    TI-89 / TI-92 Plus Developer Guide — Set current default folder (TI-BASIC version of FolderCur). — Tokenize a name and check for invalid or reserved names. —...
  • Page 180: Store And Recall Look-Up Paths

    If it exists, return the HSYM handle. Otherwise, the variable does not exist in the current path and H_NULL is • returned. TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management Not for Distribution Beta Version January 26, 2001...
  • Page 181: Store Look-Up Path

    There is another function, HToESI, that will return a pointer of the type EStackIndex to the data type tag. TI-89 / TI-92 Plus Developer Guide — No restrictions.
  • Page 182 (for example, xmin or xc). When these variables are accessed while graphing, an error is reported by VarRecall. Locked variables may be looked up with VarRecall. TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management /* handle */...
  • Page 183: Hsym Varstore

    Otherwise, the new value is not allocated (return value->hSym may still not be H_NULL if previous data existed in that variable). For STOF_ESI, STOF_HESI, and STOF_ELEMENT the source is copied to the new destination. TI-89 / TI-92 Plus Developer Guide — parm1 is an EStackIndex pointing to a locked block of memory, most likely the estack.
  • Page 184: General Data Storage

    VarStore( Name+5, STOF_ESI, 0, top_estack ); top_estack = old_top; Some variables are system protected. These include programs and functions (TI-BASIC or ASM), data variables, graph databases, third-party data-types TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management — The value stored is in the wrong domain or of the wrong type for the variable being stored to.
  • Page 185: System Functions

    C string format (the pointer to the first letter in the name is passed, not to the zero byte terminator as with tokenized names). TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 186: Utilities

    SymDel SymFind SymFindFirst SymFindFoldername SymFindHome SymFindMain SymFindNext SymFindPrev TI-89 / TI-92 Plus Developer Guide Chapter 13: Memory Management — Delete a variable given its HSYM. — Create a fully qualified (name and folder) symbol name from an HSYM. — Create an HSYM given a SYM_ENTRY pointer and the handle of its folder.
  • Page 187: Data Types

    Data Types The TI AMS Operating System (OS) supports the following data types: Expressions • Lists • • Matrices • Data Variables Text Variables • Strings • Graph Databases • Pictures • Programs • • Functions • Assembly Programs Third Party Data Types (FILEs) •...
  • Page 188: Table 14.1: Data Tag Values

    NEGATIVE_INTEGER_TAG POSITIVE_FRACTION_TAG NEGATIVE_FRACTION_TAG FLOAT_TAG STR_DATA_TAG LIST_TAG USER_DEF_TAG DATA_VAR_TAG GDB_VAR_TAG PIC_VAR_TAG TEXT_VAR_TAG COMMAND_TAG END_TAG END_OF_SEGMENT ASM_PRGM_TAG GEN_DATA_TAG Table 14.1: Data Tag Values TI-89 / TI-92 Plus Developer Guide Chapter 14: Data Types Values Not for Distribution Beta Version January 26, 2001...
  • Page 189: Expression

    Length of denominator Positive/negative numerator (bignum first) binary data Length of numerator POSITIVE/NEGATIVE_FRACTION_TAG Table 14.3: Data Object for a Positive or Negative Fraction TI-89 / TI-92 Plus Developer Guide Bytes var. max 255 Bytes var. max 255 var. max 255...
  • Page 190: Floating-Point Numbers

    Description Data length of list END_TAG Expressions (1 per element of list) LIST_TAG Table 14.5: Data Object for a List TI-89 / TI-92 Plus Developer Guide Chapter 14: Data Types Bytes variable Not for Distribution Bytes 7 (MSD->LSD)
  • Page 191: Matrix

    END_TAG (one for each row) Expressions (1 per element of list) LIST_TAG (one for each row) LIST_TAG Table 14.6: Data Object for a Matrix TI-89 / TI-92 Plus Developer Guide Bytes variable Not for Distribution Beta Version January 26, 2001...
  • Page 192: Data Variable

    DATA_VAR_TAG Table 14.7: Data Object for a Data Variable These blocks are repeated from zero to 99 times, depending upon the corresponding Number field immediately preceding the block. TI-89 / TI-92 Plus Developer Guide Chapter 14: Data Types Bytes variable...
  • Page 193: Text Variable

    Data length of string. String, stored left to right. 0 (end of string) STR_DATA_TAG Table 14.10: Data Object for a String Variable TI-89 / TI-92 Plus Developer Guide Table 14.8: Data Object for a Text Variable Bytes variable Not for Distribution...
  • Page 194: Graph Database

    TI-89 / TI-92 Plus graph databases which are noted below. TI-92 graph databases can be sent to the TI-89 / TI-92 Plus but TI-89 / TI-92 Plus graph databases cannot be sent to a TI-92. Once it is received by the...
  • Page 195 Graph 1 Range Settings (based on Graph 1 Mode) Function Parametric Polar xmin xmax xscl ymin ymax yscl xres Table 14.11: Data Object for a Graph Database TI-89 / TI-92 Plus Developer Guide Setting Value Sequence 3D xmin xmin xmin xmax xmax xmax...
  • Page 196 1 byte: x axis for custom axes in Seq or DifEq Modes 1 byte: y axis for custom axes in Seq or DifEq Modes 2 bytes: Flags 1 byte: TI-89 / TI-92 Plus 3D Mode Style 1 byte: Unused Table 14.11: Data Object for a Graph Database...
  • Page 197 Seq or DifEq mode, or if graph 1 = same mode) Initial Condition Number Initial Condition Expression (including length) Repeat above two lines for each additional initial condition Table 14.11: Data Object for a Graph Database TI-89 / TI-92 Plus Developer Guide Value 0x80 0x40 Not for Distribution...
  • Page 198: Bitmap Pic Images

    TI-92 graph databases only contain the first four bytes of graph format data. The TI-92 3D mode style flag is not used by the TI-89 / TI-92 Plus, which uses the seventh byte for 3D style information. TI-92 graph databases do not use the 3D Expanded View flag since that was not available on the original TI-92.
  • Page 199: Tokenized Programs And Functions

    This flag byte contains the flags listed below. For tokenized programs/functions the FF_PARSE flag bit will be set to zero. TI-89 / TI-92 Plus Developer Guide Bytes variable...
  • Page 200: Table 14.14: Flag 1 Values

    Graph Style (Least Significant Bits) Line Thick Animate Path Above Below Square FF_PARSE FF_ADD_TO_RECENT FF_ADD_TO_PRIOR FF_RECENT FF_PRIOR TI-89 / TI-92 Plus Developer Guide # of Bits Table 14.14: Flag 1 Values Not for Distribution Chapter 14: Data Types Value Beta Version January 26, 2001...
  • Page 201: Programs And Functions In Text Format

    Note that the Flag 3 byte is not used. The Flag 1 and Flag 2 bytes are the same as for tokenized programs/functions (listed above) except that the FF_PARSE bit in Flag 1 is set to one. TI-89 / TI-92 Plus Developer Guide Bytes variable...
  • Page 202: Third Party Data

    Assembly Program Assembly programs are stored in binary format. Description Length Contents (assembly) ASM_PRGM_TAG Table 14.17: Data Object for an Assembly Program TI-89 / TI-92 Plus Developer Guide Chapter 14: Data Types Bytes variable Bytes variable Not for Distribution Beta Version January 26, 2001...
  • Page 203: Expressions And The Expression Stack

    In this representation an expression occupies one contiguous block of memory allocated as an array of Quantums. A Quantum is defined in the system by the C declaration: typedef unsigned char Quantum; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 204: Tags

    Quantum. For example, the single letter variables a through z, the symbolic constants TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack (highest address)
  • Page 205: Numbers

    A negative integer is represented as a NEGATIVE_INTEGER_TAG on top of a sized integer magnitude. So, the tagged integer representation of the negative integer L65534 is 254 255 2 NEGATIVE_INTEGER_TAG. TI-89 / TI-92 Plus Developer Guide . Thus, the sized integer magnitude for the integer 65534 would Not for Distribution...
  • Page 206: Table 15.2: Tagged Integer Examples

    1. The system does not generate nor expect any other fraction whose numerator or denominator is zero. Invalid fractions will cause unexpected behavior. TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack Tagged integer representation...
  • Page 207: Variables, Units And Physical Constants

    Table 4.2: Character Set. Valid name characters are specified in the TI-89 / TI-92 Plus Guidebook. Names are case insensitive, so x and X are both tokenized as X_VAR_TAG, and abc, Abc, AbC, and so on, are all tokenized as VAR_TAG a b c VAR_TAG.
  • Page 208: Other Constants

    Finite Finite e (base of the natural ln) Finite ( (L1)) Transfinite Transfinite Transfinite Transfinite 0/0 (any real value) TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack TRUE_TAG FALSE_TAG PI_TAG E_TAG I_TAG MINUS_INFINITY_TAG PLUS_INFINITY_TAG PLUS_OR_MINUS_INFINITY_TAG UNDEFINED_TAG Table 15.5: Symbolic Constants...
  • Page 209: One-Argument Tags

    Expression zeros(ln(x),x) mod(a, b) nCr(m, n) Table 15.7: Examples of Functions of Two Arguments TI-89 / TI-92 Plus Developer Guide Representation X_VAR_TAG CHS_TAG (change sign) N_VAR_TAG FACTORIAL_TAG 20 1 NONNEGATIVE_INTEGER_TAG PERCENT_TAG X_VAR_TAG SIN_TAG VAR_TAG a b c VAR_TAG LN_TAG...
  • Page 210: Tags That Take More Than Two Or A Variable Number Of Arguments

    INTEGRAL_TAG. (sin(x), x, 0, ) is represented by END_TAG PI_TAG 0 NONNEGATIVE_INTEGER_TAG X_VAR_TAG X_VAR_TAG SIN_TAG INTEGRAL_TAG. TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack , all place the first operand deepest, then the second Representation...
  • Page 211: Lists And Matrices

    Expression getKey( ) vPOL Similarly, the primary tag value COMMAND_TAG is used on top of command tag values to provide representation for elements of the TI-BASIC programming language. TI-89 / TI-92 Plus Developer Guide Representation END_TAG GETKEY_TAG SECONDARY_TAG...
  • Page 212: User And Application Defined Functions And Programs

    The following tags only occur in external tokenized form. Simplification replaces these tags with a standard internal form. TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack Representation...
  • Page 213 Y_VAR_TAG MULTIPLY_TAG ADD_TAG. Since the system assumes that the variables x and y are real, the simplifier replaces this external form with the internal form X_VAR_TAG Y_VAR_TAG IM_RE_TAG. TI-89 / TI-92 Plus Developer Guide … y tokenizes as X_VAR_TAG I_TAG Not for Distribution...
  • Page 214: Most Main Ordering And Internal Representations Of Exponentiation, Multiplication, And Addition

    (FACTOR_TAG), expand( ) (EXPAND_TAG), and so on, never appear in the internal tokenized form. Calculator users prefer to see results in a more standard form, for example, x N y rather than x + (L1 † y) and a / b rather than a * (b^(L1)). Therefore, the system provides a routine called replace_top_with_post_simplified to transform internal tokenized form to external tokenized form.
  • Page 215 Finally, the simplifier makes sure that the topmost operand of each ADD_TAG is not a sum. Thus, a + b becomes B_VAR_TAG A_VAR_TAG ADD_TAG. The expression a N b becomes 1 1 NEGATIVE_INTEGER_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 216: The Expression Stack

    For example, replace_top2_with_sum replaces the top two expressions on the estack with the sum of those two expressions; replace_top_with_reciprocal replaces the TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack Not for Distribution...
  • Page 217: An Example Of Working On The Estack

    = number of periods The function returns future value fv as a BCD16. BCD16 fv (BCD16 pv, BCD16 ir, BCD16 np) return pv * pow(ir + 1.0, np); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 218: Estack Arguments And Results

    = pv * pow (ir + 1.0, np); /* push the future value on the estack */ push_Float (fv); TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack /* argument pointer */ /* BCD16 variables */...
  • Page 219: Estack Calculations

    If the arguments are of valid but differing types, they will be combined in an appropriate way. If the arguments are not valid for the specified calculation, an appropriate error will be reported. TI-89 / TI-92 Plus Developer Guide /* argument pointers */ Not for Distribution...
  • Page 220: Working With Lists

    (END_TAG != ESTACK(i)) ++count; i = next_expression_index (i); return count; TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack /* initialize counter */ /* while not at end of list */ /* increment counter */...
  • Page 221 TI-89 / TI-92 Plus Developer Guide /* push a zero on the estack */ /* while not at end of list */...
  • Page 222 /* apply sqrt function to the tail */ map_tail (push_sqrt, i – 1u); /* push the LIST_TAG on top of the tail */ push_quantum (LIST_TAG); TI-89 / TI-92 Plus Developer Guide Chapter 15: Expressions and The Expression Stack Not for Distribution Beta Version January 26, 2001...
  • Page 223: Working With Numbers

    The rational system is less suitable when fast approximate results are desired, such as during graphing. Since the TI-89 / TI-92 Plus calculators need both these capabilities, the Operating System includes both types of numbers.
  • Page 224: Exact/Approx/Auto Modes

    IS_ARITH_APPROX, and IS_ARITH_AUTO are used to test the status of the mode. The macros SET_ARITH_EXACT, SET_ARITH_APPROX, and SET_ARITH_AUTO are used to alter the mode setting. TI-89 / TI-92 Plus Developer Guide Chapter 16: Working with Numbers Not for Distribution Beta Version January 26, 2001...
  • Page 225: Floating Point Numbers

    UNDEFINED_TAG. BCD floating point supports an exponent range from -16384 to 16383. Tagged float exponents are limited to the calculator range of -999 to 999. push_Float converts overflow values to the corresponding symbolic infinity and underflow values to zero. Thus, while any tagged float can be moved into a C floating point variable, not all C floating point values can be converted to tagged floats.
  • Page 226 TI BCD floating-point system such as infinity and NAN (may also be referred to as undefined or invalid float) must be converted to the symbolic equivalents before being made available to the user.
  • Page 227: Rational Numbers

    For example, to add two values, simply pass the two values to the push_sum routine. push_sum understands tagged integers, tagged fractions, tagged floats, and in fact, all algebraic data TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 228: Complex Numbers

    External tokenized values are also handled by the display routines; for example, display_statements, Parse1DExpr, etc. TI-89 / TI-92 Plus Developer Guide Chapter 16: Working with Numbers tokenizes into an expression involving tagged Not for Distribution...
  • Page 229 Do not pass internal tokenized form to display_statements, Parse1DExpr, etc. First, use replace_top_with_post_simplified to convert the internal form to external form. Then the result can be handled by the display routines. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 230 Chapter 16: Working with Numbers TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 231: Graphing

    Graphing This chapter discusses the Graph application on the TI-89 / TI-92 Plus calculators and how to interface with it. 17.1. The Graph Screen The graph screen always has an odd number of pixels vertically and horizontally, even if the window itself has an even number of pixels. In this case, the rightmost column and/or the bottom row will not be used for graphing.
  • Page 232: Working With The Graph Application

    MO_OPT_SPLIT_SCREEN = D_MODE_SPLIT_FULL or MO_OPT_NUMBER_OF_GRAPHS = D_MODE_GRAPHS_1 (see section 8.1. Mode Settings), or an error can be displayed if the calculator is not in the correct mode when the app or ASM starts. In the default mode with one graph,...
  • Page 233 VarStore( (BYTE *)name, STOF_ESI, 0, top_estack ); top_estack = old_top; ONERR top_estack = old_top; PASS; ENDTRY TI-89 / TI-92 Plus Developer Guide /* restore top_estack */ /* restore top_estack */ Not for Distribution /* xmax=10 */ Beta Version January 26, 2001...
  • Page 234: Two Graph Mode

    17.3. Two Graph Mode If the app or ASM may be executing when the calculator is in two graph mode and needs to interact with the Graph application, graphing system variables or graph system functions, or any graph related application (Window Editor, Y= Editor, or Table), it must be aware of how two graph mode works.
  • Page 235: Graphing Functions

    8.1. Mode Settings). An ASM can change which window is active, allowing it to choose Graph 1 or Graph 2 if desired. When the calculator is returned to one graph mode, the graph that is kept as the current graph will be the one corresponding to the active split screen at that time.
  • Page 236: Graph Application Memory Usage

    Home screen is shown at first) and its backup screen is created. The backup screen for this graph window is always large enough for a full screen graph, even if the calculator is later put into split screen mode. TI-89 / TI-92 Plus Developer Guide...
  • Page 237: Available Graph System Routines And Global Variables

    17.6. Available Graph System Routines and Global Variables Any TI-BASIC graph command not specifically listed here can be accessed by entering the command as a string and executing it as described in section 8.4. Interfacing with TI-BASIC. Graph Global Variables: gr_active —...
  • Page 238 GraphActivate GrAxes GrClipLine GrLineFlt TI-89 / TI-92 Plus Developer Guide — Calculator command RclGDB. — Calculator command StoGDB. — Compute graph system variable x for the current active graph. — Compute graph system variable y for the current active graph.
  • Page 239 XCvtFtoP XCvtPtoF YCvtFtoP YCvtPtoF TI-89 / TI-92 Plus Developer Guide — Force a regraph of the current graph. — Verify that the step value of the independent variable for polar or parametric mode is valid. — Convert the given floating point x coordinate to a pixel column number based on the specified Window variables.
  • Page 240 Chapter 17: Graphing TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 241: Ti Flash Studio (Ide) Overview

    TI FLASH Studio™ is a development tool that uses an Integrated Development Environment (IDE) to give the user a familiar Windows interface. The TI FLASH Studio provides the capability to simulate the TI-89 / TI-92 Plus calculator on the PC to allow application development and debugging. The TI FLASH Studio allows the developer to use a set of development tools under the control of a single interface.
  • Page 242: Installation

    (default is FSInst.EXE). Follow the install procedure. The system may require a reboot prior to starting the program. TI FLASH Studio is installed in the default directory found on the Start menu under Programs/TI FLASH Studio. Caution: Sierra C™...
  • Page 243: Compiler/Assembler/Linker

    18.2.3. Compiler/Assembler/Linker A compiler, assembler, and linker are installed with TI FLASH Studio. The user can write software in C and create calculator programs and applications using this compiler. The language tools are customized to provide code for the TI calculators and the license that must be accepted prohibits other use of the language tools.
  • Page 244: Figure 18.1: Ti Flash Studio Home Screen

    An Output window allows the user to observe for errors during the compile, • assemble, and link phases of the build process. All generic output of TI FLASH Studio is written to this window. An Edit window is used to edit and debug the code. The Edit window uses a •...
  • Page 245: Uninstalling

    Chapter 18: TI FLASH Studio 18.2.6. Uninstalling When TI FLASH Studio is installed, an uninstaller is created on the host PC. When removing TI FLASH Studio from the host PC, use the uninstall utility to properly restore the Windows operating environment.
  • Page 246: Ti Flash Studio Interface

    18.3. TI FLASH Studio Interface Invoke TI FLASH Studio, see section 18.2.5. IDE Overview. The IDE presents the Home screen. This section describes the menu and toolbars of the TI FLASH Studio user interface, see Figure 18.2 and Figure 18.3.
  • Page 247: File Menu

    The File menu items are used to create, open, and save projects, see Figure 18.4. File management is currently not supported by TI FLASH Studio. However, file management (i.e., deleting, renaming, etc. of projects or project files) can be accomplished through the Windows Explorer.
  • Page 248: Edit Menu

    Figure 18.5: Edit Menu Item Copy Paste TI-89 / TI-92 Plus Developer Guide Icon Action Removes the currently selected text and copies it to the clipboard. Copies the currently selected text to the clipboard.
  • Page 249: View Menu

    Chapter 18: TI FLASH Studio 18.3.3. View Menu The View menu items allow the user to customize the TI FLASH Studio interface, see Figure 18.6. Figure 18.6: View Menu Item Project Explorer Output Registers Autos Watch TI-89 / TI-92 Plus Developer Guide Action Opens the Project Explorer window.
  • Page 250: Figure 18.7: Registers

    Column D0 to D7 A0 to A7 TI-89 / TI-92 Plus Developer Guide Figure 18.7: Registers Information These fields represent the values of the eight 32-bit general purpose data registers. These fields show the values of the 32-bit address registers. The first seven registers (A0 to A6) and the user stack pointer are used as software stack pointers and base address registers.
  • Page 251: Figure 18.8: Status Register

    When tracing is enabled, an exception is forced after each instruction is executed. Thus, a debugging program like the TI FLASH Studio, can monitor the Program under test. Indicates if the processor is in Supervisor mode. The processor executes instructions in one of two modes —...
  • Page 252: Figure 18.9: Watch

    Value Type Note: Symbol information in the Watch window is updated every time a debug operation is processed. TI-89 / TI-92 Plus Developer Guide Chapter 18: TI FLASH Studio Information Displays the symbol’s name. Shows the symbol’s value in hexadecimal.
  • Page 253: Project Menu

    Build Rebuild All Build Configuration Project Settings TI-89 / TI-92 Plus Developer Guide Icon Action Assembles/Compiles the currently open file in the Editor window. The Sierra C compiler/assembler is invoked during this step. Sierra tools are installed as part of the setup.
  • Page 254: Debug Menu

    Item Step Into Step Over Breakpoints Trace Options TI-89 / TI-92 Plus Developer Guide Icon Action Single steps through the instructions in the program, and enters each function call that is encountered. This menu item is activated only when a breakpoint is hit.
  • Page 255: Figure 18.12: Breakpoints Submenu

    Breakpoint Remove Note: To remove the breakpoint, highlight the breakpoint (not just select it) and press the Remove button. TI-89 / TI-92 Plus Developer Guide Function Specify the address location where you would like to add the breakpoint. List all the breakpoints.
  • Page 256: Simulator Menu

    18.3.6. Simulator Menu The Simulator menu items perform various actions on the TI-89 / TI-92 Plus simulator, see Figure 18.13. Figure 18.13: Simulator Menu Item Halt View Simulator Load RAM Object Load Flash Object Save Image TI-89 / TI-92 Plus Developer Guide...
  • Page 257: Link Menu

    Chapter 18: TI FLASH Studio 18.3.7. Link Menu The Link menu allows the user to communicate between TI FLASH Studio and the calculator, see Figure 18.14. Figure 18.14: Link Menu Item Send RAM Objects Send Flash Objects Settings 18.3.8. Window Menu The Window menu contains the following standard Windows commands, see Figure 18.15.
  • Page 258: Help Menu

    18.3.9. Help Menu The Help menu has only one menu item, About, see Figure 18.16. This item displays the current version of the TI FLASH Studio in a pop-up window. Figure 18.16: Help Menu 18.4. Example This example walks through the TI FLASH Studio application development process.
  • Page 259: Building The Application

    Note: The default extension for the saved application is <file name>.8xk or <file name>.9xk depending on whether it is a TI-89 application or a TI-92 Plus application. The <file name>.clc file is also saved.
  • Page 260: Preparing The Application For Site Testing

    To support this need, TI may issue certificate for the testing calculator and set the developer up so that they can sign the app instead of TI. In this situation, the app will only run on the selected calculator.
  • Page 261: Preparing For Public Release

    Download the developer certificate to your calculator (the .89q or .9xq that has been emailed to you). Now you can download the signed app to your calculator using the TI-GRAPH LINK cable. Please use the latest version of the TI-GRAPH LINK software (v2.1). 18.4.7.
  • Page 262 Chapter 18: TI FLASH Studio TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 263: Glossary

    Garbage collection A procedure that automatically determines what memory is no longer being used and recycles it for other use. This is also known as heap compression. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 264 Changing the calculator to use the local language of another country. Localization Operating System (OS) The software loaded on all TI-89 and TI-92 Plus calculators. The OS contains the features that are of interest to customers, as well as behind-the-scenes functionality that allows the calculator to operate and communicate.
  • Page 265 TI-BASIC The programming language commonly used on the TI-89 and TI-92 Plus. It is the language that is used for PRGM variables. Its main drawback is that these programs run slower, since it is an interpreted language, rather than a compiled language.
  • Page 266 Glossary TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 267: Appendix A: System Routines

    Side Effects: Description of any side effect to be noted, including whether heap compression may occur or if an error may be thrown. Whether it is available on TI-89, TI-92 Plus, or both and on which version Availability: of the AMS.
  • Page 268 Appendix A: System Routines TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 269: Algebra Utilities

    ... 249 is_free_of_tag ... 250 is_independent_of... 251 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 270 ... 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 push_substitute_using_such_that... 291 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 271 Appendix A: System Routines — Algebra Utilities push_var_kern_tail... 292 re_index ... 293 reductum_index ... 294 remaining_factors_index... 296 replace_top2_with_imre... 298 See Also: is_variable... 1121. See Variable Name Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 272 Appendix A: System Routines — Algebra Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 273: Are_Expressions_Identical

    Returns TRUE if the expressions indexed by i and j are syntactically Outputs: identical. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: compare_expressions, is_equivalent_to Example: push_Float (3.0);...
  • Page 274: Compare_Expressions

    “compare equal.” None Assumptions: Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities j indexes Compare expression returns ln(y) ln(x)
  • Page 275 = remaining_factors_index (term); else return TRUE; return FALSE; TI-89 / TI-92 Plus Developer Guide (continued) /* Loop over factors of term */ /* base > all remaining bases in term */ Not for Distribution Beta Version January 26, 2001...
  • Page 276: Did_Push_Lincf

    . Otherwise pushes the coefficient of vi (perhaps 0), then returns TRUE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_poly_deg_in_var_or_kernel, linear_degree, index_if_pushed_binomial_info, index_if_pushed_qquad_info Example: If i indexes (x^2 †...
  • Page 277: Factor_Base_Index

    If k indexes an exponentiation tag, returns the index of the base. Otherwise Outputs: returns k . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: factor_exponent_index Example: EStackIndex lead_base_index (EStackIndex i) /* Returns the index of the lead base of any algebraic expression indexed by i.
  • Page 278: Factor_Exponent_Index

    Outputs: If k indexes an exponentiation tag, returns the index of the exponent. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: factor_base_index Example: EStackIndex lead_exponent_index (EStackIndex i) /* Returns index of the lead exponent of any expression indexed by i.
  • Page 279: Has_Different_Variable

    Returns TRUE if the expression has another variable. Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: main_gen_var_index, next_var_or_kernel_index, push_var_kern_tail Returns ignore_func if i indexes x + f(x) and vi indexes x.
  • Page 280: Im_Index

    Otherwise returns the index of an integer or float 0, depending on the arithmetic mode. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: re_index, replace_top2_with_imre Example: push_expression (Integer1Index);...
  • Page 281: Index_If_Pushed_Binomial_Info

    Otherwise returns NULL_INDEX. The degree can be any nonzero number, including negative and/or fractional. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 282: Index_If_Pushed_Qquad_Info

    Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_poly_deg_in_var_or_kernel, linear_degree, did_push_lincf, index_if_pushed_binomial_info TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 283 = top_estack; push_poly_deg_in_var_or_kernel (i, vq); replace_top2_with_prod (j); if (index_if_pushed_qquad_info (i, vq, top_estack)) return vq; top_estack = old_top; vq = next_var_or_kernel_index (i, vq); return NULL_INDEX; TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 284: Index_Numeric_Term

    Float0Index if IS_ARITH_APPROX is true and Integer0Index if IS_ARITH_APPROX is false. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_constant_terms TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 285 Returns TRUE if it does not have a top-level numeric term or if its magnitude is < MAX_EXP_ARG. Otherwise returns FALSE. i = index_numeric_term (i); return NULL_INDEX == i || FABS (estack_number_to_Float (i)) < MAX_EXP_ARG; TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 286: Index_Of_Lead_Base_Of_Lead_Term

    /* : Returns index of variable x */ add1_to_top (top_estack); index_of_lead_base_of_lead_term (top_estack); /* : Returns index of variable x */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* top_estack -> x^2 * y /* top_estack -> x^2 * y + 1...
  • Page 287: Index_Reductum_With_Tag_Base

    && index_reductum_with_tag_base (j, SIN2_TAG, FALSE) ) return TRUE; i = remaining_factors_index (i); return FALSE; TI-89 / TI-92 Plus Developer Guide — Index of the top tag of an internally-simplified algebraic expression. — A primary tag. Not for Distribution Beta Version January 26, 2001...
  • Page 288: Index_Rmng_Factor

    ( k = remaining_factors_index( i )) or lead_factor_index ( k = remaining_factors_index (remaining_factors_index( i ))), etc. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: index_rmng_fctrs_start_fctr_tag, index_rmng_fctrs_start_base,...
  • Page 289: Index_Rmng_Fctrs_Start_Base

    ( k = remaining_factors_index( i )) or lead_base_index ( k = remaining_factors_index (remaining_factors_index( i )), etc. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: index_rmng_fctrs_start_fctr_tag, index_rmng_fctrs_start_base_tag,...
  • Page 290: Index_Rmng_Fctrs_Start_Base_Tag

    (lead_base_index( k )) == q and ( k = i or k = remaining_base_index( i ) or k = remaining_base_index (remaining_factors_index( i )) or . . . ). Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: rmng_fctrs_start_fctr_tag, index_rmng_fctrs_start_base, index_rmng_factor Example: push_quantum (10u);...
  • Page 291: Index_Rmng_Fctrs_Start_Fctr_Tag

    (lead_factor_index( k )) == q and ( k = i or k = remaining_factors_index( i ) or k = remaining_factors_index (remaining_factors_index( i )) or . . . ). Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: index_rmng_fctrs_start_base_tag, index_rmng_fctrs_start_base, index_rmng_factor Example: push_quantum (10u);...
  • Page 292: Is_Free_Of_Tag

    Returns TRUE if the expression indexed by i does not contain tag q . Otherwise returns FALSE. Assumptions: None None Side Effects: All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_independent_of, is_independent_of_tail, is_tail_independent_of...
  • Page 293: Is_Independent_Of

    Outputs: the expression indexed by j . Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_free_of_tag, is_independent_of_tail, is_tail_independent_of Example: Boolean is_tail_independent_of (EStackIndex i, EStackIndex j) for (;;)
  • Page 294: Is_Independent_Of_Tail

    Outputs: all the elements in the tail indexed by j . Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_free_of_tag, is_independent_of, is_tail_independent_of Example:...
  • Page 295 Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_negative TI-89 / TI-92 Plus Developer Guide...
  • Page 296 = top_estack; push_integer_part (i); replace_top2_with_imre (j); else push_expression (i); push_quantum (INT_PART_TAG); } /* end push_integer_part */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities (continued) push_floor (i); push_ceiling (i); push_expression (i); Not for Distribution...
  • Page 297: Is_Polynomial_In_Var_Or_Kern

    . Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_totally_polynomial If i indexes x^-(3/2) + ln(y), then is_polynomial_in_var_or_kern returns Example: TRUE if vi indexes x or ln(y) or z, but returns FALSE if vi indexes y.
  • Page 298: Is_Tail_Independent_Of

    Returns TRUE if all of the elements of the tail indexed by i are syntactically Outputs: independent of the expression indexed by j . Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_independent_of, is_independent_of_tail Example: push_quantum (END_TAG);...
  • Page 299: Is_Term_Improper

    Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_make_proper, push_numerator, push_denominator, index_main_var, push_poly_deg_in_var_or_kern, push_poly_qr Example: push_quantum (8u);...
  • Page 300: Is_Totally_Polynomial

    Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: is_polynomial_in_var_or_kern Example: Returns TRUE if i indexes (x^(1/2) + y) † x.
  • Page 301: Lead_Base_Index

    /* Returns TRUE if at least one of the top_level factors has a physical unit or physical constant as a base. Otherwise returns FALSE. while (! IS_NUMBER_TAG (ESTACK (i))) if (IS_UNIT (lead_base_index (i))) return TRUE; i = remaining_factors_index (i); return FALSE; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 302: Lead_Factor_Index

    Otherwise returns i . Internally-simplified products and ratios have the most main factor shallowest, with less main factors deeper. Also, the lead factor of an internally-simplified product is never a product. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities (continued)
  • Page 303 Example: EStackIndex lead_base_index (EStackIndex i) /* Returns index of the lead base of any expression indexed by i. */ return factor_base_index (lead_factor_index (i)); TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 304: Lead_Term_Index

    Outputs: operands. Otherwise returns i . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: reductum_index, lead_factor_index, remaining_factors_index TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities...
  • Page 305 Otherwise returns FALSE. while (! is0 (i)) if (is_constant (lead_term_index (i))) return TRUE; else i = reductum_index (i); return FALSE; /* end has_constant_term */ TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 306: Linear_Degree

    , or returns 1 if the expression is obviously linear in vi . Otherwise returns L1. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: did_push_lincf, push_poly_deg_in_var_or_kernel, index_if_pushed_binomial_info, index_if_pushed_qquad_info Example: If i indexes (x^2 †...
  • Page 307: Main_Gen_Var_Index

    Returns the main generalized variable of any internally-simplified algebraic expression indexed by i . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: next_var_or_kernel_index Example: main_gen_var (sin(x)^2 * y + ln(z))
  • Page 308: Map_Unary_Over_Comparison

    — Index of the top tag of a simplified equation or inequality. Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: map_tail, all_tail, any_tail Example: If comparison indexes n>3, then (&push_factorial, comparison)
  • Page 309: Next_Var_Or_Kernel_Index

    , or returns NULL_INDEX if there is no such variable or kernel. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 310: Numeric_Factor_Index

    Float1Index if IS_ARITH_APPROX is true and Integer1Index if IS_ARITH_APPROX is false. None Assumptions: None Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_constant_factors, index_numeric_term, push_constant_terms TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 311 Float1Index if IS_ARITH_APPROX is true and Integer1Index if IS_ARITH_APPROX is false. /* Returns the index of a tagged integer or Float one. */ push_quantum (PI_TAG); numeric_factor_index (top_estack); TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 312: Push_But_Factor

    Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: lead_factor_index, remaining_factors_index Example: If i indexes x † y † 3 and j indexes the partial product y † 3, then...
  • Page 313: Push_But_Term

    . Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: lead_term_index, reductum_index Example: void push_but_term (EStackIndex i, EStackIndex j) if (i == j) push_expression (reductum_index (i));...
  • Page 314: Push_Constant_Factors

    — Index of the top tag of an internally-simplified algebraic expression. Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_nonconstant_factors, numeric_factor_index, push_nonnumeric_factors, push_dependent_factors, push_independent_factors Example: push_pi_on_quantum (2u);...
  • Page 315: Push_Denominator

    — Indexes the top tag of an internally-simplified algebraic expression. Outputs: None Assumptions: None None Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_numerator, push_standardize, push_comdenom Example: void push_denominator_of_com_denom (EStackIndex i) /* Pushes the denominator of the expression that would be obtained by putting the expression indexed by i over a common denominator.
  • Page 316: Push_Dependent_Factors

    (is_independent_of (i, var)) return; else times_top (i); else if (is_independent_of (i, var)) push1 (); else push_expression (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities expression. Not for Distribution Beta Version January 26, 2001...
  • Page 317: Push_Dependent_Terms

    (ADD_TAG == ESTACK (i)) push_dependent_terms (next_expression_index (--i), var); if (is_independent_of (i, var)) return; else add_to_top (i); else if (is_independent_of (i, var)) push0 (); else push_expression (i); TI-89 / TI-92 Plus Developer Guide expression. Not for Distribution Beta Version January 26, 2001...
  • Page 318: Push_Desolve

    (9u); push_quantum (PRIME_TAG); push_quantum (EQUATION_TAG); push_desolve (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* Push y' as left side */ /* Push general solution y = @1 * e^x Not for Distribution...
  • Page 319: Push_Div_Dif_1C

    Algebra Utilities Description: Pushes onto the estack the centered first difference (TI-BASIC function nDeriv) of the expression indexed by i , with respect to the variable indexed by vi , using the expression indexed by j as the step size.
  • Page 320: Push_Div_Dif_1F

    Algebra Utilities Description: Pushes onto the estack the forward first difference (TI-BASIC function avgRC) of the expression indexed by i , with respect to the variable indexed by vi , using the expression indexed by j as the step size.
  • Page 321: Push_Independent_Factors

    (j); replace_top2_with_prod(j); replace_top2_with_prod(k); k = top_estack; push_quantum (9u); push_independent_factors (k, top_estack); TI-89 / TI-92 Plus Developer Guide expression. /* Push variable x */ /* Push variable y */ /* Push ln(y); */ /* top_estack -> ln(y) * y /* top_estack -> x * ln(y) * y * pi...
  • Page 322: Push_Independent_Terms

    = top_estack; push_quantum (9u); push_independent_terms (k, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities expression. /* Push variable x */ /* k -> x + pi */ /* Push variable y */ /* Push ln(y);...
  • Page 323: Push_Integer_Gcd

    TI-89 / TI-92 Plus None Differences: See Also: None Example: push_quantum_as_nonnegative_int (10u); k = top_estack; push_Float (15.0); push_integer_gcd (k, top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged float 5.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 324: Push_Integer_Lcm

    See Also: None Example: push_quantum_as_nonnegative_int (10u); k = top_estack; push_Float (15.0); push_integer_lcm (k, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* Pushes tagged float 30.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 325: Push_Nonconstant_Factors

    (2u); foo = top_estack; push_quantum (8u); replace_top2_with_prod (foo); push_nonconstant_factors (top_estack); TI-89 / TI-92 Plus Developer Guide /* push variable x */ /* top-estack -> x * pi * 2 /* Pushes x */ Not for Distribution Beta Version January 26, 2001...
  • Page 326: Push_Nonconstant_Terms

    (); push_quantum (8u); replace_top2_with_sum (foo); push_nonconstant_terms (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* partial sum = top_estack */ /* push variable x */ /* top-estack -> x + pi + 1 */...
  • Page 327: Push_Nonnumeric_Factors

    (2u); foo = top_estack; push_quantum (8u); replace_top2_with_prod (foo); push_nonnumeric_factors (top_estack); TI-89 / TI-92 Plus Developer Guide /* push variable x */ /* top-estack -> x * pi/2 /* Pushes x * pi Not for Distribution Beta Version January 26, 2001...
  • Page 328: Push_Numerator

    Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_standardize (i); i = top_estack; push_numerator (i); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 329: Push_Percent

    Side Effects: None On AMS 2.02 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: None Example: push_Float (55.0) push_percent (top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes 0.55 */ Not for Distribution Beta Version January 26, 2001...
  • Page 330: Push_Poly_Deg_In_Var_Or_Kernel

    /* top_estack -> x^3 + 1 */ push_quantum (8u); /* Push variable x */ push_poly_deg_in_var_or_kernel (poly, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* top_estack -> x^3 */ /* Pushes tagged integer 3 */...
  • Page 331: Push_Subst_No_Simp

    = top_estack; raise_to_top (k); /* y^2 */ replace_top2_with_difference (power); push_subst_no_simp (top_estack, j, k); TI-89 / TI-92 Plus Developer Guide /* top_estack -> x^2 - y^2 */ /* Pushes y^2 - y^2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 332: Push_Substitute_Simplify

    = top_estack; raise_to_top (k); /* y^2 */ replace_top2_with_difference (power); push_substitute_simplify (top_estack, j, k); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* top_estack -> x^2 - y^2 */ /* Pushes a zero. */ Not for Distribution...
  • Page 333: Push_Substitute_Using_Such_That

    2 for x and then simplify the expression to 3 in the estack such that top_estack points to the bolded tag. 3 1 NONNEGATIVE_INTEGER_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 334: Push_Var_Kern_Tail

    (partial_sum); push_var_kern_tail (top_estack); push_quantum (LIST_TAG); /* top_estack -> {ln(y), x} */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities /* top_estack = x + ln(y) + 1 */ Not for Distribution Beta Version January 26, 2001...
  • Page 335: Re_Index

    See Also: push_im, replace_top2_with_imre Example: push_expression (Integer1Index); real_part = top_estack; push_expression (FloatPiIndex); replace_top2_with_imre (real_part); re_index (top_estack); /* Returns the index of a tagged integer 1 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 336: Reductum_Index

    Otherwise returns Float0Index if IS_ARITH_APPROX is true and Integer0Index if IS_ARITH_APPROX is false. Assumptions: None Side Effects: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 337 TI-89 / TI-92 Plus Differences: None See Also: lead_term_index Example: push_quantum (8u); /* Push variable x */ add1_to_top (); reductum_index (top_estack); TI-89 / TI-92 Plus Developer Guide /* Returns the index of a one. */ Not for Distribution Beta Version January 26, 2001...
  • Page 338: Remaining_Factors_Index

    IS_ARITH_APPROX is true and Integer1Index if IS_ARITH_APPROX is false. Note that Float1Index and Integer1Index are not normally physically within the expression indexed by i . TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities (continued) Not for Distribution...
  • Page 339 TI-89 / TI-92 Plus Differences: None See Also: lead_factor_index Example: push_quantum (x); /* Push variable x */ remaining_factors_index (top_estack); /* Returns an index of a one. */ TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 340: Replace_Top2_With_Imre

    /* Replaces the top two expressions with the expression 3.7 + 5.2 i */ push_Float (3.7); i = top_estack; push_Float (5.2); replace_top2_with_imre (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Algebra Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 341: Apps

    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...
  • Page 342 Appendix A: System Routines — Apps See Also: LOC_formatdate ...934. See Operating System LOC_getLocalDateFormat ...935. See Operating System LOC_localVersionDate ...936. See Operating System TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 343: Ev_Getappid

    See Also: Section 7.1.3.2. Internal Application Name. Example: AppID grapher = EV_getAppID("TIGRAPH"); TI-89 / TI-92 Plus Developer Guide unique internal name ( 8 characters). The internal names of the built-in applications are listed in Table 7.3 Internal Names of Build-in Applications.
  • Page 344: Ev_Quit

    Usually this forces your app to quit before switching to the Home screen. However, if the calculator is in split-screen mode and Home is already on the other side of the split, this will deactivate your app then activate the Home screen.
  • Page 345: Oo_Appgetpublicstorage

    Assumptions: This routine fetches public storage from the application indicated by the app ID in OS global variable EV_runningApp. TI-BASIC extension functions and shared-code libraries may exist in a different app. These types of routines are often called as subroutines from other applications, in which case EV_runningApp contains not the ID of the app containing your subroutine, but the ID of the calling application.
  • Page 346: Oo_Appismarkeddelete

    — ID of application to check. Outputs: Returns TRUE if app id is marked to be deleted. Assumptions: This routine does not check if app id exists. You could crash the calculator if app id does not exist. Side Effects: None On AMS 2.00 and higher.
  • Page 347: Oo_Appmarkdelete

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: Section 9.10. Installing, Moving, and Deleting an Application. Example: OO_appMarkDelete(EV_currentApp); /* Delete myself */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 348: Oo_Appnametoacb

    /* Get App ID of numeric solver. This may not work if the language mode setting has been changed to something besides English. AppID solverID = OO_AppNameToACB("Numeric Solver"); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Case-sensitive comparison, TRUE if appname must match case, FALSE if comparison is case-insensitive.
  • Page 349: Oo_Appsetpublicstorage

    This routine assumes you want to store user data in the application control block indicated by the app ID in OS global variable EV_runningApp. This may not be the case with TI-BASIC extension functions and shared-code libraries. These types of routines are often called as subroutines from other applications, in which case EV_runningApp contains not the ID of your app, but the ID of the calling application.
  • Page 350 Save handle to global variables in public storage. Recover handle to global variables from public storage. Copy global variables from heap to data segment. Do not forget to release heap memory. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps (continued) Not for Distribution...
  • Page 351: Oo_Condgetattr

    OO_SetAttr Example: char *helpMsg; if (OO_CondGetAttr(MyAppObj, helpMsgNum, (void *)&helpMsg)) /* Display help message */ TI-89 / TI-92 Plus Developer Guide — Object frame pointer. — Address of location to return attribute value. Not for Distribution Beta Version January 26, 2001...
  • Page 352: Oo_Deref

    /* get pointer to frame */ for (i = 0; i < pobj->head.count; i += 1) /* process each attribute of object frame */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps Not for Distribution Beta Version January 26, 2001...
  • Page 353: Oo_Destroy

    See Also: OO_DestroyAll, OO_New Example: pFrame obj; obj = OO_New(H_NULL); /* allocate a new object */ . /* use object */ OO_Destroy(obj); /* free object */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 354: Oo_Destroyall

    . /* add more frames to parent chain of obj */ OO_DestroyAll(obj); /* free object and its parent and prototype chains */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps Not for Distribution Beta Version January 26, 2001...
  • Page 355: Oo_Getappattr

    = (int const)OO_GetAppAttr(theApp, OO_APP_VERSION); /* Better yet, call the macro generated by FDL: */ version = GetAppVersion(theApp); TI-89 / TI-92 Plus Developer Guide — ID of application containing object frame where attribute search should begin. Not for Distribution...
  • Page 356: Oo_Getattr

    *dateFormat; dateFormat = (char const *)OO_GetAttr(MyAppObj, OO_DATE_FORMAT); /* Better yet, call the macro generated by FDL: */ dateFormat = GetDateFormat(MyAppObj); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Object frame pointer. Not for Distribution...
  • Page 357: Oo_Hasattr

    OO_CondGetAttr, OO_GetAppAttr, OO_GetAttr, OO_SetAppAttr, OO_SetAttr Example: /* Does frame dispContextObj contain attribute OO_SPECIAL_FONT? */ if (OO_HasAttr(dispContextObj, OO_SPECIAL_FONT)) /* Use special font */ TI-89 / TI-92 Plus Developer Guide — Object frame pointer. Not for Distribution Beta Version January 26, 2001...
  • Page 358: Oo_Installapphook

    See Also: OO_InstallAppHookByName, OO_UninstallAppHook, OO_UninstallAppHookByName TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — ID of application into which a new frame is to be hooked. — Returned pointer to RAM link frame. Keep this value around and pass it to OO_UninstallAppHook when you want to unhook the frame.
  • Page 359 /* Get ID of the app to hook */ myappid = EV_getAppID((UCHAR const *)"MYAPP"); /* Hook new app name into app */ OO_InstallAppHook(myappid, (pFrame)&NewAppName, &hook); TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 360: Oo_Installapphookbyname

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Internal name of application into which a new frame is to be hooked. — Returned pointer to RAM link frame. Keep this value...
  • Page 361 The app will appear as "New App" in the [APPS] menu FRAME(NewAppName, OO_SYSTEM_FRAME, NULL, OO_APP_NAME, 1) ATTR(OO_APP_NAME, "New App") ENDFRAME pFrame hook; /* Hook new name into app */ OO_InstallAppHookByName((UCHAR const *)"MYAPP", (pFrame)&NewAppName, &hook); TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 362: Oo_Installsystemhook

    Differences: None See Also: OO_UninstallSystemHook TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Returned pointer to RAM link frame. Keep this value around and pass it to OO_UninstallSystemHook when you want to unhook the frame.
  • Page 363 /* This single-attribute hook frame overrides the system date format. */ FRAME(DateHook, OO_SYSTEM_FRAME, NULL, OO_DATE_FORMAT, 1) ATTR(OO_DATE_FORMAT, "YYYY.MM.DD") ENDFRAME pFrame datehook; /* Hook new date format into system */ OO_InstallSystemHook((pFrame)&DateHook, &datehook); TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 364: Oo_New

    (obj != H_NULL) . /* use object */ OO_Destroy(obj); /* free object */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps parameter if you do not want to link the new object into a prototype hierarchy.
  • Page 365: Oo_Nextacb

    TI-89 / TI-92 Plus Differences: None See Also: OO_firstACB, OO_PrevACB Example: AppID appid; for (appid = OO_firstACB; appid != H_NULL; appid = OO_NextACB(appid)) /* process each ACB */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 366: Oo_Prevacb

    Differences: None See Also: OO_firstACB, OO_NextACB Example: AppID appid; appid = OO_PrevACB(EV_runningApp); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps /* get ID of app before me */ Not for Distribution Beta Version January 26, 2001...
  • Page 367: Oo_Setappattr

    SetAppDefaultMenu(EV_runningApp, &menu); /* Actually, there is a routine in the OS which does exactly this..*/ EV_registerMenu(&menu); TI-89 / TI-92 Plus Developer Guide — ID of application containing object frame where attribute search should begin. — New value for attribute. The value may be any integer or pointer which fits in 32 bits.
  • Page 368: Oo_Setattr

    SetAppDefaultMenu(EV_runningApp, &menu); /* Actually, there is a routine in the OS which does exactly this. . . */ EV_registerMenu(&menu); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Object frame where attribute search should begin. — New value for attribute. The value may be any integer or pointer which fits in 32 bits.
  • Page 369: Oo_Uninstallapphook

    OO_UninstallAppHookByName Example: pFrame hook; /* hook contains pointer stored by call to OO_InstallAppHook */ OO_UninstallAppHook(appid, hook); TI-89 / TI-92 Plus Developer Guide — ID of app from which to remove the hook. returned from OO_InstallAppHook or OO_InstallAppHookByName. Not for Distribution...
  • Page 370: Oo_Uninstallapphookbyname

    Example: pFrame hook; /* hook contains pointer stored by call to OO_InstallAppHookByName */ OO_UninstallAppHookByName((UCHAR const *)"MYAPP", hook); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Apps — Internal name of application from which to remove the hook.
  • Page 371: Oo_Uninstallsystemhook

    TI-89 / TI-92 Plus Differences: None See Also: OO_InstallSystemHook Example: pFrame hook; /* hook contains pointer stored by call to OO_InstallSystemHook */ OO_UninstallSystemHook(hook); TI-89 / TI-92 Plus Developer Guide returned from OO_InstallSystemHook. Not for Distribution Beta Version January 26, 2001...
  • Page 372 Appendix A: System Routines — Apps TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 373: Certificates

    Appendix A: System Routines — Certificates freeIdList ... 333 LIO_SendIdList ... 334 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 374 Appendix A: System Routines — Certificates TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 375: Freeidlist

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: SendIdList Example: if (DlgMessage("VAR-LINK", "Clear ID List?", PDB_YES, PDB_NO) == KB_ENTER) freeIdList(); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 376: Lio_Sendidlist

    Category(ies): Certificates, Link Description: If ID list does not exist, creates one using the calculator's ID. If the ID list does exist, the calculator ID is appended. This list is then sent over the link port. DoDelete — If TRUE, ID list is deleted from memory after it is sent.
  • Page 377: Data Utilities

    Appendix A: System Routines — Data Utilities DataTypeNames ... 337 gen_version ... 338 GetDataType... 339 GetFuncPrgmBodyPtr... 340 QSysProtected... 341 SmapTypeStrings ... 342 See Also: checkCurrent...1129. See Variables TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 378 Appendix A: System Routines — Data Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 379: Appendix A: System Routines - Data Utilities

    Differences: None See Also: SmapTypeStrings Example: sprintf( buf, "This variable is a %s", DataTypeNames( Tag ) ); TI-89 / TI-92 Plus Developer Guide DATA_VAR_TAG, MATRIX_TAG, LIST_TAG, FUNC_BEGIN_TAG, PRGM_TAG, SYSVAR_TAG, STR_DATA_TAG, GEO_FILE_TAG, GEO_MACRO_TAG, ASM_PRGM_TAG, EQUATION_TAG, GEN_DATA_TAG. Not for Distribution Beta Version January 26, 2001...
  • Page 380: Gen_Version

    Either the object indexed by i is terminated by an END_OF_SEGMENT_TAG, or the object is delimited by i and j . Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 381: Getdatatype

    SYM_ENTRY *SymPtr; HANDLE h; if (hsym = VarRecall( varNamePtr, 0)) { SymPtr = DerefSym( hsym ); if (h = SymPtr->hVal) return( GetDataType( HToESI(h) )); return –1; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 382: Getfuncprgmbodyptr

    Availability: On AMS 2.00 or higher. TI-89 / TI-92 Plus Differences: None See Also: None Example: See SymFindMain. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Data Utilities function. Not for Distribution Beta Version January 26, 2001...
  • Page 383: Qsysprotected

    (which includes files). Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GetDataType Example: /* Given a pointer to a variable name (CAS format, points to zero byte terminator), return TRUE if O.K.
  • Page 384: Smaptypestrings

    (SDT_OTH) will return “OTH” and not the file type specified when the file was opened. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GetDataType, DataTypeNames Example: HANDLE hDat;...
  • Page 385: Dialog

    DialogAdd ... 347 DialogDo ... 349 DialogNew... 350 DlgMessage ... 353 DrawStaticButton ... 354 ERD_dismissNotice ... 356 ERD_notice... 357 VarNew ... 358 VarOpen... 360 VarSaveAs ... 362 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 386 Appendix A: System Routines — Dialog TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 387: Dialog

    DIALOG structure must be locked. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Developer Guide — Pointer to a DIALOG structure. — Specifies the upper left corner of the dialog. If x0 is equal to L1 then the dialog box is centered horizontally.
  • Page 388 "Item 2-3", 3 TOOLBOX MenuPages, RC_NO_IDS, 0, 120 { "PAGE 1", 1 "PAGE 2", 2 "PAGE 3", 3 TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Dialog /* default edit strings */ Not for Distribution 2,3, 9...
  • Page 389: Dialogadd

    Type — One of the following items which determines the parameters dH if successful or H_NULL if not enough memory. Outputs: TI-89 / TI-92 Plus Developer Guide following Type . D_DYNPOPUP char * TextPtr , HANDLE (* GetPopUp ) (WORD),...
  • Page 390 DialogAdd (continued) Assumptions: dH was created by DialogNew. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: DialogDo, DialogNew, Dialog Example: See DialogNew. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 391: Dialogdo

    The rest of the parameters are the same as in the Dialog function. Outputs: Same as Dialog. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Dialog, DialogNew, DialogAdd Example: See DialogNew.
  • Page 392: Dialognew

    HANDLE to an empty DIALOG structure that can be added to with DialogAdd. Assumptions: None May cause heap compression. Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: DialogAdd, DialogDo TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 393 KB_F1: DlgMessage("MENU","F1 Pressed,going to entry 0",PDB_OK, 0 ); case KB_F2: DlgMessage("MENU","F2 Pressed,going to entry 1",PDB_CANCEL,0 ); case KB_F3: return DB_EXIT; break; case DB_QACTIVE: return TRUE; return TRUE; TI-89 / TI-92 Plus Developer Guide return 0; return 1; (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 394 PDB_OK, PDB_CANCEL ); } while (KB_ESC != Key); DialogFree( hD1 ); PopupFree( hP1 ); PopupFree( hP2 ); HeapFree( hM1 ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Dialog Not for Distribution Beta Version January 26, 2001...
  • Page 395: Dlgmessage

    Issue a dialog with a given Title and a word-wrapped Message . The Message string may contain newline constants. The dialog box will be sized to fit the screen with a predefined width for the TI-89 and the TI-92 Plus.
  • Page 396: Drawstaticbutton

    — X window coordinate (buttons are always drawn at the bottom of Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Dialog PDB_GOTO.
  • Page 397 = (short) DlgMessage( XR_stringPtr(XR_RESET), XR_stringPtr(ResetTitles[Key-1]), PDB_YES, PDB_NO ); if ((WORD) i != KB_ENTER) continue; MenuEnd( h ); WinClose( &w ); TI-89 / TI-92 Plus Developer Guide (continued) /* fixup title line */ Not for Distribution Beta Version January 26, 2001...
  • Page 398: Erd_Dismissnotice

    = ERD_notice((UCHAR *)"WARNING", (UCHAR *)"Database reorganization in progress -- do not interrupt!"); . /* reorganize database */ if (bNotice) ERD_dismissNotice(); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Dialog Not for Distribution Beta Version January 26, 2001...
  • Page 399: Erd_Notice

    See Also: ERD_dismissNotice Example: BOOL bNotice; bNotice = ERD_notice((UCHAR *)"WARNING", (UCHAR *)"Database reorganization in progress -- do not interrupt!"); . /* reorganize database */ if (bNotice) ERD_dismissNotice(); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 400: Varnew

    N or there is an error creating the symbol. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: VarOpen, VarSaveAs TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 401 FCreate( "d1", "DAT" ); FCreate( "d2", "DAT" ); hsym = VarSaveAs( (BYTE *) &Tag1, (BYTE *) "CURRENT", &TagS1 ); hsym = VarNew( (BYTE *) &Tag1, &TagS1 ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 402: Varopen

    Types contains multiple values. It will be one if the first entry was selected, two for the second entry, and so on. See the example below. VarOptList is available on AMS 2.00 and higher. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 403 (Tag == PIC_VAR_TAG) { WinBitmapPut(gr_active->grwinp, 0, 0, (BITMAP *) (Ptr + 2), A_OR ); else /* . . . recall graph database . . . */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 404: Varsaveas

    Types contains multiple values. It will be one if the first entry was selected, two for the second entry, and so on. See the example below. VarOptList is available on AMS 2.00 and higher. All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus...
  • Page 405: Direct Floating Point Operations

    ... 380 bcdsub ... 381 cacos... 382 cacosh... 383 casin... 384 casinh... 385 catan ... 386 catanh ... 387 ccos... 388 ccosh... 389 ceil... 390 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 406 ... 410 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 407 ... 429 tan ... 430 tanh ... 431 See Also: EX_getBCD... 1103. See Utilities ForceFloat...539. See Expression Evaluation / Algebraic Simplification strtod ... 1109. See Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 408 Appendix A: System Routines — Direct Floating Point Operations TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 409: Acos

    For x < L1 or x > 1 returns a floating-point NAN. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: asin, atan, cos, sin, tan Example:...
  • Page 410: Acosh

    For x >= 1 returns inverse hyperbolic cosine of x. For x < 1 returns a floating-point NAN. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: asinh, atanh, cosh, sinh, tanh Example:...
  • Page 411: Asin

    For x >= 1 returns inverse sine of x in radian measure. For x < 1 returns a floating-point NAN. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: acos, atan, cos, sin, tan Example:...
  • Page 412: Asinh

    Outputs: Returns the inverse hyperbolic sine of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: acosh, atanh, cosh, sinh, tanh Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 413: Atan

    Outputs: Returns the inverse tangent of x in radian measure. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: acos, asin, cos, sin, tan Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 414: Atan2

    Returns the inverse tangent of y / x in radian measure. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: acos, asin, atan, cos, sin, tan Example:...
  • Page 415: Atanh

    If x < L1 or x > 1, then returns a floating-point NAN. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: acosh, asinh, cosh, sinh, tanh...
  • Page 416: Bcdadd

    Category(ies): Direct Floating Point Operations Description: Add two TI binary-code decimal floating-point numbers. This routine performs the same function as the C “+” operator on BCD16 values. This routine is provided as a convenience for assembly language programs. a , b — Two BCD16 numbers to add together.
  • Page 417: Bcdbcd

    Outputs: Returns the BCD16 floating point equivalent of a . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: bcdadd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdneg, bcdsub Example:...
  • Page 418: Bcdcmp

    (BCD16 a , BCD16 b ) Category(ies): Direct Floating Point Operations Description: Compare two TI binary-code decimal floating-point numbers. This routine is provided as a convenience for assembly language programs. a , b — Two BCD16 numbers to compare. Inputs: Returns -1 if a <...
  • Page 419: Bcddiv

    Category(ies): Direct Floating Point Operations Description: Calculate the quotient of two TI binary-code decimal floating-point numbers. This routine performs the same function as the C “/” operator on BCD16 values. This routine is provided as a convenience for assembly language programs.
  • Page 420: Bcdlong

    Outputs: Returns the long integer equivalent of a . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: bcdadd, bcdbcd, bcdcmp, bcddiv, bcdmul, bcdneg, bcdsub Example: = -20...
  • Page 421: Bcdmul

    Direct Floating Point Operations Description: Calculate the product of two TI binary-code decimal floating-point numbers. This routine performs the same function as the C “ ” operator on BCD16 values. This routine is provided as a convenience for assembly language programs.
  • Page 422: Bcdneg

    Inputs: Outputs: Returns the negative of a . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: bcdadd, bcdbcd, bcdcmp, bcddiv, bcdlong, bcdmul, bcdsub Example: bcdresult = -10...
  • Page 423: Bcdsub

    Category(ies): Direct Floating Point Operations Description: Calculate the difference between two TI binary-code decimal floating-point numbers. This routine performs the same function as the C “-” operator on BCD16 values. This routine is provided as a convenience for assembly language programs.
  • Page 424: Cacos

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: casin, catan, ccos, csin, ctan Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 425: Cacosh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: casinh, catanh, ccosh, csinh, ctanh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 426: Casin

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacos, catan, ccos, csin, ctan Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 427: Casinh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacosh, catanh, ccosh, csinh, ctanh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 428: Catan

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacos, casin, ccos, csin, ctan Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 429: Catanh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacosh, casinh, ccosh, csinh, ctanh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 430: Ccos

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacos, casin, catan, csin, ctan Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 431: Ccosh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacosh, casinh, catanh, csinh, ctanh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 432: Ceil

    — A double floating-point value. Outputs: The smallest integer >= x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: floor Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 433: Cexp

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cln, clog10, csqrt Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 434: Ck_Valid_Float

    -999. If num is NAN or the exponent is greater than 999, FALSE is returned and num will contain a NAN. (See section 2.9.4. Floating-Point Representations in the TI-89 / TI-92 Plus Sierra C Assembler Reference Manual.) Inputs: num —...
  • Page 435: Cln

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cexp, clog10, csqrt Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 436: Clog10

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cexp, cln, csqrt Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 437: Cos

    Outputs: For x <= L1.e13 or x >= 1.e13 returns a floating-point NAN. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: acos, asin, atan, sin, tan...
  • Page 438: Cosh

    Outputs: The hyperbolic cosine of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: acosh, asinh, atanh, sinh, tanh Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 439: Csin

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacos, casin, catan, ccos, ctan Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 440: Csinh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacosh, casinh, catanh, ccosh, ctanh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 441: Csqrt

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cexp, cln, clog10 Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 442: Ctan

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacos, casin, catan, ccos, csin Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 443: Ctanh

    — The real part of the complex result. — The imaginary part of the complex result. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: cacosh, casinh, catanh, ccosh, csinh Example: TI-89 / TI-92 Plus Developer Guide complex number.
  • Page 444: Estack_Number_To_Float

    Returns TRUE if it does not have a top-level numeric term or if its magnitude is < tolerance. i = index_numeric_term (i); return NULL_INDEX == i || fabs (estack_number_to_Float (i)) <= tolerance; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 445: Estack_To_Float

    Float f; f = estack_to_float (i); return fabs (f) <= MAX_EXACT_FLOAT_WHOLE_NUMBER && FLOAT0 == FMOD (f, FLOAT1); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 446: Exp

    — A double floating-point value. Outputs: The exponential function of x. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: log, log10, pow, sqrt Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 447: Fabs

    — A double floating-point value. Outputs: For x >= 0.0 returns x . For x < 0.0 returns Lx . Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: None Example:...
  • Page 448: Floor

    — A double floating-point value. Outputs: The largest integer <= x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: ceil Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 449: Fmod

    — Double floating-point values. Outputs: The floating-point remainder of x / y . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: modf Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 450: Frexp10

    /* Returns a quickly-computed rough approximation to the base-ten logarithm of abs(x) for nonzero x. int exponent; x = frexp10 (fabs(x), &exponent); return (exponent – 1) + x; TI-89 / TI-92 Plus Developer Guide — Double. Not for Distribution Beta Version January 26, 2001...
  • Page 451: Is_Float_Infinity

    None On AMS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_float_signed_infinity, is_nan, is_float_unsigned_inf_or_nan, is_float_transfinite Example: is_float_infinity (1.0/0.0); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ Not for Distribution Beta Version January 26, 2001...
  • Page 452: Is_Float_Negative_Zero

    Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus None Differences: See Also: is_float_positive_zero, is_float_unsigned_zero, is0, is_complex0 Example: is_float_negative_zero (-fabs (0.0)); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ Not for Distribution Beta Version January 26, 2001...
  • Page 453: Is_Float_Positive_Zero

    None Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: None See Also: is_float_negative_zero, is_float_unsigned_zero, is0, is_complex0 Example: is_float_positive_zero(fabs (0.0)); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ Not for Distribution Beta Version January 26, 2001...
  • Page 454: Is_Float_Signed_Infinity

    On AMS 1.05 and higher. TI-89 / TI-92 Plus None Differences: See Also: is_float_infinity, is_nan, is_float_unsigned_inf_or_nan, is_float_transfinite Example: is_float_signed_infinity (-fabs(1.0/0.0)); is_float_signed_infinity (1.0/0.0); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ /* Returns FALSE */ Not for Distribution Beta Version January 26, 2001...
  • Page 455: Is_Float_Transfinite

    Returns TRUE if f represents Lˆ, +ˆ, unsigned ˆ, or NAN. Otherwise Outputs: returns FALSE. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_float_signed_infinity, is_nan, is_float_unsigned_inf_or_nan,...
  • Page 456: Is_Float_Unsigned_Inf_Or_Nan

    Returns TRUE if f represents unsigned ˆ or NAN. Otherwise returns Outputs: FALSE. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_float_signed_infinity, is_nan, is_float_transfinite, is_float_infinity Example: is_float_unsigned_inf_or_nan (1.0/0.0);...
  • Page 457: Is_Float_Unsigned_Zero

    Returns TRUE if f represents +L0. Otherwise returns FALSE. This is not the same as is_float_negative_zero(f) || is_float_positive_zero(f) Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_float_positive_zero, is_float_negative_zero, is0, is_complex0 Example: is_float_unsigned_zero (0.0);...
  • Page 458: Is_Nan

    None On AMS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_float_signed_infinity, is_float_infinity, is_float_unsigned_inf_or_nan, is_float_transfinite Examples: is_nan (0.0/0.0); /* Returns TRUE */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 459: Log

    Outputs: The natural logarithm of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: exp, log10, pow, sqrt Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 460: Log10

    Outputs: The base 10 logarithm of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: exp, log, pow, sqrt Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 461: Modf

    Returns the fractional portion of x . Stores the integer portion of x as a floating-point value at * int_ptr . Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 462: Pow

    Outputs: The base x raised to the y power. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: exp, log, log10, sqrt Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 463: Push_Float

    /* Pushes a tagged float 0.5 if global computation mode = APPROXIMATE. Otherwise pushes a tagged fraction 1/2. */ if (IS_ARITH_APPROX) push_Float (FLOAT_HALF); else push_reciprocal_of_quantum (2u); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 464: Push_Float_To_Nonneg_Int

    (FLOAT0 == FMOD (f, FLOAT1)) Float abs_f = fabs (f); if (FLOAT_TO_NON_OVERFLOW_THRESHOLD > abs_f) push_Float_to_nonneg_int (abs_f); if (f < FLOAT0) negate_top() return TRUE; return FALSE; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 465: Round12

    Outputs: The value of x rounded to 12 digits of precision. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: round14 Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 466: Round12_Err

    The value of fNum rounded to 12 digits of precision. Assumptions: None Side Effects: May throw the error code passed in errCode . Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: round12, round14, ER_throw TI-89 / TI-92 Plus Developer Guide —...
  • Page 467 SysVarStore( SV_XMIN, round12_err( TempF, ER_RANGE ) ); SysVarStore( SV_XMAX, round12_err(fr[GR_DELTAX] * xp + TempF, ER_RANGE) ); SysVarStore( SV_YMIN, -4.0 ); SysVarStore( SV_YMAX, 4.0 ); SysVarStore( SV_YSCL, 0.5 ); GT_Regraph(); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 468: Round14

    Outputs: The value of x rounded to 14 digits of precision. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: round12 Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 469: Sin

    Outputs: For x <= L1.e13 or x >= 1.e13 returns a floating-point NAN. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: acos, asin, atan, cos, tan...
  • Page 470: Sinh

    Outputs: The hyperbolic sine of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: acosh, asinh, atanh, cosh, tanh Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 471: Sqrt

    Outputs: The square root of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: exp, log, pow, sqrt Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 472: Tan

    Outputs: For x <= L1.e13 or x >= 1.e13 returns a floating-point NAN. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: acos, asin, atan, cos, sin...
  • Page 473: Tanh

    Outputs: The hyperbolic tangent of x . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: acosh, asinh, atanh, cosh, sinh Example: TI-89 / TI-92 Plus Developer Guide...
  • Page 474 Appendix A: System Routines — Direct Floating Point Operations TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 475: Display

    Appendix A: System Routines — Display 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...
  • Page 476 Appendix A: System Routines — Display TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 477: Clienttoscr

    Side Effects: None Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: ScrToWin Example: See WinHome. TI-89 / TI-92 Plus Developer Guide — First SCR_RECT. — Second SCR_RECT. Not for Distribution Beta Version January 26, 2001...
  • Page 478: Display_Statements

    Returns the HANDLE to a heap packet which contains the ASCII text result; returns H_NULL if memory full. Assumptions: None May cause heap compression. Side Effects: All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 479: Drawstrwidth

    FontType — F_4x6, F_6x8, F_8x10 Outputs: Length of string in pixels for the given font. Assumptions: None None Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: DrawStrWidthP Example: WORD sLen;...
  • Page 480: Drawstrwidthp

    DrawStrWidth Example: WORD sLen; sLen = DrawStrWidthP("Test string", 11, F_4x6 ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Display — Pointer to string to return the length of (not required to be zero-byte terminated). — Length of string.
  • Page 481: Parms2D

    (counting the line) is the depth. Assumptions: Assumes the input came from Parse2DExpr or Parse2DMultiExpr. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Parse2DExpr, Parse2DMultiExpr Example: See Print2DExpr.
  • Page 482: Parse1Dexpr

    ( . . . ) is returned. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: display_statements TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 483 /* returns a HANDLE to a memory block containing the width restricted ASCII text . . . , because the number cannot be represented in 3 characters. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 484: Parse2Dexpr

    Assumptions: None Side Effects: May compress the heap. May throw the following errors: ER_MEMORY (very low memory) and ER_BREAK (´ pressed while converting). All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 485: Parse2Dmultiexpr

    None Side Effects: May compress the heap. May throw the following errors: ER_MEMORY (very low memory) and ER_BREAK (´ pressed while converting). Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Parse2DExpr, Print2DExpr Example: See Print2DExpr and substitute Parse2DMultiExpr for Parse2DExpr.
  • Page 486: Print2Dexpr

    Assumptions: Assumes the input came from Parse2DExpr or Parse2DMultiExpr. Side Effects: Throws an ILLEGAL_TAG_ERROR if any invalid tags in the input. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Parse2DMultiExpr, Parse2DExpr Example: See WinScrollH for an example of a scrollable 2D viewer.
  • Page 487: Sf_Width

    On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus The small font is generally used more on the TI-89 than on the TI-92 Plus. Plus Differences: It allows for more characters to fit on a line since it is proportional.
  • Page 488 Appendix A: System Routines — Display TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 489: Error Handling

    ERD_dismissNotice ... 356. See Dialog ERD_notice... 357. See Dialog OSCheckBreak ... 644. See Keyboard OSClearBreak... 645. See Keyboard OSDisableBreak ... 646. See Keyboard OSEnableBreak ... 647. See Keyboard TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 490 Appendix A: System Routines — Error Handling TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 491: Clear_Error_Context

    /* This subroutine is called when an error throw is caught and not passed. For example, when the calculator user presses the ON key, an ER_BREAK is thrown. The following code segment passes all other codes but clears the ER_BREAK and continues processing.
  • Page 492: Er_Catch

    Outputs: Error code. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: ER_success, TRY Example: Do not code a call to ER_catch yourself — use the TRY macro instead.
  • Page 493: Er_Success

    Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: ER_catch, FINALLY, ONERR Example: Do not code a call to ER_success yourself — use the ONERR or FINALLY macros instead.
  • Page 494: Er_Throwframe

    TI-89 / TI-92 Plus Differences: None See Also: ER_throw, ER_throwVar, FINALLY, ONERR, TRY TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Error Handling This should be an integer n in the range OO_FIRST_APP_STRING to OO_FIRST_APP_STRING+0x6FF. The system error handler displays the text of string OO_FIRST_STRING+ n from your app’s frame.
  • Page 495 ATTR(OO_FIRST_STRING+ER_COUNT_TOO_LONG,"COUNT MUST BE <= 1024") ENDFRAME pFrame pAppObj = (pFrame)&appObj; unsigned long count = estack_to_ulong(top_estack); if (count > 1024) ER_throwFrame(ER_COUNT_TOO_LONG, pAppObj); TI-89 / TI-92 Plus Developer Guide /* Throw app error number */ Not for Distribution Beta Version January 26, 2001...
  • Page 496: Er_Throwvar

    CM_UNPACK. See EV_errorCode and section 10.2 Delayed Error Messages for an alternative to throwing errors. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: ER_throw, ER_throwFrame, EV_errorCode, FINALLY, ONERR, TRY Example: HANDLE h;...
  • Page 497: Erd_Dialog

    — do not use this routine to Assumptions: display application error messages. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: ER_throwVar Example: ERD_dialog(ER_MEMORY, FALSE);...
  • Page 498: Find_Error_Message

    None Example: unsigned char * cp = find_error_message (ER_DATATYPE); Assigns to cp a pointer to the string “Data type”. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Error Handling Not for Distribution Beta Version January 26, 2001...
  • Page 499 ... 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 push_arg_minus_1 ... 487 push_arg_plus_1 ... 488 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 500 ... 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 501 See EStack Utilities estack_to_ushort...523. See EStack Utilities GetValue ...524. See EStack Utilities push_long_to_integer ...531. See EStack Utilities push_ulong_to_integer ...533. See EStack Utilities push_ushort_to_integer ...534. See EStack Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 502 Appendix A: System Routines — EStack Arithmetic TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 503: Add_To_Top

    Example: void add1_to_top (void) /* Add 1 or 1.0 the top expression, depending on global computation_mode. */ add_to_top (IS_ARITH_APPROX ? Float1Index : Integer1Index); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 504: Add1_To_Top

    /* Pushes (sign(i) + 1)/2 onto the estack. */ Access_AMS_Global_Variables; push_sign (i); add1_to_top (); i = top_estack; push_reciprocal_of_quantum (2u); replace_top2_with_prod (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 505: Can_Be_Approxed

    On OS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_constant TI-89 / TI-92 Plus Developer Guide — Index of the top tag of an expression. expression i . (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 506 = top_estack; push_max1 (j); delete_between (old_top, j); else /* error - data type */ ER_throw( ER_DATATYPE ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 507: Compare_Complex_Magnitudes

    On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: None See Also: compare_numbers, compare_Floats, compare_expressions Examples: Boolean has_larger_complex_magnitude (EStackIndex i, EStackIndex j) return compare_complex_magnitudes(j,k) > 0; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 508: Compare_Floats

    Examples: push_Float (3.7); j = top_estack; push_Float (5.2); i = top_estack; compare_Floats (i, j); /* Returns 1 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 509: Compare_Numbers

    Examples: /* Return j if it indexes a larger magnitude number than k indexes. Otherwise return k: */ return compare_numbers(j,k) > 0 ? j : k; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 510: Did_Push_Cnvrt_Float_To_Integer

    If it is a whole number that is representable as an integer, pushes the integer equivalent. Otherwise pushes expression i. if (FLOAT_TAG == ESTACK (i) && did_push_cnvrt_Float_to_integer (i)) else push_expression (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 511: Divide_Top

    (! is_independent_of (i, ki)) push_substitute_simplify (i, ki, Integer0Index); j = top_estack; push_difference (i, j); divide_top (ki); ans = j - deleted_between (ans, i); i = top_estack; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 512: Get_Lb

    Float fj = ESTACK_TO_FLOAT (j); top_estack = ki; return fki < fj ? -1 : fki > fj; return -1; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 513: Get_Ub

    = top_estack; if (FLOAT_TAG == ESTACK (j)) Float fj = ESTACK_TO_FLOAT (j); top_estack = ki; return fki > fj ? -1 : fki < fj; return -1; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 514: Integer_Non_Unknown

    EStackIndex old_top = top_estack; Boolean b; push_reciprocal_of_quantum (2u); times_top (i); b = integer_non_unknown (top_estack) > 0; top_estack = old_top; return b; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 515: Is_Cfloat_Agg

    Returns TRUE if every element of the input is a float or complex float in internal tokenized form. Assumptions: None Side Effects: None Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: is_complex_Float, is_complex_number TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 516 If j indexes the bolded tag in the following external tokenized form of the number 2 – 3 2 1 NONNEGATIVE_INTEGER_TAG 3 1 NONNEGATIVE_INTEGER_TAG I_TAG MULTIPLY_TAG SUBTRACT_TAG then is_cFloat_agg (j); returns FALSE, because the input is not in an internal tokenized form. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 517: Is_Complex_Float

    /* Returns TRUE if the expression indexed by i contains only floats and/or complex floats. Otherwise returns FALSE. */ return is_complex_Float(i) || LIST_TAG == ESTACK(i) && all_tail (&is_cFloat_agg, i-1u); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 518: Is_Complex0

    See Also: Example: Boolean is_complex0_or_aggregate_thereof (EStackIndex i) return LIST_TAG == ESTACK (i) ? all_tail (is_complex0_or_aggregate_thereof, i-1u) : is_complex0 (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 519: Is_Complex_Number

    (top_estack); real_part = top_estack; push_quantum_as_nonnegative_int (5u); replace_top2_with_imre (real_part); is_complex_number (top_estack); push_quantum (PI_TAG); is_complex_number (top_estack); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ /* Returns TRUE */ /* Returns FALSE */ Not for Distribution Beta Version January 26, 2001...
  • Page 520: Is_Constant

    TRUE; else i = reductum_index (i); return FALSE; /* end has_constant_term */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic , transfinites, true, false, and aggregates thereof. Not for Distribution Beta Version January 26, 2001...
  • Page 521: Is_Float_Exact_Whole_Number

    (f2 > FLOAT0) f3 = fmod (f1, f2); f1 = f2; f2 = f3; return f1; else ER_throw( ER_DOMAIN); TI-89 / TI-92 Plus Developer Guide /* Swap f1 and f2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 522: Is_Minus1

    /* i indexes an expression. Returns TRUE if the expression is an integer or Float 1 or -1. Otherwise returns FALSE. return is1 (i) || is_minus1 (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution...
  • Page 523: Is_Pos_Int_And_Eq_Quantum

    TI-89 / TI-92 Plus Differences: None See Also: None Example: push_quantum_as_nonnegative_int (5u); is_pos_int_and_eq_quantum (top_estack,5u); /* Returns TRUE */ push_Float (5.0); is_pos_int_and_eq_quantum (top_estack,5u); /* Returns FALSE */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 524: Is_Reciprocal_Of_Quantum

    TI-89 / TI-92 Plus Differences: None See Also: None Example: push_reciprocal_of_quantum (5u); is_reciprocal_of_quantum (top_estack, 5u); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic /* Returns TRUE */ Not for Distribution Beta Version January 26, 2001...
  • Page 525: Is_Whole_Number

    0.0, or any real zero. Otherwise, returns FALSE. Assumptions: i points to the top tag of an expression. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: is_Float_exact_whole_number Example: is_whole_number(i) ->...
  • Page 526: Is0

    Returns TRUE if i indexes any tagged big-rational or tagged float zero. Otherwise, returns FALSE. i indexes the top tag of an expression. Assumptions: Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 527: Is1

    (! is1 (i)) if (is_nonnegative (lead_factor_index (i))) return i; else i = remaining_factors_index (i); return NULL_INDEX; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 528: Negate_Top

    Pushes the equivalent expression (- floor (-i)) onto the estack. Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_negate (i); i = top_estack; push_floor (i); delete_between (old_top, i); negate_top (); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 529: Push_Arg_Minus_1

    IS_DOMAIN_REAL && is_real (i - 1u); old_top = top_estack; push_arg_minus_1 (i); i = top_estack; push_reciprocal_of_quantum (2u); replace_top2_with_prod (i); b = integer_non_unknown (top_estack) > 0; top_estack = old_top; return b; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 530: Push_Arg_Plus_1

    Example: push_quantum (8u); /* push variable x */ push_arg_plus_1 (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic /* Pushes x + 1 or x + 1.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 531: Push_Difference

    (! is_independent_of (i, ki)) push_substitute_simplify (i, ki, Integer0Index); j = top_estack; push_difference (i, j); divide_top (ki); ans = j - deleted_between (ans, i); i = top_estack; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 532: Push_Gcd_Numbers

    (2.0); float2 = top_estack; push_gcd_numbers (fraction_half, float2); push_negate_quantum_as_negint (2u); push_gcd_numbers (Integer0Index, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic /* Pushes 1/2 */ /* Pushes 2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 533: Push_Is_Prime

    (top_estack); push_is_prime (Integer1Index); push_negate_quantum_as_negint (2u); push_is_prime (top_estack); push_reciprocal_of_quantum (2u); push_is_prime (top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes TRUE_TAG */ /* Pushes FALSE_TAG */ /* Pushes FALSE_TAG */ /* Pushes FALSE_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 534: Push_Minus_Recip_Of_Quantum

    (Quantum q) /* Pushes -pi/q onto the estack, where q >= 2. */ push_minus_recip_of_quantum (q); push_quantum (PI_TAG); push_quantum (MULTIPLY_TAG); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 535: Push_Negate

    Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_negate (var); push_substitute_simplify (i, var, top_estack); subtract_from_top (i); if (is0 (top_estack)) top_estack = old_top; return TRUE; top_estack = old_top; return FALSE; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 536: Push_Negate_Quantum_As_Negint

    - 4 a c. */ Access_AMS_Global_Variables; push_negate_quantum_as_negint (4u); times_top (a); times_top (c); a = top_estack; push_square (b); replace_top2_with_sum (a); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 537: Push_Pi

    On AMS 2.02 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: push_pi_on_quantum Example: push_pi (); push_cos (top_estack); /* Pushes IS_ARITH_APPROX ? –1.0 : -1 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 538: Push_Pi_On_Quantum

    (! is_free_of_tag (i, IM_RE_TAG)) ER_THROW (ER_DOMAIN); if (IS_RADIANS) push_expression (i); else push_pi_on_quantum (180); push_ratio (i, top_estack); delete_expression (next_expression_index (top_estack)); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 539: Push_Product

    EStackIndex k; --i; --j; push0 (); while (END_TAG != ESTACK (i)) k = top_estack; push_product (i, j); replace_top2_with_sum (k); i = next_expression_index (i); j = next_expression_index (j); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 540: Push_Quantum_As_Nonnegative_Int

    = top_estack; push_sqrt (i); delete_between (old_top, i); i = top_estack; push_def_int (i, vi, j, k); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 541: Push_Quantum_Pair_As_Pos_Frac

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_quantum_as_nonnegative_int, push_reciprocal_of_quantum, push_minus_recip_of_quantum, push_negate_quantum_as_negint Example: push_quantum_pair_as_pos_frac (2u, 3u); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged faction 2/3 */ Not for Distribution Beta Version January 26, 2001...
  • Page 542: Push_Ratio

    EStackIndex old_top = top_estack; EStackDisplacement del = deleted_between (old_top, push_gcd_then_cofactors (j, i, &k)); k -= del; return k; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 543: Push_Reciprocal

    Example: void replace_top_with_reciprocal (void) /* Replaces the top expression on the estack with its reciprocal. */ Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_reciprocal (old_top); delete_expression (old_top); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 544: Push_Reciprocal_Of_Quantum

    /* i indexes an algebraic or aggregate expression. Pushes i divided by 100. if (is_units_term (i)) ER_THROW (ER_INVALID_USE_OF_UNITS); push_reciprocal_of_quantum (100u); times_top (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 545: Push_Sum

    Example: void push_increment_degree (EStackIndex power, EStackIndex inc) /* Pushes onto the estack factor_base (power) ^ (inc + factor_deg(power)) */ push_sum (inc, factor_exponent_index (power)); raise_to_top (factor_base_index (power)); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 546: Push0

    (i); i = next_expression_index (i); else if (is_constant (i)) ER_THROW (ER_DOMAIN); else push_expression (j); push_expression (i); push_quantum (DENSE_POLY_EVAL_TAG); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 547: Push1

    (i = 0 ; i < dimension; i++) push_quantum (END_TAG); for (j = 0 ; j < dimension; j++) if (j == i) push1 (); else push0 (); push_quantum (LIST_TAG); push_quantum (LIST_TAG); return; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 548: Replace_Top_With_Reciprocal

    /* int ((az^n)^p, z) -> (a(bz + c)^n)^p (bz + c)/(np + 1) */ add1_to_top (); replace_top_with_reciprocal (); times_top (factor_base_index (k)); times_top (i); } /* end push_anti_deriv_powprod_to_frac */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 549: Replace_Top2_With_Difference

    /* Push variable x */ replace_top2_with_prod (coefficient); minuend = top_estack; /* 3 * x push_estack (8u); /* Push variable x */ replace_top2_with_difference (minuend); TI-89 / TI-92 Plus Developer Guide /* top_estack -> 2 * x Not for Distribution Beta Version January 26, 2001...
  • Page 550: Replace_Top2_With_Prod

    (i); i = top_estack; push_reciprocal_of_quantum (2u); replace_top2_with_prod (i); b = integer_non_unknown (top_estack) > 0; top_estack = old_top; return b; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 551: Replace_Top2_With_Ratio

    /* Pushes onto the estack the logarithm to the base indexed by j of expression indexed by i. Access_AMS_Global_Variables; if (j) push_ln (i); i = top_estack; push_ln (j); replace_top2_with_ratio (i); else push_log10 (i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 552: Replace_Top2_With_Sum

    - 4 a c. */ Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_negate_quantum_as_negint (4u); times_top (a); times_top (c); a = top_estack; push_square (b); replace_top2_with_sum (a); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 553: Subtract_From_Top

    (j); push_substitute_simplify (i, vi, top_estack); subtract_from_top (i); i = top_estack; push_ratio (i, j); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide /* Rely on algebra to map over aggregates */ Not for Distribution Beta Version January 26, 2001...
  • Page 554: Subtract1_From_Top

    See Also: push_sum, replace_top2_with_sum, add_to_top, push_difference, replace_top2_with_difference, add1_to_top, subtract_from_top, push_arg_plus_1, push_arg_minus_1 Example: push_Float (5.7); subtract1_from_top (); /* pushes 4.7 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Arithmetic Not for Distribution Beta Version January 26, 2001...
  • Page 555: Times_Top

    Pushes r cos(t) + #i r sin(t) onto the estack. Access_AMS_Global_Variables; EStackIndex k; push_cos (t); times_top (r); k = top_estack; push_sin (t); times_top (r); replace_top2_with_imre (k); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 556 Appendix A: System Routines — EStack Arithmetic TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 557: Estack Utilities

    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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 558 ...402. See Direct Floating Point Operations estack_to_float...403. See Direct Floating Point Operations push_Float ...421. See Direct Floating Point Operations push_Float_to_nonneg_int ...422. See Direct Floating Point Operations push_zstr ... 985. See Strings TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 559: Check_Estack_Size

    OS_CHECK; check_estack_size ((EStackDisplacement)(high - low)); (void)memcpy (& ESTACK (top_estack + 1u), & ESTACK (low + 1u), (high - low) * BYTES_PER_QUANTUM); top_estack += high - low; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 560: Delete_Between

    Replaces the top two expressions with their sum. Access_AMS_Global_Variables; EStackIndex j = top_estack; push_sum (i, j); delete_between (next_expression_index (i), j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities Indexes into the estack. Not for Distribution Beta Version January 26, 2001...
  • Page 561: Delete_Expression

    /* Replaces the top expression on the estack with its reciprocal. */ Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_reciprocal (old_top); delete_expression (old_top); TI-89 / TI-92 Plus Developer Guide /* find reciprocal of top expression */ /* remove original expression */ Not for Distribution Beta Version January 26, 2001...
  • Page 562: Deleted_Between

    Then deletes elements from i + 1 through j. Then returns the number of quantums deleted. push_between (i, j); return deleted_between (i, j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 563: Deleted_Expression

    Pushes onto the estack (expression j)/gcd then (expression i)/gcd, then returns the index of the deeper pushed cofactor. i = push_gcd_then_cofactors (i, j, &j); return j – deleted_expression (i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 564: Estack_To_Short

    &ans); push_ushort_to_integer (65535); estack_to_short(top_estack, &ans); estack_to_short(FloatPiIndex, &ans); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities number. /* Stores 5 in ans then returns 1 */ /* Stores 32767 in ans then returns 0 */ /* Stores 0 in ans then returns –1 */...
  • Page 565: Estack_To_Ushort

    1 == estack_to_ushort(i, &c) && c < 256 ) push_quantum (0); if (c) push_quantum ((Quantum) c); push_quantum (0u); push_quantum (STR_DATA_TAG); else if (LIST_TAG == ESTACK(i)) map_tail (push_char, i-1); push_quantum (LIST_TAG); else ER_THROW (ER_DOMAIN); TI-89 / TI-92 Plus Developer Guide number. Not for Distribution Beta Version January 26, 2001...
  • Page 566: Getvalue

    Example: This example is used by the graphing commands in TI-BASIC to get the user supplied screen attribute value. It returns the attribute value after mapping it from a user supplied integer in the range -1 to +1.
  • Page 567: Move_Between_To_Top

    = top_estack; push_Float (3.7); f = top_estack; push_quantum_as_nonnegative_int (7u); move_between_to_top (old_top, f); /* Now the float 3.7 is on top of the integer 7. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 568: Moved_Between_To_Top

    /* Adjust index of foo */ x = top_estack – delta; /* Adjust index of variable x */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities /* Now f is on top */ Not for Distribution...
  • Page 569: Next_Expression_Index

    This indicates a malformed estack or an i that is pointing to an END_TAG, into the middle of a number, or into the middle of a variable name, for example. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 570: Push_Between

    /* Copies elements from i + 1 through j to top of estack, then deletes elements from i + 1 through j. push_between (i, j); delete_between (i, j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 571: Push_Expression

    EStackIndex vi = main_gen_var_index (i); push_quantum (END_TAG); while (vi) push_expression (vi); vi = next_var_or_kernel_index (i, vi); TI-89 / TI-92 Plus Developer Guide Pushes onto the estack a tail of all its variables, Not for Distribution Beta Version January 26, 2001...
  • Page 572: Push_Float_To_Rat

    Float old_RAtionalize_tol = RAtionalize_tol; RAtionalize_tol = CUBE_ROOT_FLOAT_EPSILON; push_Float_to_rat (i); i = top_estack; RAtionalize_tol = old_RAtionalize_tol; PUSH_NUMBER_TO_FLOAT (i); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 573: Push_Long_To_Integer

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_quantum_as_nonnegative_int, push_ulong_to_integer, push_ushort_to_integer Example: push_long_to_integer ((long)(-2u)); TI-89 / TI-92 Plus Developer Guide /* Pushes a tagged integer –2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 574: Push_Quantum

    /* Push a 10-element list of zeros on the estack */ for (i = 0 ; i < 10; i++) push0 (); push_quantum (LIST_TAG); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities Not for Distribution Beta Version January 26, 2001...
  • Page 575: Push_Ulong_To_Integer

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_quantum_as_nonnegative_int, push_long_to_integer, push_ushort_to_integer Example: push_ulong_to_integer(123456789u); TI-89 / TI-92 Plus Developer Guide /* Pushes the tagged integer 123456789 */ Not for Distribution Beta Version January 26, 2001...
  • Page 576: Push_Ushort_To_Integer

    TI-89 / TI-92 Plus None Differences: See Also: push_quantum_as_nonnegative_int, push_long_to_integer, push_ulong_to_integer Example: push_ushort_to_integer (655535u); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — EStack Utilities /* Pushes the tagged integer 655535 */ Not for Distribution Beta Version January 26, 2001...
  • Page 577: Reset_Estack_Size

    Differences: None See Also: bottom_estack, top_estack, estack_max_index Example: reset_estack_size (INITIAL_ESTACK_MAX_COUNT); Resets the expression stack to its default size. This is the most common use of reset_estack_size. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 578 Appendix A: System Routines — EStack Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 579: Expression Evaluation / Algebraic Simplification

    ... 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 See Also: HomeExecute ...622. See Home Screen TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 580 Appendix A: System Routines — Expression Evaluation / Algebraic Simplification TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 581: Forcefloat

    = ForceFloat( top_estack ); sprintf( Buf, "%f", floatVal ); WinStr( &appW, Buf ); GKeyIn( NULL, 0 ); ONERR top_estack = origEStack; PASS; ENDTRY top_estack = origEStack; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 582: Ng_Approxesi

    Assumptions: None Side Effects: May cause estack expansion, heap compression, or throw errors associated with APPROX simplification of the input expression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: NG_rationalESI, NG_execute...
  • Page 583: Ng_Execute

    Assumptions: None Clears error context, resets control flags, may cause estack expansion, Side Effects: heap compression, or throw errors. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None Example:...
  • Page 584: Ng_Rationalesi

    Assumptions: None Side Effects: May cause estack expansion, heap compression, or throw errors associated with EXACT simplification of the input expression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: NG_approxESI, NG_execute Example: If j indexes the bolded tag in the following external tokenized form of the expression 1.5 + (-9)
  • Page 585: Push_Approx

    = top_estack; push_quantum_as_nonnegative_int (5u); push_approx (top_estack); /* Note: Whole-number exponents such as 2 are not approximated. */ TI-89 / TI-92 Plus Developer Guide /* Push variable x */ /* x^2 */ /* pi * x^2 */ /* pi * x^2 + 5 */ /* 3.1415926536898 * x^2 + 5.0 */...
  • Page 586: Push_Equals

    Example: push_quantum_as_nonnegative_int (3u); right_side = top_estack; push_quantum (8u); push_equals (top_estack, right_side); TI-89 / TI-92 Plus Developer Guide Algebraic Simplification /* Push variable x */ /* push x = 3 */ Not for Distribution Beta Version January 26, 2001...
  • Page 587: Push_Greater_Than

    TI-89 / TI-92 Plus Differences: None See Also: push_not_equals, push_equals, push_less_than, push_greater_than_or_equals, push_less_than_or_equals Example: push_Float (2.3); j = top_estack; push_Float (3.5); push_greater_than (top_estack, j); TI-89 / TI-92 Plus Developer Guide /* Pushes TRUE_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 588: Push_Greater_Than_Or_Equals

    See Also: push_not_equals, push_greater_than, push_less_than, push_equals, push_less_than_or_equals Example: push_Float (2.3); j = top_estack; push_Float (3.5); push_greater_than_or_equals (top_estack, j); TI-89 / TI-92 Plus Developer Guide (expression j ). /* Pushes TRUE_TAG */ Not for Distribution Algebraic Simplification Beta Version January 26, 2001...
  • Page 589: Push_Internal_Simplify

    If i is the EStackIndex of the external-tokenized form of the complex expression a + b † which is A_VAR_TAG B_VAR_TAG I_TAG MULTIPLY_TAG ADD_TAG, then push_internal_simplify (i); pushes the internal-tokenized form of the expression, which is A_VAR_TAG B_VAR_TAG IM_RE_TAG. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 590: Push_Less_Than

    Differences: None See Also: push_not_equals, push_equals, push_greater_than, push_greater_than_or_equals, push_less_than_or_equals Example: push_Float (2.3); j = top_estack; push_Float (3.5); push_less_than (top_estack, j); TI-89 / TI-92 Plus Developer Guide /* Pushes FALSE_TAG */ Not for Distribution Algebraic Simplification Beta Version January 26, 2001...
  • Page 591: Push_Less_Than_Or_Equals

    None See Also: push_not_equals, push_equals, push_less_than, push_greater_than_or_equals, push_greater_than Example: push_Float (2.3); j = top_estack; push_Float (3.5); push_less_than_or_equals (top_estack, j); TI-89 / TI-92 Plus Developer Guide (expression j ). /* Pushes FALSE_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 592: Push_Not_Equals

    Example: push_quantum_as_nonnegative_int (3u); right_side = top_estack; push_quantum (8u); /* Push variable x */ push_not_equals (top_estack, right_side); TI-89 / TI-92 Plus Developer Guide (expression j ). /* Push x 3 */ Not for Distribution Algebraic Simplification Beta Version January 26, 2001...
  • Page 593: Push_Simplify

    (3.7); push_Float (2.3); /* Note: SUBTRACT_TAG does not occur in internally-simplified expressions */ push_quantum (SUBTRACT_TAG); push_simplify (top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged float 1.4 onto the estack. */ Not for Distribution Beta Version January 26, 2001...
  • Page 594: Push_Simplify_Statements

    = top_estack; push_simplify_statements (i); if (top_estack != old_top) i = next_expression_index (top_estack); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Algebraic Simplification /* convert string to tokenized form */ /* save top of tokenized form */ /* evaluate/simplify */...
  • Page 595: Replace_Top_With_Post_Simplified

    A_VAR_TAG B_VAR_TAG IM_RE_TAG, is on top of the expression stack, then replace_top_with_post_simplified (next_expression_index (top_estack)); replaces that expression with its external-tokenized form, which is A_VAR_TAG B_VAR_TAG I_TAG MULTIPLY_TAG ADD_TAG. TI-89 / TI-92 Plus Developer Guide expression on top of the expression stack. , which is Not for Distribution...
  • Page 596 Appendix A: System Routines — Expression Evaluation / Algebraic Simplification TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 597 FOpen ... 567 FPutC... 570 FRead ... 571 FSetBufSize ... 572 FSetPos ... 573 FSetSize ... 574 FSetVer... 575 FStatus... 576 FType... 577 FWrite ... 578 TokenizeName... 579 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 598 Appendix A: System Routines — Files TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 599: Faccess

    (FS_ERROR == FAccess("ZTEMP", FM_WRITE_ACCESS, "TYPE")) { Disp("ERROR: Can not write to data file"); return; TI-89 / TI-92 Plus Developer Guide — String name of file to check. — FM_READ_ACCESS or FM_WRITE_ACCESS. — 1 . . . 4 character string of file type.
  • Page 600: Fclose

    FWrite( "LINE 1\n", 7, &f1 ); FWrite( "LINE 2\n", 7, &f1 ); FClose( &f1 ); WinStr( &appW, "AF1.APP1 created\n"); else WinStr( &appW, "AF1 Failed!\n"); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files FOpen. Not for Distribution Beta Version January 26, 2001...
  • Page 601: Fcreate

    &f2 ); writeToFile( &f1 ); FClose( &f2 ); FClose( &f1 ); TI-89 / TI-92 Plus Developer Guide — String pointer to name of file to create. describes the file type (FS_ERROR is returned if it does not). Not for Distribution...
  • Page 602: Fdelete

    (FS_OK == FOpen("ZTEMPF", &f1, FM_WRITE, "APP1" )) { useTempFile( &f1 ); FClose( &f1 ); FDelete("ZTEMPF"); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files — String pointer to name of file to delete. — File deleted.
  • Page 603: Feof

    = FGetC(&f1); WinChar( w, c ); FSetPos( &f1, 0 ); /* rewind file, FEof should now return FALSE */ if (FEof(&f1)) Disp("FILE must have been empty"); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 604: Ffindfirst

    Disp("All Files of type FTYPE2 in folder: FOLD1\n"); if (sePtr = FFindFirst(FO_NONE, FTYPE2, "fold1")) { Disp(sePtr->Name); while (sePtr = FFindNext()) Disp(sePtr->Name); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files — FO_NONE — folderName is a string pointer to the folder to search.
  • Page 605: Ffindnext

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus None Differences: See Also: FFindFirst, SymFindFoldername Example: See FFindFirst. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 606: Fgetc

    FILE f1; if (FS_OK == FOpen("APPDATA", &f1, FM_READ, "APP1" )) { while (!FEof(&f1)) { c = FGetC(&f1); WinChar( w, c ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files Not for Distribution Beta Version January 26, 2001...
  • Page 607: Fgetpos

    (FS_OK == FOpen( "f3", &f1, FM_WRITE, FTYPE2 )) { FWrite( "abc", 3, &f1 ); x = FGetPos( &f1 ); /* x should have value of 3 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 608: Fgetsize

    = FGetSize( &f1 ); FSetSize( &f1, 7 ); x = FGetSize( &f1 ); FClose(&f1); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files /* x == 5 */ /* x == 8 */ /* truncate file */...
  • Page 609: Fopen

    GEN_DATA_TAG). They will show up to the user in the VAR-LINK screen as the type specified when the FILE was opened (up to four letters). TI-89 / TI-92 Plus Developer Guide — String pointer to name of file to open.
  • Page 610 On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: FAccess, FClose, FRead, FSetPos, FStatus, FWrite TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 611 (HSYMtoName( hSym, (BYTE *) fName )) { if (FS_OK == FOpen(fName, &f1, FM_READ, "APP1" )) { while (!FEof(&f1)) { c = FGetC(&f1); WinChar( w, c ); return TRUE; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 612: Fputc

    FPutC( 1, &f1 ); FPutC( 2, &f1 ); if (FS_OK != FStatus( &f1 )) { Disp("ERROR writing to file"); return; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files Not for Distribution Beta Version January 26, 2001...
  • Page 613: Fread

    = FRead( buf, 3, &f1 ); status = FRead( buf, 2, &f1 ); FClose( &f1 ); TI-89 / TI-92 Plus Developer Guide — Pointer to a buffer of at least bytesToRead bytes in length. — Pointer to FILES structure previously opened with FOpen.
  • Page 614: Fsetbufsize

    (FS_OK == FOpen("APPDATA", &f1, FM_WRITE, "APP1" )) { FSetBufSize( &f1, 500 ); writeLotsOfData( &f1 ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files — Pointer to FILES structure previously opened with FOpen for write mode.
  • Page 615: Fsetpos

    FSetPos( &f1, 0 ); FRead( &buf, 6, &f1 ); if (memcmp(buf, "AbcDeF", 6)) Disp ("ERROR: file error"); FClose( &f1 ); TI-89 / TI-92 Plus Developer Guide /* should go to EOF pos */ Not for Distribution Beta Version January 26, 2001...
  • Page 616: Fsetsize

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: FOpen, FGetSize Example: See FGetSize. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files write mode. Not for Distribution Beta Version January 26, 2001...
  • Page 617: Fsetver

    The version number of a file is stored in the file’s symbol table entry. It is a BYTE and is used by the IO system to verify that a newer version of a symbol is not sent to an older TI-89, TI-92, or TI-92 Plus. Side Effects:...
  • Page 618: Fstatus

    Disp("ERROR writing to file"); FDelete( "APPDATA" ); return; FClose( &f1 ); /* all writes were successful */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files /* only have partial file */ Not for Distribution Beta Version January 26, 2001...
  • Page 619: Ftype

    Disp( buf ); /* Create succeeded, buf will contain "DAT" */ TI-89 / TI-92 Plus Developer Guide — String pointer to the name of the file to open. — Pointer to a buffer of at least five bytes in length.
  • Page 620: Fwrite

    FDelete( "APPDATA" ); return; FClose( &f1 ); /* all writes were successful */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files — Buffer to write to file. — Number of bytes to write. — Pointer to FILES structure previously opened with FOpen.
  • Page 621: Tokenizename

    TI-89 / TI-92 Plus Differences: None See Also: TokenizeSymName (which this routine calls) TI-89 / TI-92 Plus Developer Guide — Input filename in standard C format (points to first character of the string). — Address of a buffer of at least MAX_SYM_LEN bytes.
  • Page 622 (FS_OK != TokenizeName(&VarNameBuf, tokPath)) ER_throw( EXPECTED_VAR_OR_FUNC_ERROR ); VarStore(TokNameRight(tokPath), STOF_ESI, 0, (long) top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Files /* Invalid name */ Not for Distribution Beta Version January 26, 2001...
  • Page 623 ... 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 624 Appendix A: System Routines — Graphing XCvtPtoF... 614 YCvtFtoP... 615 YCvtPtoF... 616 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 625: Ckvaliddelta

    . It is valid for maxrng to be less than minrng if delta is negative. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 626: Cmd_Clrdraw

    /* set flags to cause regraph */ if (EV_currentApp == EV_getAppID("TIGRAPH")) GT_Regraph_if_neccy(); /* if graph is active window, regraph now */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Graphing Not for Distribution Beta Version January 26, 2001...
  • Page 627: Cmd_Clrgraph

    Declaration: void cmd_clrgraph (void) Category(ies): Graphing Description: Clears any functions or expressions that were graphed with the TI-BASIC Graph or Table command by deleting the temporary folder used for storing those equations. This is the TI-BASIC ClrGraph command. Inputs: None...
  • Page 628: Cmd_Rclgdb

    Description: Recall a graph database (make it the current graph database) from the variable indexed by name_idx . This is the TI-BASIC command RclGDB. See chapter 14. Data Types for a description of graph databases. name_idx — Indexes the name of the graph database to recall.
  • Page 629: Cmd_Stogdb

    Graphing, Variables Description: Store the current graph database into the variable indexed by name_idx . This is the TI-BASIC command StoGDB. See chapter 14. Data Types for a description of graph databases. Inputs: name_idx — Indexes the name of the graph database to store to.
  • Page 630: Cptdeltax

    Side Effects: If the GR_DIRTY flag is set, the graph will be redrawn next time it is displayed. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 631: Cptdeltay

    Side Effects: If the GR_DIRTY flag is set, the graph will be redrawn next time it is displayed. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 632: Cptfuncx

    Returns the x coordinate obtained by computing original xmin+ x* incs in BCD16 floating point format, rounded to 12 digits. Assumptions: Assumes an x, y coordinate system, even in 3D mode. Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 633: Cptindep

    Differences: None See Also: CptFuncX TI-89 / TI-92 Plus Developer Guide — Pointer to an array of BCD16 floating-point values defining the min, max, and step size of the independent variable: min[0] = min, min[1] = max, min[2] = step.
  • Page 634 &xValue, curinc )) { curinc++; push_Float( xValue ); push_reversed_tail( top_estack ); push_quantum( LIST_TAG ); VarStore( lst1+5, STOF_ESI, 0, top_estack ); top_estack = saveTop; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Graphing Not for Distribution Beta Version January 26, 2001...
  • Page 635: Equ_Select

    3D graph mode expects no more than one function to be selected. If you select a 3D function to graph, make sure you deselect all other 3D functions. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 636: Equ_Setstyle

    In Sequence mode, you cannot use styles FA_ANIMATE, FA_PATH, FA_ABOVE, and FA_BELOW. 3D graph mode accepts no style settings. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: EQU_select...
  • Page 637: Findfunc

    — Name of function found stored here (in tokenized form – so ypar Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: FindGrFunc Example: CountActiveFuncs is a routine that returns the number of active graph functions for the current graph mode.
  • Page 638: Findgrfunc

    — Name of function found stored here (in tokenized form – so Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: FindFunc Example: This example pushes a list of the names of all of the graph functions with defined functions for the current graph mode on the estack.
  • Page 639: Gr_Cptindepinc

    . Returns 0 if the independent value was out of range. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: XCvtFtoP TI-89 / TI-92 Plus Developer Guide the min, max, and step size of the independent variable: indep[0] = min, indep[1] = max, indep[2] = step.
  • Page 640 (gr_CptIndepInc(f, indep_rng, &NewInc)) return( NewInc ); case GR_3D: return ((f - gr_active->rngp[GR_XMIN]) * (gr_active->rngp[GR_XGRID] / (gr_active->rngp[GR_XMAX] - gr_active->rngp[GR_XMIN]))); return 0xFFFF; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Graphing Not for Distribution Beta Version January 26, 2001...
  • Page 641: Gr_Delete_Fldpic

    Inputs: ptr — gr_active or gr_other Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None Example: gr_delete_fldpic( gr_active ); gr_delete_fldpic( gr_other ); TI-89 / TI-92 Plus Developer Guide...
  • Page 642: Gr_Displabels

    Outputs: None Assumptions: The graph screen is on the display. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: None Example: /* After drawing on the graph screen, replace labels that may have been corrupted if desired gr_DispLabels( gr_active );...
  • Page 643: Gr_Xres_Pixel

    Assumptions: The current graph mode is function mode. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None Example: /* Find the first increment of xres >= rightmost column as last point to compute.
  • Page 644: Graphactivate

    NOTE: Activating another app will cause the current app to be deactivated (receive a CM_QUIT message). The app will have to reactivate itself to get the focus back. See the second example for a way to handle this. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 645 The cmd_circle function, if it were part of an app, would be as shown below along with two of its helper routines (GetAttr and isShortFloat). It (like most of the TI-BASIC graphing commands and functions) uses GraphActivate to activate the Graph app and then it draws an ellipse to the graph window using the parameters passed to it.
  • Page 646 = FALSE; static void AP_app(pFrame self, PEvent e) Access_AMS_Global_Variables; WIN_RECT appWR; WINDOW *winPtr = &appW; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Graphing /* failed to activate grapher */ (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 647 (!graphActive) { if (winPtr->Next) { WinClose( winPtr ); winPtr->Next = NULL; break; case CM_WPAINT: DrawWinBorder( winPtr, &(winPtr->Window) ); WinBackupToScr( winPtr ); break; default: EV_defaultHandler(e); break; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 648: Graxes

    None Outputs: Assumptions: Graph is active and not in 3D mode Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GraphActivate Example: if (gr_active->graph_mode != GR_3D) GrAxes( 0, gr_active );...
  • Page 649: Grclipline

    Assumptions: Assumes an x, y coordinate system, even in 3D mode so should not be used for 3D graphing. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GrLineFlt TI-89 / TI-92 Plus Developer Guide —...
  • Page 650 GrClipLine (continued) Example: This example is the TI-BASIC Line command. It draws a line (coordinates: L1, L2, L3, L4) on the current graph using attribute newAttr. The source for the helper routine, GetAttr, is listed in the example for GraphActivate.
  • Page 651: Grlineflt

    Outputs: Assumptions: The graph is active and not in 3D mode. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GrClipLine (which this routine calls), GraphActivate Example: If the graph is active (see GraphActivate) the DrawFBox routine shown below will draw a box on the graph screen with opposite corners (x0, y0) and (x1, y1).
  • Page 652: Gt_Regraph

    None Outputs: None Assumptions: Graph is active. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: GraphActivate, GT_Regraph_if_neccy Example: See round12_err. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 653: Gt_Regraph_If_Neccy

    Outputs: None Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: GraphActivate Example: One of the first things the trace function calls is GT_Regraph_if_neccy to make sure that it is tracing a valid graph.
  • Page 654: Stepck

    Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences:...
  • Page 655: Xcvtftop

    SSHORT. The leftmost column in a window is column 0. Assumptions: Assumes an x, y coordinate system, even in 3D mode. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: XCvtPtoF, CptFuncX, YCvtPtoF, YCvtFtoP Example: /* convert float coordinates to pixel coordinates and plot point on the pixel */ col = XCvtFtoP( x, gr_active );...
  • Page 656: Xcvtptof

    12 digits. Assumptions: Assumes an x, y coordinate system, even in 3D mode. Side Effects: Possible overflow error. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: XCvtFtoP, CptFuncX, YCvtPtoF, YCvtFtoP Example: for( col=0;...
  • Page 657: Ycvtftop

    SSHORT. The topmost row in a window is row 0. Assumptions: Assumes an x, y coordinate system, even in 3D mode. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: XCvtPtoF, CptFuncX, YCvtPtoF, XCvtFtoP...
  • Page 658: Ycvtptof

    12 digits. Assumptions: Assumes an x, y coordinate system, even in 3D mode. Side Effects: Possible overflow error. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: XCvtFtoP, CptFuncX, XCvtPtoF, YCvtFtoP Example: GetWinCursor( gr_active->grwinp, &col, &row );...
  • Page 659: Home Screen

    Appendix A: System Routines — Home Screen cmd_clrhome ... 619 cmd_disphome... 620 HomeAlone ... 621 HomeExecute ... 622 HS_getAns... 623 HS_getEntry... 624 HS_popEStack... 625 See Also: EV_quit ... 302. See Apps TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 660 Appendix A: System Routines — Home Screen TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 661: Cmd_Clrhome

    Appendix A: System Routines — Home Screen cmd_clrhome Declaration: void cmd_clrhome (void) Category(ies): Home Screen Description: Delete expressions in Home screen history and clear home window. This routine implements the TI-BASIC ClrHome command. Inputs: None Outputs: None Assumptions: None Side Effects: CAS arbitrary real and integer variable number counters are reset to zero.
  • Page 662: Cmd_Disphome

    Start the Home application if it is not already running. Make sure the Home window is being displayed switching from the Program I/O window if necessary. Activate the author line for user input. This routine implements the TI-BASIC DispHome command. Inputs: None...
  • Page 663: Homealone

    Returns true if the Home screen is active on a full screen and events are not captured. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None Example:...
  • Page 664: Homeexecute

    The Home screen app is started if necessary, nCmd is pasted to the author Assumptions: line, and a ² keypress event is sent. Side Effects: May cause heap compression. May throw errors. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Not applicable.
  • Page 665: Hs_Getans

    You should not free or modify the contents of this handle as the home app needs it to format its screen properly. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also:...
  • Page 666: Hs_Getentry

    You should not free or modify the contents of this handle as the home app needs it to format its screen properly. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also:...
  • Page 667: Hs_Popestack

    If there is insufficient memory to copy the estack into the heap, the estack is popped anyway, and ER_MEMORY is thrown. Side Effects: May cause heap compression. All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences:...
  • Page 668 Appendix A: System Routines — Home Screen TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 669: Interrupts

    OSLinkOpen ... 662. See Link OSLinkReset... 663. See Link OSRegisterTimer ... 1078. See Timer OSTimerCurVal... 1079. See Timer OSTimerExpired ... 1080. See Timer OSTimerRestart ... 1081. See Timer TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 670 Appendix A: System Routines — Interrupts TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 671: Idle

    Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Example: /* Try to get the USER timer, if already in use, return FALSE. Else, wait up to a minute for a key.
  • Page 672 OSFreeTimer( USER ); return i; //while ( TRUE )} TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Interrupts /* if the APD timer went off */ /* turn the calculator off until they turn it on */...
  • Page 673 Appendix A: System Routines — Interrupts Declaration: void off (void) Category(ies): Interrupts Description: Sets the calculator in low power mode with the LCD off until link activity or the ´ key. Inputs: None Outputs: None Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus.
  • Page 674: Ossetsr

    Setting an interrupt mask above 0x0500 will disable the calculator’s ability to save state on power outage, and is discouraged. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 675: Keyboard

    OSInitBetweenKeyDelay... 648 OSInitKeyInitDelay... 649 push_getkey... 650 pushkey... 651 QModeKey ... 652 QSysKey ... 653 restoreAlphaLock ... 654 See Also: handleRclKey...932. See Operating System handleVarLinkKey...933. See Operating System TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 676 Appendix A: System Routines — Keyboard TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 677: Alphalockoff

    The alpha-lock status remains until changed by the user or another app. On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus For compatibility reasons, this routine is available on the TI-92 Plus but Differences: does nothing on that platform. See Also:...
  • Page 678: Alphalockon

    Side Effects: The alpha-lock status remains until changed by the user or another app. On AMS 2.00 and higher. Availability: For compatibility reasons, this routine is available on the TI-92 Plus but TI-89 / TI-92 Plus Differences: does nothing. See Also:...
  • Page 679: Getalphastatus

    On the TI-89, returns the status of AlphaLock. Since there is no AlphaLock on the TI-92 Plus, 0 is always returned. Inputs: None Outputs: On the TI-89, returns 1 if AlphaLock is on and 0 if AlphaLock is off. On the TI-92 Plus, always returns 0. Assumptions: None Side Effects:...
  • Page 680: Gkeyflush

    None Outputs: None Assumptions: None Side Effects: The keyboard buffer is global to all apps. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: kbhit Example: GKeyFlush(); /* in case key already queued up */ key = DlgMessage( "WARNING", "Delete all user data?"...
  • Page 681: Gkeyin

    By-passes the event manager’s handling of keys so this routine should be used with caution. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Developer Guide that will be “blinked” (by XORing a reverse/normal video rectangle) while waiting on a key. If it is NULL then there is no cursor.
  • Page 682 See WinHome for an example using SCR_RECT. /* pause to show results before redrawing backup graph image */ GKeyIn( NULL, GKF_REPUSH_KEY ); WinBackupToScr( &graphWindow ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Keyboard Not for Distribution Beta Version January 26, 2001...
  • Page 683: Kbhit

    Outputs: TRUE if a key is pending in the key queue. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: None Example: while ( !kbhit () );...
  • Page 684: Keyyesorno

    /* wait for user to confirm deletion of config file */ while (TRUE) { key = GKeyIn( NULL, GKF_NORMAL ); if (-1 == (deleteIt = KeyYesOrNo(key))) continue; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Keyboard Not for Distribution Beta Version January 26, 2001...
  • Page 685: Ngetchx

    If there is no key in the key queue block. Else returns the key value. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: List of key definition equates in tiams.h, OSFastArrows.
  • Page 686: Oscheckbreak

    The ´ key is tied to a high level interrupt (level 6), and is used on the Side Effects: calculator as a “break” key to allow the user to interrupt the current flow of activity. This call returns true and clears all pending keys from the key queue if the ´...
  • Page 687: Osclearbreak

    Inputs: None Outputs: None Assumptions: None Side Effects: Sets the OSOnBreak flag to FALSE. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: OSOnBreak, OSCheckBreak, OSEnableBreak, OSDisableBreak Example: if(errCode == ER_BREAK) OSClearBreak();...
  • Page 688: Osdisablebreak

    OSOnBreak flag. Inputs: None Outputs: None Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: OSOnBreak, OSCheckBreak, OSClearBreak, OSEnableBreak Example: OSDisableBreak(); /* do some stuff without the ON key */...
  • Page 689: Osenablebreak

    OSOnBreak flag. Inputs: None Outputs: None Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: OSOnBreak, OSCheckBreak, OSClearBreak, OSDisableBreak Example: See OSDisableBreak. TI-89 / TI-92 Plus Developer Guide...
  • Page 690: Osinitbetweenkeydelay

    None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus The system tick is based on the system clock, which may vary across Differences: platforms. If you must change these values, it is recommended that you first query the system to see what the delay is set at, then set the delay to some fraction or multiple of the system default value.
  • Page 691: Osinitkeyinitdelay

    None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus The system tick is based on the system clock, which may vary across Differences: platforms. If you must change these values, it is recommended that you first query the system to see what the delay is set at, then set the delay to some fraction or multiple of the system default value.
  • Page 692: Push_Getkey

    Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus This routine remaps the TI-89 keys to match the TI-92 Plus. This is the Differences: TI-BASIC GetKey routine and not the low level keyboard routine. Some of the return values are different than those returned by GKeyIn or the event handler.
  • Page 693: Pushkey

    — Key code to push onto key queue. Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: push_getkey, GKeyIn Example: See QSysKey (using GKeyPush).
  • Page 694: Qmodekey

    None All versions of the TI-89 / TI-92 Plus. Availability: On the TI-92 Plus, the built-in app keys are ¥-Q, W, E, R, T, Y. On the TI-89 / TI-92 Plus Differences: TI-89 they are ¥-ƒ . . . ‡ and ".
  • Page 695: Qsyskey

    Outputs: TRUE or FALSE. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: QModeKey Example: The menu system uses GKeyIn to get keys. It sets the GKF_MODAL and GKF_SYS keys which cause GKeyIn to check for system or mode keys and repush those keys onto the keyboard buffer and return KB_ESC.
  • Page 696: Restorealphalock

    Side Effects: None Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus For compatibility reasons, this routine is available on the TI-92 Plus but does nothing on that platform. Differences: See Also: alphaLockOn, alphaLockOff Example: FLAGS8 saveStat;...
  • Page 697: Link

    LIO_SendData ... 659 OSCheckLinkOpen ... 660 OSLinkClose ... 661 OSLinkOpen ... 662 OSLinkReset... 663 See Also: freeIdList ...333. See Certificates handleVarLinkKey...933. See Operating System LIO_SendIdList ...334. See Certificates TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 698 Appendix A: System Routines — Link TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 699: Battoolowflash

    Differences: See Also: None Example: if (BatTooLowFlash(50*MS100)) ERD_dialog( ER_BATT_LOW, FALSE ); TI-89 / TI-92 Plus Developer Guide (recommended value is 50 † MS100). /* batteries too low to send product code */ Not for Distribution Beta Version January 26, 2001...
  • Page 700: Lio_Recvdata

    Outputs: Returns non-0 if an error occurs. Otherwise returns 0. None Assumptions: None Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: LIO_SendData Example: if (error = LIO_RecvData(msg, len+2, ONE_SECOND * 2)) return error;...
  • Page 701: Lio_Senddata

    Outputs: Returns non-0 if an error occurs. Otherwise returns 0. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: LIO_RecvData Example: rc = LIO_SendData(frame, frameLen + 2);...
  • Page 702: Oschecklinkopen

    None Side Effects: None Availability: On AMS 2.05 and higher. TI-89 / TI-92 Plus None Differences: See Also: OSLinkOpen Example: TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Link Not for Distribution Beta Version January 26, 2001...
  • Page 703: Oslinkclose

    Inputs: None Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: OSLinkOpen Example: TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 704: Oslinkopen

    This function does not check whether the link port is closed. You should always call OSCheckLinkOpen prior to calling this function. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 705: Oslinkreset

    Inputs: None Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: OSCheckLinkOpen Example: TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 706 Appendix A: System Routines — Link TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 707: Lists And Matrices

    ... 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 push_identity_mat... 693 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 708 711 push_rownorm ... 712 push_rowswap ... 713 push_sign... 714 push_stddev... 715 push_submat ... 716 push_sumlist ... 718 push_transpose_aux... 719 push_unitv... 721 push_variance... 722 remaining_element_count... 723 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 709 Appendix A: System Routines — Lists and Matrices See Also: is_independent_of_tail ...252. See Algebra Utilities is_tail_independent_of ...256. See Algebra Utilities push_dot_exponentiate...777. See Math push_sequence...825. See Math push_simult...829. See Math TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 710 Appendix A: System Routines — Lists and Matrices TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 711: All_Tail

    (USER_FUN_TAG == ESTACK (i--)) i = next_expression_index (i); return all_tail (is_constant, i); TI-89 / TI-92 Plus Developer Guide its one argument. — Index of a tail. /* Loop to check the one argument */ /* Loop to check 2nd arg */...
  • Page 712: Any_Tail

    (IS_INF_MAG_TAG (ESTACK (i-1u)) && IS_INF_MAG_TAG (ESTACK (next_expression_index (i - 1u))) ) || LIST_TAG == ESTACK (i) && any_tail (has_inf_mag, i - 1u); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices its one argument. — Index of a tail.
  • Page 713: Cmd_Sorta

    /* names do not need STR_DATA_TAG so skip it */ push_quantum(END_TAG); push_Float(2.0); push_Float(-5.1); push_Float(8.0); push_quantum(LIST_TAG); VarStore( vName, STOF_ESI, 0, top_estack ); cmd_sorta( vName ); cmd_sortd( vName ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 714: Cmd_Sortd

    On AMS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: cmd_sorta Example: See cmd_sorta. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 715: Did_Map_Aggregate_Arg

    ** Output: pushes the element by element product onto the estack void push_dot_mult (EStackIndex i, EStackIndex j) if (! did_map_aggregate_arg (push_dot_mult, i, j)) push_product (i, j); TI-89 / TI-92 Plus Developer Guide expressions. Not for Distribution Beta Version January 26, 2001...
  • Page 716: Is_Matrix

    (j); i = next_expression_index (i); j = top_estack; push_max1 (j); delete_between (old_top, j); else ER_throw( ER_DATATYPE ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 717: Is_Square_Matrix

    Side Effects: None On AMS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: is_matrix Example: push_Float (3.7); is_square_matrix (top_estack); TI-89 / TI-92 Plus Developer Guide /* Returns FALSE */ Not for Distribution Beta Version January 26, 2001...
  • Page 718: Last_Element_Index

    (top_estack); push_Float (3.7); foo = top_estack; push_Float (5.4); last_element_index (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices /* Returns top_estack */ /* Returns foo */ Not for Distribution Beta Version January 26, 2001...
  • Page 719: Map_Tail

    (STR_DATA_TAG == ESTACK(i)) push_quantum_as_nonnegative_int else if (LIST_TAG == ESTACK(i)) map_tail (push_ord, i-1); push_quantum (LIST_TAG); else ER_THROW (ER_ARG_MUST_BE_STRING); TI-89 / TI-92 Plus Developer Guide /* if arg is a string */ (ESTACK (next_expression_index(i) + 2u)); Not for Distribution Beta Version January 26, 2001...
  • Page 720: Push_Augment

    EStackIndex of the 2x1 matrix [5; 6], then */ push_augment (i, j); /* pushes onto the expression stack the matrix [1, 2, 5; 3, 4, 6]. */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution...
  • Page 721: Push_Coldim

    May expand expression stack, cause heap compression, or throw an error. On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: push_rowdim Example: EStackIndex mat_idx; push_coldim( mat_idx ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 722: Push_Colnorm

    /* Push the matrix norm (28.178) */ push_matnorm( mIndx ); /* Push the determinant (108) */ push_determinant( mIndx, NULL ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 723: Push_Cross_Product

    EStackIndex of the internal-tokenized form of {c, 2, 3}, then */ push_cross_product (i, j); /* pushes the internal-tokenized form of {3*a-2*b, b*c-3, 2-a*c} onto the expression stack. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 724: Push_Cumsum

    VarStore( lName+6, STOF_ESI, 0, top_estack ); /* Now push the sum of all of the elements in the list: 5.0 */ push_sumlist( lIndx ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution...
  • Page 725: Push_Determinant

    See Also: None Example: See push_colnorm. TI-89 / TI-92 Plus Developer Guide — If not NULL then indexes a tolerance factor. Any matrix element is treated as zero if its absolute value is less than the tolerance. Not for Distribution...
  • Page 726: Push_Diag

    None Assumptions: None Side Effects: May expand expression stack, cause heap compression, or throw an error. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Example: Assuming the top of the estack contains a conforming matrix, this example computes diag (top_estack) †...
  • Page 727: Push_Dimension

    TI-89 / TI-92 Plus Differences: None See Also: Example: This example pushes the dimension (three) of a string on the estack. BYTE str[] = {0,'1','2','3',0,STR_DATA_TAG}; push_dimension( str+5 ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 728: Push_Dot_Add

    {a + 1, 3, 1} onto the estack such that top_estack points to the bolded tag as follows. END_TAG 1 1 NONNEGATIVE_INTEGER_TAG 3 1 NONNEGATIVE_INTEGER_TAG 1 1 NONNEGATIVE_INTEGER_TAG A_VAR_TAG ADD_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 729: Push_Dot_Div

    {a * 1/3, 2/3, 0} onto the estack such that top_estack points to the bolded tag as follows. END_TAG 0 NONNEGATIVE_INTEGER_TAG 3 1 2 1 POSITIVE_FRACTION_TAG 3 1 1 1 POSITIVE_FRACTION_TAG A_VAR_TAG MULTIPLY_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 730: Push_Dot_Mult

    {a * 3, 6, 0} onto the estack such that top_estack points to the bolded tag as follows. END_TAG 0 NONNEGATIVE_INTEGER_TAG 6 1 NONNEGATIVE_INTEGER_TAG 3 1 NONNEGATIVE_INTEGER_TAG A_VAR_TAG MULTIPLY_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 731: Push_Dot_Sub

    {a + (-1), 1, -1} onto the estack such that top_estack points to the bolded tag as follows. END_TAG 1 1 NEGATIVE_INTEGER_TAG 1 1 NONNEGATIVE_INTEGER_TAG 1 1 NEGATIVE_INTEGER_TAG A_VAR_TAG ADD_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 732: Push_Dotproduct

    EStackIndex of the internal-tokenized form of {c, 2, 3}, then */ push_dotproduct (i, j); /* Pushes the internal-tokenized form of 2 * a + 3 * b + c onto the expression stack. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution...
  • Page 733: Push_Eigvc

    (EStackIndex mat_idx ) Category(ies): Lists and Matrices, Math Description: Returns a matrix containing the eigen vectors for a real or complex square matrix on the estack. This is the TI-BASIC eigVc command. mat_idx — Indexes the input square matrix. Inputs: Outputs: None...
  • Page 734: Push_Eigvl

    See Also: push_eigvc Example: This example is essentially the eigVl example from the TI-89 guidebook only written as an app. Note that it forces the current complex mode to rectangular. The output rather than being displayed in the Home screen is stored in the variable LST3.
  • Page 735: Push_Identity_Mat

    /* Assume matrix already on estack */ mat = top_estack; push_rowdim( mat ); push_identity_mat ( top_estack ); push_augment( mat, top_estack ); TI-89 / TI-92 Plus Developer Guide to push on the estack. Not for Distribution Beta Version January 26, 2001...
  • Page 736: Push_List_To_Mat

    (list_index, NULL); /* Now push a column matrix on the estack */ push_list_to_mat (list_index, Integer1Index); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices — Indexes the input list. resulting matrix. If NULL then the number of elements in the list is used (a row matrix is created).
  • Page 737: Push_Mat_To_List

    /* see if it is a vector */ if ( (1 == nrows) || (1 == ncols) ) { push_mat_to_list (list_index); list_index = top_estack; else ER_throw( ER_DATATYPE ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 738: Push_Matnorm

    On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: push_rownorm, push_colnorm Example: See push_colnorm. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 739: Push_Mean

    ); delete_expression( sum_idx ); push_quantum( LIST_TAG ); VarStore( L3+3, STOF_ESI, 0, top_estack ); TI-89 / TI-92 Plus Developer Guide /* Point to input list */ /* Point to -(mean(list)) */ Not for Distribution Beta Version January 26, 2001...
  • Page 740: Push_Median

    May expand expression stack, cause heap compression, or throw an error. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_mean TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 741 = (EStackIndex) INT_NEG1+3; delete_expression( top_estack ); push_expression( cond_idx ); idx = next_expression_index( idx ); idx = top_estack; push_reversed_tail( idx ); delete_between ( old_top, idx ); push_quantum( LIST_TAG ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 742: Push_Mrow

    TI-89 / TI-92 Plus Differences: None See Also: push_mrowadd, push_rowadd TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices — Indexes the input matrix. — Indexes the row to operate on. (continued) Not for Distribution...
  • Page 743 Integer2Index, top_estack, Integer1Index, Integer2Index ); /* Now have [5,10;13,24] */ push_rowadd( top_estack, Integer2Index, Integer1Index ); /* Now have [18,34;13,24] */ VarStore( m5+3, STOF_ESI, 0, top_estack ); TI-89 / TI-92 Plus Developer Guide {END_TAG, Not for Distribution Beta Version January 26, 2001...
  • Page 744: Push_Mrowadd

    See Also: push_mrow, push_rowadd Example: See push_mrow. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices — Indexes the multiplier expression. — Indexes the input matrix. — Indexes the row to add the values from the row indexed by mult_row_idx .
  • Page 745: Push_Newlist

    123 ); VarStore( lName+3, STOF_ELEMENT, 0, top_estack, 1u, 0 ); /* Store 1234567890 to L2[11] */ push_ulong_to_integer( 1234567890l ); VarStore( lName+3, STOF_ELEMENT, 0, top_estack, 11u, 0 ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 746: Push_Newmat

    VarStore( mName+3, STOF_ESI, 0, top_estack ); /* Store 1.234 to M0[2,1] */ push_Float( 1.234 ); VarStore( mName+3, STOF_ELEMENT, 0, top_estack, 1u, 2u ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 747: Push_Prodlist

    [3, 8], onto the estack such that top_estack points to the bolded tag as follows. END_TAG END_TAG 8 1 NONNEGATIVE_INTEGER_TAG 3 1 NONNEGATIVE_INTEGER_TAG LIST_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 748: Push_Randmat

    EStackIndex num4; push_ushort_to_integer( 4 ); num4 = top_estack; push_ushort_to_integer( 10 ); push_randmat( num4, top_estack ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 749: Push_Red_Row_Ech

    *= 1.2e-12; push_Float( tol ); push_red_row_ech( rMat, top_estack ); TI-89 / TI-92 Plus Developer Guide — If not NULL then indexes a tolerance factor. Any matrix element is treated as zero if its absolute value is less than the tolerance.
  • Page 750: Push_Reversed_Tail

    (5.2); /* Pushes tagged 3.7 on top of tagged 5.2 on top of an END_TAG. */ push_reversed_tail (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 751: Push_Row_Echelon

    See Also: push_red_row_ech Example: push_row_echelon( top_estack, NULL ); TI-89 / TI-92 Plus Developer Guide — If not NULL then indexes a tolerance factor. Any matrix element is treated as zero if its absolute value is less than the tolerance. Not for Distribution...
  • Page 752: Push_Rowadd

    None See Also: push_mrow, push_mrowadd See push_mrow. Example: TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices — Indexes the input matrix. — Indexes the row to add from. Not for Distribution Beta Version January 26, 2001...
  • Page 753: Push_Rowdim

    May expand expression stack, cause heap compression, or throw an error. On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: push_coldim Example: See push_identity_mat. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 754: Push_Rownorm

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_colnorm, push_matnorm Example: See push_colnorm. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 755: Push_Rowswap

    /* Swap rows so current row is pivot row. */ push_rowswap (mat_idx, piv_row_idx, cur_row_idx); delete_between (old_mat_idx, cur_row_idx); delete_expression (mat_idx); mat_idx = top_estack; TI-89 / TI-92 Plus Developer Guide — Index of the input matrix. Not for Distribution Beta Version January 26, 2001...
  • Page 756: Push_Sign

    TI-89 / TI-92 Plus Differences: None See Also: None Example: push_Float (-3.7); push_sign (top_estack); /* Pushes –1.0 onto the estack. */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 757: Push_Stddev

    TI-89 / TI-92 Plus Differences: None See Also: push_variance Example: EStackIndex lst_idx; push_quantum(END_TAG); push_Float(1.5); push_Float(9.1); push_Float(5.1); push_quantum(LIST_TAG); lst_idx = top_estack; push_stddev( lst_idx ); push_variance( lst_idx ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 758: Push_Submat

    Differences: None See Also: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices — Index of input matrix. — Index of starting column (1 is used if NULL). — Index of ending row (the number of rows in the input matrix is used if NULL).
  • Page 759 ( nRows ); endRowIdx = top_estack; push_ulong_to_integer ( nCols ); endColIdx = top_estack; push_submat ( inMat, NULL, NULL, endRowIdx, endColIdx ); delete_between( oldTop, endColIdx ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 760: Push_Sumlist

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_cumsum Example: See push_cumsum. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 761: Push_Transpose_Aux

    None See Also: None TI-89 / TI-92 Plus Developer Guide — 0 — transpose the matrix. The matrix may be in internal or external tokenized form and the result is in the same form. 1 — transpose the complex conjugate of the matrix. The matrix must be in internal tokenized form and the result will be in internal tokenized form.
  • Page 762 END_TAG END_TAG 0 NONNEGATIVE_INTEGER_TAG 2 1 NONNEGATIVE_INTEGER_TAG IM_RE_TAG 3 1 NONNEGATIVE_INTEGER_TAG 4 1 NEGATIVE_INTEGER_TAG IM_RE_TAG LIST_TAG END_TAG A_VAR_TAG 1 1 NONNEGATIVE_INTEGER_TAG IM_RE_TAG B_VAR_TAG LIST_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 763: Push_Unitv

    May expand expression stack, cause heap compression, or throw an error. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: None Example: See push_round. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 764: Push_Variance

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_stddev Example: See push_stddev. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Lists and Matrices Not for Distribution Beta Version January 26, 2001...
  • Page 765: Remaining_Element_Count

    On AMS 1.05 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: last_element_index Example: push_quantum (END_TAG); push0 (); push1 (); remaining_element_count (top_estack); /* Returns 2 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 766 Appendix A: System Routines — Lists and Matrices TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 767: Logic

    ... 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 768 Appendix A: System Routines — Logic TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 769: And_Onto_Top

    Pushes onto the estack the conjunct without the lead factor of j. if (i == j) push_expression (remaining_conjuncts_index (i)); else push_but_conjunct_factor (remaining_conjuncts_index (i), j); and_onto_top (lead_conjunct_factor_index (i)); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 770: Is_Equivalent_To

    = top_estack; push_quantum (8u); replace_top2_with_pow (exponent); replace_top2_with_sum (partial_sum); is_equivalent_to (top_estack, unexpanded); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic /* push x */ /* top_estack -> x + 1 */ /* unexpanded -> (x + 1)^2 */ /* push x */ /* top_estack ->...
  • Page 771: Is_Negative

    /* i indexes a zero expression. Returns 1 if it determines that the expression >= 0, else -1 if < 0, else 0. return is_nonnegative (i) ? 1 : -is_negative (i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 772: Is_Never0

    (EXPONENTIATION_TAG != ESTACK (i) || is_nonnegative (POWER_EXPONENT_INDEX (i)) || is_never0 (POWER_BASE_INDEX (i)) ) ) else times_top (i); /* end push_maybe0_factors */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 773: Is_Nonnegative

    (! is1 (i)) if (is_nonnegative (lead_factor_index (i))) return i; else i = remaining_factors_index (i); return NULL_INDEX; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 774: Is_Nonpositive

    /* Returns TRUE if the expressions indexed by i and j are both non-negative or both nonpositive. return is_nonnegative (i) && is_nonnegative (j) || is_nonpositive (i) && is_nonpositive (j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 775: Is_Positive

    Returns 1 if it determines that the expression is > 0, else -1 if <= 0, else 0. return is_positive (i) ? 1 : -is_nonpositive (i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 776: Is_Real

    (MULTIPLY_TAG == ESTACK (i)) push_real_factors (next_expression_index (--i)); if (is_real (i)) times_top (i); else if (is_real (i)) push_expression (i); else push_expression (Integer1Index); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 777: Is_Undefined

    TI-89 / TI-92 Plus Differences: None See Also: is_float_signed_infinity, is_float_infinity, is_float_unsigned_inf_or_nan, is_float_transfinite, is_nan Example: push1(); real_part = top_estack; push_quantum (UNDEFINED_TAG); replace_top2_with_imre (real_part); is_undefined (top_estack); TI-89 / TI-92 Plus Developer Guide /* Returns TRUE */ Not for Distribution Beta Version January 26, 2001...
  • Page 778: Lead_Conjunct_Factor_Index

    Pushes onto the estack the conjunct without the lead factor of j. if (i == j) push_expression (remaining_conjuncts_index (i)); else push_but_conjunct_factor (remaining_conjuncts_index (i), j); and_onto_top (lead_conjunct_factor_index (i)); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 779: Lead_Disjunct_Term_Index

    Pushes onto the estack the disjunct without the lead term of j. if (i == j) push_expression (remaining_disjuncts_index (i)); else push_but_disjunct_term (remaining_disjuncts_index (i), j); and_onto_top (lead_disjunct_term_index (i)); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 780: Or_Onto_Top

    (8u); push_quantum (NOT_TAG); /* top_estack -> NOT x */ or_onto_top (foo); /* Replaces top NOT x with TRUE_TAG. */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 781: Push_And

    (i, old_top) ) return; if (TRUE_TAG == ESTACK (old_top) || FALSE_TAG == ESTACK (i)) top_estack = next_expression_index (top_estack); push_expression (i); else push_and (i, old_top); delete_expression (old_top); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 782: Push_But_Conjunct_Factor

    (i == j) push_expression (remaining_conjuncts_index (i)); else push_but_conjunct_factor (remaining_conjuncts_index (i), j); and_onto_top (lead_conjunct_factor_index (i)); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic push_but_conjuct_factor (i, j) push_but_conjuct_factor (i, j) Not for Distribution Beta Version January 26, 2001...
  • Page 783: Push_Not

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_and, push_or, and_onto_top, or_onto_top, replace_top2_with_and, replace_top2_with_or Example: push_quantum (TRUE_TAG); push_not (top_estack); /* Pushes FALSE_TAG */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 784: Push_Or

    (8u); arg2 = top_estack; /* Push variable x */ push_not (arg2); push_or (top_estack, arg2); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic /* Pushes a TRUE_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 785: Push_When

    TI-89 / TI-92 Plus Differences: None See Also: push_sign Example: push_quantum (END_TAG); push0 (); push1 (); push_quantum (TRUE_TAG); push_when (top_estack); /* Pushes a copy of the above-pushed one. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 786: Remaining_Conjuncts_Index

    Returns index (b and c). remaining_conjuncts_index (x > 3) Returns index_true. push_quantum (8u); /* Push variable x */ remaining_conjuncts_index (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic /* Returns index_true. */ Not for Distribution Beta Version January 26, 2001...
  • Page 787: Remaining_Disjuncts_Index

    If i indexes the internally-simplified expression x > 3 then remaining_disjuncts_index(i) returns index_false. push_quantum (8u); /* Push variable x */ remaining_disjuncts_index (top_estack); TI-89 / TI-92 Plus Developer Guide /* Returns index_false. */ Not for Distribution Beta Version January 26, 2001...
  • Page 788: Replace_Top2_With_And

    /* Replaces the top two expressions with a variable x. */ push_quantum (TRUE_TAG); i = top_estack; push_quantum (8u); replace_top2_with_and (i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Logic Not for Distribution Beta Version January 26, 2001...
  • Page 789: Replace_Top2_With_Or

    None See Also: or_onto_top, push_or Example: /* Replaces the top two expressions with a variable x. */ push_quantum (FALSE_TAG); i = top_estack; push_quantum (8u); replace_top2_with_or (i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 790 Appendix A: System Routines — Logic TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 791: Math

    ... 770 push_conj... 771 push_constant_terms... 772 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 792 ... 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 793 833 push_sqrt ... 834 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 794 ...697. See Lists and Matrices push_median ...698. See Lists and Matrices push_mrow ...700. See Lists and Matrices push_mrowadd ...702. See Lists and Matrices push_prodlist...705. See Lists and Matrices TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 795 ...718. See Lists and Matrices push_transpose_aux...719. See Lists and Matrices push_unitv...721. See Lists and Matrices push_variance...722. See Lists and Matrices replace_top_with_reciprocal ... 506. See EStack Arithmetic TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 796 Appendix A: System Routines — Math TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 797: Are_Units_Consistent

    0x40 0x00 0x35 0x79 0x10 0x00 0x00 0x00 0x00 FLOAT_TAG 0 _ f t 0 MULTIPLY_TAG then are_units_consistent (r, s); will return TRUE, since both expression are length measurements. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 798: Did_Push_Anti_Deriv

    See Also: push_def_int, push_nint Example: void push_anti_derivative (EStackIndex i, EStackIndex vi) (void)did_push_anti_deriv (i, vi, FALSE); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math — Index of the top tag of an internally-simplified expression or an aggregate thereof.
  • Page 799: Did_Push_Approx_Inflection_Point

    /* Returns TRUE after pushing tagged float 0.0 onto top of the estack. */ push_quantum_as_nonnegative_int (3u); push_quantum (8u); /* Push variable x */ vi = top_estack; push_quantum (EXPONENTIATION_TAG); did_push_approx_inflection_point (top_estack, vi, -1.0, 1.0); TI-89 / TI-92 Plus Developer Guide aggregate thereof. /* x^3 */ Not for Distribution Beta Version January 26, 2001...
  • Page 800: Did_Push_Series

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math ^x, x, 3, 0) | x = 1 -> 8/3. — Index of the top tag of an internally-simplified expression, algebraic comparison, or an aggregate thereof.
  • Page 801 /* Returns TRUE after pushing a tagged integer –1 onto the estack. */ push_quantum (8u); /* Push variable x */ ki = top_estack; push_sum (ki, IntegerMinus1Index); i = top_estack; did_push_series (i, ki, Integer2Index, NULL_INDEX, TRUE); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 802: Push_1St_Derivative

    Pushes the rectangular Cartesian gradient tail of i with respect to vars. if (END_TAG == ESTACK (vars)) push_quantum (END_TAG); else push_grad_tail (i, next_expression_index (vars)); push_1st_derivative (i, vars); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 803: Push_Abs

    See Also: push_sign Example: push_quantum_as_nonnegative_int (3u); real_part = top_estack; push_quantum_as_nonnegative_int (4u); replace_top2_with_imre (real_part); push_abs (top_estack); /* Pushes a tagged integer 5 */ TI-89 / TI-92 Plus Developer Guide /* Pushes an IM_RE_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 804: Push_Acos

    See Also: push_asin, push_atan, push_phase Example: push_negate_quantum_as_negint(1u); push_acos (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes tagged integer -1 */ /* Pushes PI_TAG or tagged 3.14159 . . . */ Not for Distribution...
  • Page 805: Push_Acosh

    TI-89 / TI-92 Plus Differences: None See Also: push_asinh, push_atanh Example: push_quantum_as_nonnegative_int(1u); push_acosh (top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged integer 1 */ /* Pushes tagged 0 or 0.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 806: Push_Asin

    See Also: push_acos, push_atan, push_phase Example: push_quantum_as_nonnegative_int(1u); push_asin (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes tagged integer 1 */ /* Pushes symbolic or Float pi/2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 807: Push_Asinh

    TI-89 / TI-92 Plus Differences: None See Also: push_acosh, push_atanh Example: push_quantum_as_nonnegative_int(0u); push_asinh (top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged integer 0 */ /* Pushes tagged 0 or 0.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 808: Push_Atan

    See Also: push_asin, push_acos, push_phase Example: push_quantum_as_nonnegative_int(1u); push_atan (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes tagged integer 1 */ /* Pushes symbolic or Float pi/4 */ Not for Distribution Beta Version January 26, 2001...
  • Page 809: Push_Atanh

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_acosh, push_asinh Example: push_quantum_as_nonnegative_int(1u); push_atanh(top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes tagged integer 1 */ /* Pushes PLUS_INFINITY_TAG */ Not for Distribution Beta Version January 26, 2001...
  • Page 810: Push_Ceiling

    TI-89 / TI-92 Plus Differences: None See Also: push_floor, push_integer_part Example: push_Float (1.5); push_ceiling (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes a tagged float 2.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 811: Push_Comb

    TI-89 / TI-92 Plus Differences: None See Also: push_perm, push_factorial Example: push_quantum_as_nonnegative_int (4u); i = top_estack; push_quantum_as_nonnegative_int (2u); push_comb (i, top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes a tagged integer 6 */ Not for Distribution Beta Version January 26, 2001...
  • Page 812: Push_Comdenom

    EStackIndex old_top = top_estack; CONTROL_BITS old_NG_control = NG_control; SET_EXPAND_TRIG; push_internal_simplify (i); i = top_estack; push_comdenom (i, NULL_INDEX); NG_control = old_NG_control; delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 813: Push_Conj

    Differences: None See Also: push_re, push_im, push_abs, push_phase, push_sign Example: push_quantum_as_nonnegative_int (4u); real_part = top_estack; push_quantum_as_nonnegative_int (2u); replace_top2_with_imre (real_part); push_conj (top_estack); /* Pushes 4-2 i */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 814: Push_Constant_Terms

    (); push_quantum (8u); replace_top2_with_sum (foo); push_constant_terms (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* partial sum = top_estack */ /* push variable x */ /* top_estack -> x + pi + 1 */...
  • Page 815: Push_Cos

    /* Pushes onto the estack the secant of the expression indexed by i. */ if (LIST_TAG == ESTACK (i)) map_tail (push_sec, i - 1u); push_quantum (LIST_TAG); else push_cos (i); replace_top_with_reciprocal (); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 816: Push_Cosh

    /* Pushes onto the estack the hyperbolic secant of the expression indexed by i. */ if (LIST_TAG == ESTACK (i)) map_tail (push_sech, i - 1u); push_quantum (LIST_TAG); else push_cosh (i); replace_top_with_reciprocal (); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 817: Push_Def_Int

    (i, vi); replace_top2_with_pow (m); add1_to_top (); i = top_estack; push_sqrt (i); delete_between (old_top, i); i = top_estack; push_def_int (i, vi, j, k); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 818: Push_Degrees

    If the current angle setting is DEGREES, i indexes 30, j indexes 20, and k indexes 0, then push_degrees (i, j, k); pushes the value 91/3 which is the equivalent number of degrees onto the estack. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution...
  • Page 819: Push_Dot_Exponentiate

    Example: /* Push random 2 by 2 matrix: */ push_randmat (Integer2Index, Integer2Index); /* Push the matrix of the squares of the elements */ push_dot_exponentiate (top_estack, Integer2Index); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 820: Push_Exp

    See Also: push_exponentiate, raise_to_top, replace_top2_with_pow Example: push_quantum_as_nonnegative_int (0u); push_exp (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Push tagged integer 0 */ /* Pushes tagged integer 1 */ Not for Distribution Beta Version January 26, 2001...
  • Page 821: Push_Expand

    (8u); add1_to_top (); replace_top2_with_pow (exponent); push_expand (top_estack, NULL_INDEX, FALSE); TI-89 / TI-92 Plus Developer Guide — Indexes the top tag of an internally-simplified algebraic expression, algebraic comparison, or aggregate thereof. — Indexes NULL_INDEX or the top tag of an internally-simplified variable or a kernel.
  • Page 822: Push_Exponentiate

    Pushes onto the estack a similar sequence of expression bas raised to the expressions in tail. if (END_TAG == ESTACK (tail)) push_quantum (END_TAG); else push_distrib_base_over_tail (bas, next_expression_index (tail)); push_exponentiate (bas, tail); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 823: Push_Extended_Prod

    = top_estack; push_quantum (21u); index_var = top_estack; push_extended_prod (index_var, index_var, lower_limit, upper_limit); TI-89 / TI-92 Plus Developer Guide (n!) onto the estack */ /* Push variable n */ /* Push variable k */ Not for Distribution Beta Version January 26, 2001...
  • Page 824: Push_Factor

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math 6 (x - 1)^2 (x + 1)^2 6 (x - 1)^2 (x + 1)^2 (x^2 + 1) 6 (x - 1)^2 (x + 1)^2 (x^2 + 1) 2 †...
  • Page 825 (8u); replace_top2_with_pow; subtract1_from_top (); push_factor (top_estack, NULL_INDEX, POLY_FCTR); TI-89 / TI-92 Plus Developer Guide /* Push variable x */ /* top_estack -> x^2 */ /* top_estack -> x^2 - 1 */ /* Pushes (x - 1)(x + 1) */...
  • Page 826: Push_Factorial

    If i indexes IM_RE_TAG or PI_TAG, then push_factorial( i ) pushes FACTORIAL_TAG on top of a copy of the expression indexed by i . push_quantum_as_nonnegative_int (3u); push_factorial (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes a tagged integer 6 */ Not for Distribution...
  • Page 827: Push_Floor

    EStackIndex old_top = top_estack; push_negate (i); i = top_estack; push_floor (i); negate_top (); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide ù floor(y). Not for Distribution ù y with x and y real, the result is Beta Version January 26, 2001...
  • Page 828: Push_Fractional_Part

    None See Also: None Example: push_Float (-2.1); push_fractional_part (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math ù fPart(y). /* Pushes –0.1 */ Not for Distribution ù y with x and y real, Beta Version January 26, 2001...
  • Page 829: Push_Gcd_Then_Cofactors

    (Float1Index); k = top_estack; push_ratio (j, i); else EStackIndex old_top = top_estack; EStackDisplacement del = deleted_between (old_top, push_gcd_then_cofactors (j, i, &k)); k -= del; return k; TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 830: Push_Im

    Example: push_Float (2.3); real_part = top_estack; push_Float (3.5); replace_top2_with_imre (real_part); push_im (top_estack); /* Pushes tagged float 3.5 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 831: Push_Integer_Part

    None See Also: push_integer_quotient, push_integer_remainder, push_floor, push_mod, push_ceiling Example: push_Float (-2.1); push_integer_part (top_estack); TI-89 / TI-92 Plus Developer Guide ù iPart(y). /* Pushes –2.0 */ Not for Distribution ù y with x and y real, Beta Version January 26, 2001...
  • Page 832: Push_Integer_Quotient

    Example: push_quantum_as_nonnegative_int (3u); j = top_estack; push_quantum_as_nonnegative_int (5u); push_integer_quotient (top_estack, j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes a tagged integer 1 */ Not for Distribution Beta Version January 26, 2001...
  • Page 833: Push_Integer_Remainder

    (3u); j = top_estack; push_quantum_as_nonnegative_int (5u); push_integer_remainder (top_estack, j); TI-89 / TI-92 Plus Developer Guide 0, m = n † intDiv (m, n) + remain (m, n). /* Pushes a tagged integer 2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 834: Push_Left

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_mid, push_right, push_rotate, push_shift TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 835 (m, n); pushes the left side of the expression which is x onto the estack such that top_estack points to the bolded tag as follows. X_VAR_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 836: Push_Lim

    (is_undefined (top_estack)) top_estack = k; else delete_between (old_top, k); } /* end push_subst_or_lim */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math — Indexes the top tag of an internally-simplified algebraic expression, algebraic comparison, or aggregate thereof.
  • Page 837: Push_Ln

    None See Also: push_log10, push_exp Example: push_quantum (8u); /* Push variable x */ push_quantum (EXP_TAG); push_ln (top_estack); /* Pushes a copy of the variable x. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 838: Push_Log10

    TI-89 / TI-92 Plus Differences: None See Also: push_ln, push_exp Example: push_Float (100.0); push_log10 (top_estack); /* Pushes a tagged float 2.0 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 839: Push_Make_Proper

    (numerator, Integer1Index); replace_top2_with_ratio (numerator); if (is_term_improper (top_estack)) push_make_proper (top_estack); TI-89 / TI-92 Plus Developer Guide /* Push x + 1 */ /* top_estack -> x/(x + 1) */ /* Pushes 1 – 1/(x + 1) */ Not for Distribution...
  • Page 840: Push_Max

    (); i = top_estack; /* i -> -x^2 */ push_quantum (8u); push_max (i, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Push variable x */ /* Pushes x=0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 841: Push_Max1

    None See Also: push_min1, push_min2, push_min, push_max2, push_max Example: push_quantum (END_TAG); push_Float (3.2); push_Float (5.7); push_quantum (LIST_TAG); push_max1 (top_estack); /* Pushes a tagged float 5.7 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 842: Push_Max2

    Example: push_Float (3.2); j = top_estack; push_Float (5.7); push_max2 (top_estack, j); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes a tagged float 5.7 */ Not for Distribution Beta Version January 26, 2001...
  • Page 843: Push_Mid

    May cause estack expansion, heap compression, or throw errors if arguments are invalid. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_left, push_right, push_rotate, push_shift TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 844 (m, n, p); pushes the string “ell” onto the estack such that top_estack points to the bolded tag as follows. 0 e l l 0 STR_DATA_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 845: Push_Min

    (8u); replace_top2_with_pow (exponent); i = top_estack; /* top_estack -> x^2 */ push_quantum (8u); push_min (i, top_estack); TI-89 / TI-92 Plus Developer Guide /* Push variable x */ /* Pushes x=0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 846: Push_Min1

    Example: push_quantum (END_TAG); push_Float (3.2); push_Float (5.7); push_quantum (LIST_TAG); push_min1 (top_estack); /* Pushes a tagged float 3.2 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 847: Push_Min2

    See Also: push_min1, push_max2, push_min, push_max1, push_max Example: push_quantum (END_TAB); push_Float (3.2); j = top_estack; push_Float (5.7); push_min2 (top_estack, j); TI-89 / TI-92 Plus Developer Guide /* Pushes a tagged float 3.2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 848: Push_Mod

    Example: push_quantum_as_nonnegative_int (3u); j = top_estack; push_negate_quantum_as_negint (5u); push_mod (top_estack, j); /* Pushes a tagged integer 2 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 849: Push_Next_Arb_Int

    Availability: TI-89 / TI-92 Plus Differences: None See Also: push_next_arb_real Example: push_next_arb_int(); /* Pushes an ARB_INT_TAG on top of a quantum whose value is history-dependent. */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 850: Push_Next_Arb_Real

    None See Also: push_next_arb_int Example: push_next_arb_real(); /* Pushes an ARB_REAL_TAG on top of a quantum whose value is history-dependent. */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 851: Push_Nint

    = top_estack; push0(); j = top_estack; push_quantum (8u); /* Push integration variable and integrand x */ push_nint (top_estack, top_estack, j, k); TI-89 / TI-92 Plus Developer Guide /* Pushes 0.5 */ Not for Distribution Beta Version January 26, 2001...
  • Page 852: Push_Nth_Derivative

    = top_estack; push_quantum (8u); /* Push variable x */ push_nth_derivative (i, top_estack, n); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes 3 * x^2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 853: Push_Perm

    TI-89 / TI-92 Plus None Differences: See Also: None Example: push_quantum_as_nonnegative_int (4u); i = top_estack; push_quantum_as_nonnegative_int (2u); push_perm (i, top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes a tagged integer 12 */ Not for Distribution Beta Version January 26, 2001...
  • Page 854: Push_Phase

    None See Also: None Example: push0 (); real_part = top_estack; push1 (); replace_top2_with_imre (real_part); push_phase (top_estack); /* Pushes pi/2 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 855: Push_Poly_Qr

    /* j -> x + 1 */ push_quantum (8u); gv = top_estack; /* gv -> variable x */ push_poly_qr (i, j, gv, PUSH_BOTH); TI-89 / TI-92 Plus Developer Guide generalized to allow non-negative fractional exponents. kernel. PUSH_BOTH. /* top_estack -> x^2 */...
  • Page 856: Push_R_Cis

    (2u); t = top_estack; /* t -> pi/2 */ push1 (); push_r_cis (top_estack, t); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math r sin( t ) onto the estack, with t expressions. Not for Distribution...
  • Page 857: Push_Rand

    (i = 1; i <= 10; i++) push_rand( esi ); /* index END_TAG (so get numbers in range 0 . . . 1) */ push_quantum( LIST_TAG ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 858: Push_Radians

    If the current angle setting is DEGREES and i indexes /2, then push_radians (i); pushes the value 90 which is the equivalent number of degrees onto the estack. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution...
  • Page 859: Push_Randpoly

    This example pushes a fourth order polynomial in “z” on the estack. BYTE zName = ENCODE_LETTER('z'); push_ushort_to_integer( 4 ); push_randpoly( zName, top_estack ); TI-89 / TI-92 Plus Developer Guide — Indexes the name of the independent variable to use in the output polynomial. /* single letter variables are stored specially */...
  • Page 860: Push_Re

    Example: push_Float (2.3); real_part = top_estack; push_Float (3.5); replace_top2_with_imre (real_part); push_re (top_estack); /* Pushes tagged float 2.3 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 861: Push_Rec_To_Angle

    Availability: On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_atan, push_phase Example: push_quantum_as_nonnegative_int (11u); push_rec_to_angle (top_estack, top_estack); TI-89 / TI-92 Plus Developer Guide /* Pushes pi/4 */ Not for Distribution Beta Version January 26, 2001...
  • Page 862: Push_Right

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_left, push_mid, push_rotate, push_shift TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 863 3 onto the estack such that top_estack points to the bolded tag as follows. 3 1 NONNEGATIVE_INTEGER_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 864: Push_Rotate

    Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_left, push_mid, push_right, push_shift TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 865 “llohe“ onto the estack such that top_estack points to the bolded tag as follows. 0 l l o h e 0 STR_DATA_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 866: Push_Round

    #define Integer4Index ((EStackIndex) (Integer4+2)) push_unitv( colVecIndex ); push_round( top_estack, Integer4Index ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math — Indexes the input number, list, or matrix. round to or if NULL then uses the default value from the MODE settings.
  • Page 867: Push_Sequence

    May expand the estack, cause heap compression, or throw a variety of evaluation errors depending upon the generator expression Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: None TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 868 {1, 4, 9, 16} onto the estack such that top_estack points to the bolded tag as follows. END_TAG 16 1 NONNEGATIVE_INTEGER_TAG 9 1 NONNEGATIVE_INTEGER_TAG 4 1 NONNEGATIVE_INTEGER_TAG 1 1 NONNEGATIVE_INTEGER_TAG LIST_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 869: Push_Shift

    May expand the estack, cause heap compression, or throw errors if arguments are invalid. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_left, push_mid, push_right, push_rotate TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 870 “lo ” onto the estack such that top_estack points to the bolded tag as follows. 0 l o ï ï ï 0 STR_DATA_TAG TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 871: Push_Simult

    TI-89 / TI-92 Plus Differences: None See Also: None TI-89 / TI-92 Plus Developer Guide — If not NULL then indexes a tolerance factor. Any matrix element is treated as zero if its absolute value is less than the tolerance. (continued)
  • Page 872 (i = order-1; i >= 0; i--) { push_quantum (END_TAG); push_Float (B[i]); push_quantum (LIST_TAG); push_quantum (LIST_TAG); /* Solve */ push_simult (mat_idx, top_estack, NULL_INDEX); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 873: Push_Sin

    TI-89 / TI-92 Plus Differences: None See Also: push_sin2, push_cos, push_tan, push_trig Example: push_pi_on_quantum (6u); /* Push pi/6 */ push_sin (top_estack); /* Pushes fraction 1/2 */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 874: Push_Sin2

    Example: push_quantum_as_nonnegative_int (0u); i = top_estack; push_reciprocal_of_quantum (3u); push_sin2 (i, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* Pushes fraction 1/2 */ Not for Distribution Beta Version January 26, 2001...
  • Page 875: Push_Sinh

    Differences: See Also: push_cosh, push_tanh, push_acosh, push_asinh, push_atanh, push_exp Example: push_quantum_as_nonnegative_int(0u); push_sinh (top_estack); /* Pushes a tagged integer 0 */ TI-89 / TI-92 Plus Developer Guide /* Push tagged integer 0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 876: Push_Sqrt

    (); i = top_estack; push_sqrt (i); delete_between (old_top, i); i = top_estack; push_def_int (i, vi, j, k); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 877: Push_Square

    /* Pushes onto the estack b^2 - 4 a c. */ Access_AMS_Global_Variables; EStackIndex old_top = top_estack; push_negate_quantum_as_negint (4u); times_top (a); times_top (c); a = top_estack; push_square (b); replace_top2_with_sum (a); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 878: Push_Standardize

    /* x^2 */ push_quantum (8u); /* Push variable x */ replace_top2_with_sum (power); push_standardize (top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math /* top_estack -> x^2 + x */ /* Pushes (x + 1)*x */ Not for Distribution...
  • Page 879: Push_Summation

    /* k -> variable y */ push_quantum_as_nonnegative_int (1u); j = top_estack; /* j -> 1 */ push_quantum (8u); /* top_estack -> variable x */ push_summation (top_estack, top_estack, j, k); TI-89 / TI-92 Plus Developer Guide Not for Distribution j and Beta Version January 26, 2001...
  • Page 880: Push_Tan

    See Also: push_sin2, push_cos, push_sin, push_trig Example: push_pi_on_quantum (4u); /* Push pi/4 */ push_tan (top_estack); /* Pushes tagged integer 1 */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 881: Push_Tanh

    On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: push_sinh, push_cosh Example: push_quantum (PLUS_INFINITY_TAG); push_tanh (top_estack); /* Pushes tagged integer 1 */ TI-89 / TI-92 Plus Developer Guide /* Push + Not for Distribution Beta Version January 26, 2001...
  • Page 882: Push_Trig

    /* Depending on the arithmetic mode: Pushes tagged 0.5 if IS_DEGREES; Otherwise pushes –3.0481062110209 or symbolic sin(60). push_Float (60.0); push_trig (push_sin, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math mode trig pusher subroutine of one EStackIndex argument. expression, algebraic comparison or aggregate thereof, with angles measured according to IS_DEGREES versus IS_RADIANS.
  • Page 883: Raise_To_Top

    Example: void push_increment_degree (EStackIndex power, EStackIndex inc) /* Pushes onto the estack factor_base (power) ^ (inc + factor_deg(power)) */ push_sum (inc, factor_exponent_index (power)); raise_to_top (factor_base_index (power)); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 884: Replace_Top2_With_Pow

    (); i = top_estack; push_sqrt (i); delete_between (old_top, i); i = top_estack; push_def_int (i, vi, j, k); delete_between (old_top, i); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Math Not for Distribution Beta Version January 26, 2001...
  • Page 885: Memory Management

    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...
  • Page 886 Appendix A: System Routines — Memory Management See Also: memucmp ... 978. See Utilities OO_Deref... 310. See Apps TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 887: Heapalloc

    Hlen may not exceed 65520 bytes and the minimum block size is eight bytes. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAllocThrow, HeapDeref, HeapFree, HeapLock, HeapRealloc,...
  • Page 888: Heapallochigh

    HeapAlloc routine. Locking memory may cause the system to run out of useable memory sooner than if memory is kept unlocked. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 889: Heapallochighthrow

    Locking memory may cause the system to run out of useable memory sooner than if memory is kept unlocked. This routine may throw an ER_MEMORY error. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 890: Heapallocthrow

    Hlen may not exceed 65520 bytes and the minimum block size is eight bytes. Side Effects: May cause heap compression. This routine may throw an ER_MEMORY error. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: HeapAlloc, HeapFree, HeapFreeIndir Example: HANDLE hBlock1=0, hBlock2=0;...
  • Page 891: Heapavail

    Inputs: None Outputs: The total number of bytes available in the heap. Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocThrow, HeapMax, HeapCompress Example: static void AP_app(pFrame self, PEvent e) { switch (e->command) {...
  • Page 892: Heapcompress

    Assumptions: None Side Effects: This routine is called automatically by the system whenever it is needed and normally should not be called by applications. All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 893: Heapderef

    Pointer to the block of memory defined by the given handle. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocHigh, HeapAllocThrow, HeapAllocHighThrow, HeapLock, HeapUnlock, HeapFree, HeapFreeIndir Example: See HeapAlloc.
  • Page 894: Heapfree

    — Handle created with a heap allocation routine like HeapAlloc Outputs: None Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocHigh, HeapAllocThrow, HeapAllocHighThrow, HeapFreeIndir Example: See HeapAlloc.
  • Page 895: Heapfreeindir

    PtrHandle — A pointer to a handle created with a heap allocation routine Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocHigh, HeapAllocThrow, HeapAllocHighThrow, HeapFree Example: See HeapAllocThrow.
  • Page 896: Heapgetlock

    Outputs: memory is free to move on the next heap compression. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapLock, HeapUnlock Example: TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 897: Heaplock

    Side Effects: Locking memory may cause the system to run out of useable memory sooner than if memory is kept unlocked. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also:...
  • Page 898: Heapmax

    (like HeapAlloc, HeapAllocThrow, . . . ). This will be in the range 0 . . . 65520. Assumptions: None Side Effects: Compresses the heap. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocThrow, HeapAvail, HeapCompress Example: if (HeapMax() <...
  • Page 899: Heapmovehigh

    H_NULL is returned (the block is still in the same place as before, so no memory is lost). Assumptions: None Side Effects: Will cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocThrow Example: HANDLE hBlock;...
  • Page 900: Heapptrtohandle

    Side Effects: This routine searches the entire handle table and so should be used accordingly. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 901: Heaprealloc

    Return handle if successful or H_NULL if not enough memory or invalid NewHsize . Assumptions: None Side Effects: May cause heap compression. All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocThrow, HeapFree Example: HANDLE hBlock;...
  • Page 902: Heapshuffle

    = HeapDeref( hBlock1 ); sprintf( buf, "Pointer before/after shuffle: %08lX, %08lX", bPtr1, bPtr2 ); DlgNotice( "HeapShuffle", buf ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Memory Management Not for Distribution Beta Version January 26, 2001...
  • Page 903: Heapsize

    Inputs: Outputs: Size of block of heap memory for handle . Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapAlloc, HeapAllocThrow, HeapRealloc Example: HANDLE h1, h2;...
  • Page 904: Heapunlock

    Outputs: None Assumptions: Memory allocated with HeapAlloc and HeapAllocThrow is unlocked to begin with. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: HeapLock, HeapGetLock Example: See HeapLock. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 905: Heapwalk

    The HeapWalk routine uses LIO_SendData to send the output to the link cable. You can connect the TI-89 or TI-92 Plus through the gray-link cable to a program like HyperTerminal to view the output.
  • Page 906 0080 main\pic4 0000 main\str1 0000 main\var1 0000 main\xxx 0000 FOLDER: zfolder1 0080 zfolder1\f1 0000 TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Memory Management Max FreeBlock:172086 Used:58 (0 Locked) Not for Distribution Beta Version January 26, 2001...
  • Page 907: Hlock

    Side Effects: Locking memory may cause the system to run out of useable memory sooner than if memory is kept unlocked. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 908: Memcpy

    Outputs: dest is returned. Assumptions: The source and destination regions must not overlap. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: strncpy, memmove Example: See strlen, MakeWinRect, and CalcBitmapSize.
  • Page 909: Memmove

    — Size of move in bytes. dest is returned. Outputs: None Assumptions: Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: strncpy, memcpy Example: char serno[11]; /* Assuming serno contains a 10 digit serial number, split it into two 5-digit groups.
  • Page 910: Memset

    — Number of bytes to store. Outputs: dest is returned. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: memcpy Example: This example zeros out a FILES structure.
  • Page 911: Menus

    MenuOn ... 891 MenuPopup... 892 MenuSubStat ... 893 MenuTopRedef ... 894 MenuTopSelect... 897 MenuTopStat ... 898 PopupAddText ... 899 PopupBegin ... 900 PopupBeginDo... 902 PopupClear ... 903 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 912 Appendix A: System Routines — Menus PopupDo ... 904 PopupNew ... 905 PopupText... 906 QMenuTopSelect ... 907 See Also: VarCreateFolderPopup ... 1043. See Symbol Table Utilities TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 913: Dynmenuadd

    Note that if there is an error adding the new entry, the MF_ERROR bit in MenuFlags( hMenu ) is set. TI-89 / TI-92 Plus Developer Guide — Handle to a dynamic menu created with MenuNew or MenuLoad.
  • Page 914 (!(hDrawMenu = MenuBegin( HLock(hNewMenu), -1, 0, TRUE ))) HeapFree( hNewMenu ); ER_throw(ER_MEMORY); key = MenuKey( hDrawMenu, KB_F1 ); MenuEnd( hDrawmenu ); HeapFree( hNewMenu ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus Not for Distribution Beta Version January 26, 2001...
  • Page 915: Dynmenuchange

    See Also: MenuNew, MenuLoad, DynMenuAdd Example: See PopupBegin. TI-89 / TI-92 Plus Developer Guide — Handle to a dynamic menu created with MenuNew or MenuLoad. — ID of entry to change. — One of the following flags must be set: DMF_TEXT —...
  • Page 916: Fkeyi_H

    (M_NOTMENUKEY == FKeyI_H(hMenuDraw, key)) Disp("Key not on this menu"); else menuSelect = MenuKey( hMenuDraw, key ); MenuEnd( hMenuDraw ); return menuSelect; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus Not for Distribution Beta Version January 26, 2001...
  • Page 917: Menuaddicon

    Note that if there is not enough memory to add the new entry, the MF_ERROR bit in MenuFlags( hMenu ) is set. Assumptions: None Side Effects: May compress the heap. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuNew, MenuLoad, DynMenuAdd, DynMenuChange Example: See MenuAddText.
  • Page 918: Menuaddtext

    H_NULL if out of memory or error in parameters. Assumptions: None Side Effects: May compress the heap. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuNew, MenuLoad, DynMenuAdd, DynMenuChange TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines —...
  • Page 919 (!(hDrawMenu = MenuBegin(NULL, -1, 0, MBF_HMENU, hNewMenu ))) HeapFree( hNewMenu ); ER_throw(ER_MEMORY); key = MenuKey( hDrawMenu, KB_F1 ); MenuEnd( hDrawmenu ); /* will also free hNewMenu since we set MBF_HMENU */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 920: Menubegin

    — Screen coordinates of the upper left corner of the menu. If x0 Flags — MBF_REDEF TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus compiler or a dynamic menu). is equal to L1 then the menu is centered horizontally, if y0 is equal to L1 then the menu is centered vertically on the screen.
  • Page 921 H_NULL is returned if there is not enough memory to create the new structure. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: Max menu width Top level font Sub level font See Also:...
  • Page 922: Menucheck

    For MC_STATUS return the current status of the checkmark. For the other Cmd s return TRUE if MenuId found, FALSE if not. Assumptions: MenuHandle was created by MenuBegin. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin Example: See MenuTopStat.
  • Page 923: Menuend

    MenuHandle — Handle returned from MenuBegin. Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: MenuBegin, MenuKey Example: See MenuBegin. TI-89 / TI-92 Plus Developer Guide...
  • Page 924: Menuflags

    None Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, MenuKey Example: See MenuAddText. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus Not for Distribution Beta Version January 26, 2001...
  • Page 925: Menugettopredef

    MenuBegin. Redefinable menus may only be created with the resource compiler. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, MenuTopRedef, MenuTopSelect Example: See MenuTopRedef for an example and further details.
  • Page 926: Menuitemdef

    /* vPtr points to item selected */ /* type will be DMF_TEXT, DMF_ICON or DMF_BITMAP depending on the type of the menu item */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus Not for Distribution Beta Version January 26, 2001...
  • Page 927: Menukey

    1 . . . 0xFFF M_NOTMENUKEY — Key is not in range for this menu. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin Example: See MenuBegin.
  • Page 928: Menuload

    MenuBegin, MenuNew, DynMenuAdd, DynMenuChange Especially see MenuNew for restrictions on creating and using dynamic menus. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus resource compiler. — The number of bytes in the MENU (the resource compiler always defines a label with the base name of the MENU and “_end”...
  • Page 929 HeapFree( hMenu ); APPR.R: #include "tiams.h" TOOLBOX AddToMenu, RC_NO_IDS, 0, 0 { "TOP 1", 10 { "SUB 1", 11 "SUB 2", 12 "TOP 2", 20 { TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 930: Menunew

    AND the handle returned from MenuNew. Do not forget that once you call MenuBegin you may not unlock the handle returned from MenuNew or call DynMenuAdd or DynMenuChange! TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus (continued) Not for Distribution...
  • Page 931 Appendix A: System Routines — Menus MenuNew (continued) Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, MenuKey, MenuLoad, DynMenuAdd, DynMenuChange Example: void MenuTestA( void ) HANDLE hDynMenu, hMenuDraw;...
  • Page 932: Menuoff

    (mode == DISABLE_MENU) { MenuOff( hMenuHandle ); MenuOn( hMenuHandle); /* turn menu back on in case it was off */ TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus /* Disable entire menu */ Not for Distribution...
  • Page 933: Menuon

    MenuTopStat remain disabled and therefore shaded. MenuHandle — Handle returned from MenuBegin. Inputs: Outputs: None Assumptions: None Side Effects: None All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, MenuOff, MenuTopStat Example: See MenuTopStat.
  • Page 934: Menupopup

    Assumptions: MenuPopup is only used for static POPUPs created by the resource compiler. May cause heap compression. Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: PopupDo (dynamic popups) Example: #include "mpopup.h"...
  • Page 935: Menusubstat

    Index Status Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuTopStat (for top-level menu items) Example: See MenuTopStat. TI-89 / TI-92 Plus Developer Guide —...
  • Page 936: Menutopredef

    MenuTopRedef. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 937 } while (1); // app.h #define MID_TOOLS #define MID_CURSORS #define MID_EXIT #define MID_ERASER #define MID_PENCIL #define MID_RBBOX #define MID_GRAPH #define MID_ALPHA // appr.r #include "app.h" #include "tiams.h" TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 938 0x0100, 0x0100, 0x0100, 0x0100, 0x0000, 0x0000], ICON_GRAPH [0x0000, 0x0000, 0x0180, 0x0180, 0x03C0, 0x03C0, 0x0660, 0x0660, 0x0C30, 0x0FF0, 0x1FF8, 0x1818, 0x380C, 0x700C, 0xF81E, 0x0000], ICON_ALPHA TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus Not for Distribution Beta Version January 26, 2001...
  • Page 939: Menutopselect

    Assumptions: MenuHandle refers to a menu-draw handle returned from MenuBegin. MenuTopSelect is normally used with redefinable menus. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, QMenuTopSelect Example: See MenuTopRedef for an example of using redefinable menus and MenuTopSelect.
  • Page 940: Menutopstat

    MenuOn is called after MenuTopStat (there could have been several MenuTopStat calls) and before MenuKey. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MenuSubStat (for sublevel items) Example: HANDLE hMenu;...
  • Page 941: Popupaddtext

    Assumptions: DynMenuAdd is more general purpose and should generally be used instead of PopupAddText. Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: DynMenuAdd, DynMenuChange, PopupNew Example: See PopupDo.
  • Page 942: Popupbegin

    On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: PopupNew, PopupBeginDo, MenuSubStat, MenuCheck, MenuEnd TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus — HANDLE created by PopupNew. — None currently used. (continued) Not for Distribution...
  • Page 943 PopupCheck( pbH, 2, MC_CHECK ); /* PopupCheck is same as MenuCheck */ PopupCheck( pbH, 5, MC_FLIP ); v = PopupBeginDo( pbH, -1, -1, 0 ); MenuEnd( pbH ); /* will also free pnH */ TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 944: Popupbegindo

    See Also: PopupBegin, MenuEnd Example: See PopupBegin. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Menus — HANDLE returned from PopupBegin. — Screen coordinates of the upper left corner of the menu. If x0 is equal to L1 then the pop-up is centered horizontally, if y0 is equal to L1 then the pop-up is centered vertically.
  • Page 945: Popupclear

    The memory allocated to the pH HANDLE is not released until the next call Assumptions: to DynMenuAdd (or PopupAddText). Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: PopupNew, DynMenuAdd, DynMenuChange Example: /* In the VarOpen dialog box, when the user selects a new folder the "drop-down"...
  • Page 946: Popupdo

    1 . . . 0xFFF Do NOT pass handles from PopupBegin! Assumptions: Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: PopupNew, MenuPopup (static POPUPs) Example: volatile HANDLE h = NULL;...
  • Page 947: Popupnew

    HANDLE to empty POPUP structure or H_NULL if not enough memory. Assumptions: None Side Effects: May cause heap compression. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: PopupDo, PopupBegin, PopupClear, DynMenuAdd, DynMenuChange...
  • Page 948: Popuptext

    Pointer to text (or icon or bitmap). Assumptions: Only works for dynamically created popups. For menus, use MenuItemDef. None Side Effects: All versions of the TI-89 / TI-92 Plus. Availability: TI-89 / TI-92 Plus Differences: None See Also: PopupNew, PopupDo, PopupAddText...
  • Page 949: Qmenutopselect

    TI-89 / TI-92 Plus Differences: None See Also: MenuBegin, MenuTopSelect Example: See MenuTopRedef for an example of using MenuTopSelect. Note that QMenuTopSelect just returns the value set by MenuTopSelect. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 950 Appendix A: System Routines — Menus TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 951: Mode Screen Settings

    Appendix A: System Routines — Mode Screen Settings MO_currentOptions... 911 MO_digestOptions ... 912 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 952 Appendix A: System Routines — Mode Screen Settings TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 953: Mo_Currentoptions

    MO_option is a system global array, but it only reflects current mode settings immediately after MO_currentOptions has been called. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: MO_digestOptions, MO_option Example: Access_AMS_Global_Variables;...
  • Page 954: Mo_Digestoptions

    This routine sends a CM_MODE_CHANGE message to each app, which may in turn cause heap compression, window repaints, and other side effects known only to the apps. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None...
  • Page 955: Operating System

    EV_setCmdState ... 924 EV_setFKeyState... 925 EV_startApp... 926 EV_suspendPainting... 927 EV_switch ... 928 EX_getBasecodeParmBlock... 929 FL_getHardwareParmBlock... 930 handleRclKey... 932 handleVarLinkKey... 933 LOC_formatDate... 934 LOC_getLocalDateFormat ... 935 LOC_localVersionDate ... 936 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 956 HomeAlone ...621. See Home Screen idle ... 629. See Interrupts off ... 631. See Interrupts OO_InstallSystemHook... 320. See Apps OO_UninstallSystemHook ... 629. See Apps QModeKey ... 652. See Keyboard TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 957: Ev_Captureevents

    Outputs: Returns pointer to previously captured event handler. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Not applicable. Example: MyDialog opens a window and captures events. All subsequent events are sent to myEventHandler.
  • Page 958 KB_TABLE: case KB_OFF: cancel(); EV_defaultHandler(e); break; TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Operating System (continued) /* I will repaint this window myself */ /* no task owns this window */ /* cancel dialog */...
  • Page 959 EV_defaultHandler(e); break; static void cancel(void) WinEndPaint(&myWindow); WinClose(&myWindow); EV_captureEvents(oldEventHandler); EV_restorePainting(oldPaintState); TI-89 / TI-92 Plus Developer Guide (continued) /* allow default handling */ /* close my window */ /* re-establish previous event handler */ Not for Distribution Beta Version January 26, 2001...
  • Page 960: Ev_Defaulthandler

    There can be any number of side effects depending on which event was forwarded to EV_defaultHandler. See section 9.9. Default Event Handler for default actions taken by each event type. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: Not applicable.
  • Page 961 . /* start application */ break; case CM_KEY_PRESS: . /* a key was pressed */ break; case CM_WPAINT: . /* repaint window */ break; default: EV_defaultHandler(event); break; TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 962: Ev_Getc

    This routine will automatically power down the calculator if a key has not been pressed after a few minutes. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Not applicable.
  • Page 963: Ev_Restorepainting

    Returns the state of paint messages before EV_restorePainting was called. Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: See Also: EV_suspendPainting Example: See EV_captureEvents. TI-89 / TI-92 Plus Developer Guide...
  • Page 964: Ev_Sendevent

    Apps can use this routine to send or forward OS events to other apps. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Not applicable...
  • Page 965: Ev_Setcmdcheck

    OO_APP_DEFAULT_MENU_HANDLE. See section 9.6. Menu Processing for guidelines on setting up a menu where default event handling can find it. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: EV_setCmdState, EV_setFKeyState Example: EV_setCmdCheck(currentFontSize, MC_UNCHECK);...
  • Page 966: Ev_Setcmdstate

    Processing for guidelines on setting up a menu where default event handling can find it. None Side Effects: Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: EV_setCmdCheck, EV_setFKeyState, section 9.6. Menu Processing Example: EV_setCmdState(CM_SAVE_AS, FALSE);...
  • Page 967: Ev_Setfkeystate

    Processing for guidelines on setting up a menu where default event handling can find it. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: EV_setCmdCheck, EV_setCmdState, section 9.6. Menu Processing Example: USHORT f;...
  • Page 968: Ev_Startapp

    Under normal circumstances, you should start another app with AP_START_CURRENT. Side Effects: Your application will be deactivated and may be terminated to start the other app. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus None Differences: See Also: EV_quit Example: EV_startApp(otherApp, AP_START_CURRENT);...
  • Page 969: Ev_Suspendpainting

    Save the returned state of paint messages from this call, and use the saved state to restore painting later with a call to EV_restorePainting. Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also:...
  • Page 970: Ev_Switch

    Your application will be deactivated and may be terminated to start the other app. Availability: All versions of the TI-89 / TI-92 Plus. Versions prior to AMS 2.00 only switch between split-screen apps. The ability to switch to the previous app was introduced in AMS 2.00.
  • Page 971: Ex_Getbasecodeparmblock

    None See Also: Not applicable. Example: BASECODE_PARM_BLOCK const *bpb = EX_getBasecodeParmBlock(); TI-89 / TI-92 Plus Developer Guide /* length of parameter block */ /* 1-byte major, 1-byte minor */ /* 2-byte yr, 1-byte mo, 1-byte day * Not for Distribution...
  • Page 972: Fl_Gethardwareparmblock

    LCDBitsTall; } HARDWARE_PARM_BLOCK; The TI-89 / TI-92 Plus allocate the same amount of memory for the LCD. However, the TI-89 cannot display as much as the TI-92 Plus. LCDBitsWide and LCDBitsTall reflect how much of LCD memory the calculator user can see.
  • Page 973 /* Yes, use hpb values */ LCDHeight = hpb->LCDBitsTall; LCDWidth = hpb->LCDBitsWide; else /* No, assume the smallest display */ LCDHeight = 100; LCDWidth = 160; TI-89 / TI-92 Plus Developer Guide (continued) Not for Distribution Beta Version January 26, 2001...
  • Page 974: Handlerclkey

    Nothing is pasted if the user pressed N to cancel the 2 £ dialog. Side Effects: May cause heap compression. May throw errors. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: Not applicable.
  • Page 975: Handlevarlinkkey

    None See Also: SmapTypeStrings Example: See SymAdd. TI-89 / TI-92 Plus Developer Guide SDT_DATA, SDT_EXPR, SDT_FIG, SDT_FUNC, SDT_GDB, SDT_LIST, SDT_MAC, SDT_MAT, SDT_MAT, SDT_OTH, SDT_PIC, SDT_PRGM, SDT_STR, SDT_TEXT. Use SDT_ALL if all variables of all types are to be displayed. May be OR’d with XF_VARLINK_SELECT_ONLY to not allow any variables to be changed (deleted, copied, renamed, .
  • Page 976: Loc_Formatdate

    LOC_formatDate("YYYY.MM.DD", y, m, d, formattedDate); /* 2000.06.09 LOC_formatDate("D-M-YY", y, m, d, formattedDate); LOC_formatDate("MM/YYYY", y, m, d, formattedDate); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Operating System — One- or two-digit day of month. — Two-digit day of month (leading zero if necessary).
  • Page 977: Loc_Getlocaldateformat

    Example: char formattedDate[16]; int y = 2000, m = 6, d = 9; /* Format date according to local language */ LOC_formatDate(LOC_getLocalDateFormat(), y, m, d, formattedDate); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 978: Loc_Localversiondate

    See Also: LOC_formatDate, LOC_getLocalDateFormat Example: char formattedDate[16]; /* Format OS release date according to local language */ LOC_localVersionDate(formattedDate); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Operating System zero byte. Not for Distribution Beta Version January 26, 2001...
  • Page 979: Program I/O Screen

    Appendix A: System Routines — Program I/O Screen cmd_clrio... 939 cmd_disp... 940 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 980 Appendix A: System Routines — Program I/O Screen TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 981: Cmd_Clrio

    Declaration: void cmd_clrio (void) Category(ies): Program I/O Screen Description: Clear program I/O window and set program I/O window cursor position to upper left corner. This routine implements the TI-BASIC ClrIO command. Inputs: None Outputs: None Assumptions: None None Side Effects: Availability: On AMS 1.05 and higher.
  • Page 982: Cmd_Disp

    END_TAG is encountered. The pretty print mode setting determines how the expressions are formatted for display. This routine implements the TI-BASIC Disp command. Inputs: — estack index of first expression to display.
  • Page 983: Solver

    Appendix A: System Routines — Solver push_csolve ... 943 push_czeros... 944 push_nSolve ... 945 push_solve... 946 push_zeros ... 947 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 984 Appendix A: System Routines — Solver TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 985: Push_Csolve

    /* equation -> x^2 = -1 */ push_quantum (8u); /* push variable x */ push_csolve (equation, top_estack); TI-89 / TI-92 Plus Developer Guide /* top_estack -> x^2 */ /* top_estack -> x=i or x=-i */ Not for Distribution Beta Version January 26, 2001...
  • Page 986: Push_Czeros

    /* top_estack -> x^2 + 1 */ push_quantum (8u); /* push variable x */ push_czeros (expression, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Solver /* top_estack -> x^2 */ /* top_estack -> { i , - i } */...
  • Page 987: Push_Nsolve

    = top_estack; /* x^2 = 4 */ push_quantum (8u); /* Push variable x */ push_nSolve (equation, top_estack); TI-89 / TI-92 Plus Developer Guide /* top_estack = x^2 */ /* Pushes 2.0 */ Not for Distribution Beta Version January 26, 2001...
  • Page 988: Push_Solve

    /* equation -> x^2 = 4 */ push_quantum (8u); /* Push variable x */ push_solve (equation, top_estack); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Solver /* top_estack -> x^2 */ /* Pushes x = -2 or x = 2 */...
  • Page 989: Push_Zeros

    () i = top_estack; push_quantum (8u); /* Push variable x */ push_zeros(i, top_estack); TI-89 / TI-92 Plus Developer Guide /* top_estack -> x^2 */ /* x^2 - 1 */ /* Pushes {-1, 1} */ Not for Distribution Beta Version January 26, 2001...
  • Page 990 Appendix A: System Routines — Solver TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 991: Statistics

    ... 951 push_randnorm... 952 QstatRcl ... 953 statEnd... 954 statFree... 955 statStart... 956 See Also: push_stddev...715. See Lists and Matrices push_variance...722. See Lists and Matrices TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 992 Appendix A: System Routines — Statistics TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 993: Cmd_Showstat

    Note that RM_Type is only available on 2.04 and higher. TI-89 / TI-92 Plus Differences: None See Also: statStart, RM_Type Example: See statStart for an example that creates and displays statistic variables. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 994: Push_Randnorm

    END_TAG ); for (i = 0; i <= 9; i++) push_randnorm( mean_idx, std_idx ); push_quantum( LIST_TAG ); TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Statistics — Indexes the input standard deviation. Not for Distribution Beta Version January 26, 2001...
  • Page 995: Qstatrcl

    None See Also: VarRecall, statStart Example: The TI-BASIC ShowStat command first checks to make sure there are any stat variables to display. If not, it gives an error and returns as shown in the example below. if (!QstatRcl()) { DlgNotice(XR_stringPtr(XR_SHOWSTAT),XR_stringPtr(XR_rNostatvar));...
  • Page 996: Statend

    On AMS 2.00 and higher. TI-89 / TI-92 Plus None Differences: See Also: statFree, statStart, QstatRcl, VarStore Example: See statStart. TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Statistics Not for Distribution Beta Version January 26, 2001...
  • Page 997: Statfree

    May set the graph dirty thus forcing a regraph when the grapher is activated. On AMS 2.00 and higher. Availability: TI-89 / TI-92 Plus Differences: None See Also: statEnd, statStart, QstatRcl, VarStore Example: See statStart. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 998: Statstart

    Differences: None See Also: statEnd, statFree, QstatRcl, VarStore, RM_Type TI-89 / TI-92 Plus Developer Guide Appendix A: System Routines — Statistics // all stat vars initialized to invalid floats // set to stat calculation type to follow // do calculations...
  • Page 999 ONERR statEnd(); /* signal we are not writing to stat vars */ PASS; /* pass error on up to previous error handler */ ENDTRY cmd_showstat(); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...
  • Page 1000 Appendix A: System Routines — Statistics TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001...

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents