Texas Instruments TI89 Developer Guide - Page 116
Verifying the OS Version, 4 Interfacing with TI-BASIC, 2 Working with the Graph Application
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 116 highlights
74 8.5. Chapter 8: Integrating a Flash Application ahead of time which commands it will execute. Commands that will cause a problem are those such as 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. For an example on executing a command with side effects, see section 17.2 Working with the Graph Application. Verifying the OS Version Version 2.04 of the AMS introduced F-Line instructions to call the API. This requires an app to run on Operating System Version 2.04 and later but can reduce every API call from six bytes to two bytes. This is the standard calling mechanism when using the tiams.h include file. Accessing AMS global variables requires the use of the Access_AMS_Global_Variables macro and each AMS global variable reference requires six bytes plus the overhead from the Access_AMS_Global_Variables macro. In order to ensure your app is running in AMS 2.04 and later put a call to the OS_NeedMinimumVersion macro at the top of your app's event handler. It needs to be called before any F-Line instructions (an AMS 2.04 feature) are executed. Its format is: OS_NeedMinimumVersion (frame, major, minor) frame - The name of the variable which contains the address of your application frame. major - Major version number of required OS level. minor - Minor version number of required OS level. For example, if you have a pointer to your app frame named pAppObj: pFrame pAppObj = (pFrame)&appObj; Then at the top of your event handler entry point call: OS_NeedMinimumVersion(pAppObj, 2, 4); This checks for OS release 2.04 or greater. If the OS is an earlier version, a flag is set in the app's ACB disabling the app so it will not appear in the app's menu. This macro returns to the OS without letting the rest of the event handler run. Be aware that some F-Line calls may not be immediately apparent. If an app uses a library or API routine (say a long divide or any API call) in its local variable initialization, an F-Line may be inserted to call the library routine and is always used to call the API. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001