http://learn.cemetech.net/index.php?title=TI-BASIC:Portability&feed=atom&action=historyTI-BASIC:Portability - Revision history2024-03-28T20:58:53ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=TI-BASIC:Portability&diff=1464&oldid=prevMaintenance script: Automated superscript correction2016-02-24T22:24:42Z<p>Automated superscript correction</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:24, 24 February 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l49" >Line 49:</td>
<td colspan="2" class="diff-lineno">Line 49:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''First group:''' This includes the lowercase letters, Greek letters, and international characters. These characters will work with all calculators starting with the TI-83+, but there may be some issues with computer programs such as the TI Program Editor.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''First group:''' This includes the lowercase letters, Greek letters, and international characters. These characters will work with all calculators starting with the TI-83+, but there may be some issues with computer programs such as the TI Program Editor.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Second group:''' The ~ @ # $ & `; \ | _ % characters were introduced only with OS version 1.15 (and will work on all higher versions).</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Second group:''' The ~ @ # $ & `; \ | _ % characters were introduced only with OS version 1.15 (and will work on all higher versions).</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* '''Third group:''' The … ∠ ß <del class="diffchange diffchange-inline">^^</del>x<del class="diffchange diffchange-inline">^^ </del>,,T,, ← → ↑ ↓ x ∫ √ [[File:EFh_LUpBlk.gif]] [[File:F0h_LDnBlk.gif]] [[File:7Fh_LinvEQ.gif]] charactes and subscripts ,,0,, through ,,10,, were introduced only with OS version 1.16 (and will work on all higher versions).</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* '''Third group:''' The … ∠ ß <ins class="diffchange diffchange-inline"><sup></ins>x<ins class="diffchange diffchange-inline"></sup> </ins>,,T,, ← → ↑ ↓ x ∫ √ [[File:EFh_LUpBlk.gif]] [[File:F0h_LDnBlk.gif]] [[File:7Fh_LinvEQ.gif]] charactes and subscripts ,,0,, through ,,10,, were introduced only with OS version 1.16 (and will work on all higher versions).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Calculator Memory & Speed =</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Calculator Memory & Speed =</div></td></tr>
</table>Maintenance scripthttp://learn.cemetech.net/index.php?title=TI-BASIC:Portability&diff=935&oldid=prevMaintenance script: Initial automated import2016-02-24T18:26:09Z<p>Initial automated import</p>
<p><b>New page</b></p><div>{{Template:TI-BASIC:Development<br />
|stage = planning}}<br />
<br />
Portability is the ability to run a program on more than one calculator, with little to no changes made to the program -- you can literally transfer the program to a calculator, and then start using it. This ability is important because all of the TI-83 series calculators are very similar in TI-Basic support and calculator hardware, so people expect when they find a TI-83 series program it will work on their calculator.<br />
<br />
There are five primary things that you need to consider when making a program portable:<br />
<br />
* Making sure not to use assembly programs<br />
* Making sure not to use new commands (see [[TI-BASIC:Compatibility|Compatibility]])<br />
* Making sure not to use undocumented functionality (see [[TI-BASIC:Compatibility|Compatibility]])<br />
* Making sure not to use extra characters<br />
* The calculator's memory and speed<br />
<br />
= Assembly Programs =<br />
<br />
Although assembly programs allow you to make your programs look nice, and to use functionality that isn't normally possible or viable in TI-Basic (such as creating parallax scrolling using [[TI-BASIC:Xlib|XLIB]]), they are not portable because they need to be compiled to work on each calculator.<br />
<br />
This is because assembly programs are programmed in the calculator's own machine language, and use memory addresses that are specific to a particular calculator model. This means, for instance, that a TI-83 assembly library that inverts the graph screen will not work on any of the new TI-83 series calculators.<br />
<br />
The TI-83 also uses a different format to run assembly programs than the other TI-83 series calculators: Send(9prgmNAME). This use of the [[TI-BASIC:Send|Send(]] command does not work on any of the other calculators, and in fact will result in a [[TI-BASIC:Errors#syntax|ERR:SYNTAX]] error. Instead, the rest of the TI-83 series calculators provide three commands -- [[TI-BASIC:Asm_Command|Asm(]], [[TI-BASIC:Asmprgm|AsmPrgm]], and [[TI-BASIC:Asmcomp|AsmComp(]] -- for running and compiling shell-independent assembly programs.<br />
<br />
Two additional commands for running assembly programs have been added to the TI-84+ and TI-84+SE calculators: [[TI-BASIC:Openlib|OpenLib(]] and [[TI-BASIC:Execlib|ExecLib]]. These can be used for running routines from Flash application libraries that have been specifically written for use with them; the only application so far is [*http://usb8x.sourceforge.net/ usb8x], which is used for interfacing with the USB port.<br />
<br />
Apart from use of these last two commands, however, most assembly programs ought to be compatible between the TI-83+/SE and TI-84+/SE<br />
<br />
= New Commands =<br />
<br />
With each release of a TI-83 series calculator, TI has added new commands to the calculator. The TI-83+ calculator introduced [[TI-BASIC:Archive|Archive]], [[TI-BASIC:Unarchive|UnArchive]], and [[TI-BASIC:Garbagecollect|GarbageCollect]], which are designed to work with the Flash memory available on the calculator. This is in addition to the assembly commands that were mentioned earlier.<br />
<br />
The TI-84+ and TI-84+SE calculators introduced several new [[TI-BASIC:Time_And_Date|time and date]] commands, some of which use the new built-in clock, while others are used for formatting times and dates; and the aforementioned [[TI-BASIC:Openlib|OpenLib(]] and [[TI-BASIC:Execlib|ExecLib]] for running routines from Flash application libraries. The new OS (2.30 or later) also includes some additional commands for statistics: [[TI-BASIC:Manual_Fit|Manual_Fit]], [[TI-BASIC:Invt|InvT(]], [[TI-BASIC:Linregtint|LinRegTInt]], and [[TI-BASIC:Chisquaregof_Test|χ²GOF-Test(]].<br />
<br />
= Undocumented Functionality =<br />
<br />
Along with documented changes, different calculators and OS versions have sume undocumented differences. These are given below grouped by the first calculators they occur on:<br />
<br />
'''TI-83+ or higher:'''<br />
* '''Large font on the graph screen''' -- Use the syntax [[TI-BASIC:Text|Text(]]-1, ''row'', ''column'', ''text'') to display text in the large font instead of the typical small font associated with the graph screen.<br />
* '''Fast circle drawing''' -- If you put a complex list, such as {''i''}, as the fourth argument of [[TI-BASIC:Circle|Circle(]], the circle is displayed using its symmetries to only do 1/8 of the trigonometric calculations; this cuts the display time down to only about 30%.<br />
'''OS version 1.15 or higher:'''<br />
* '''The [[TI-BASIC:Percent|%]] Command''' -- The % symbol is an undocumented command that is a useful shortcut for percents -- it divides by 100, so it will convert numbers to percentages. For example, 50% will become 50/100 or 1/2, which is just what 50% should be.<br />
* '''The [[TI-BASIC:Sub|Sub(]] Command''' -- If only one argument is given, and it contains an expression that evaluates to a real or complex number or list of numbers, the argument will be divided by 100. A simpler version of the % command above.<br />
'''TI-84+ and TI-84+ SE:'''<br />
* Using the [[TI-BASIC:Text|Text(]] command for small text will sometimes erase the row of pixels below the text (usually not noticeable, when text is displayed on an already-white background). See the command itself for more information.<br />
<br />
= Extra Characters =<br />
<br />
At three points in TI-83 series history, TI allowed more characters to be used in TI-Basic. However, this means that if you use a new character, it will not work on older calculator models.<br />
<br />
* '''First group:''' This includes the lowercase letters, Greek letters, and international characters. These characters will work with all calculators starting with the TI-83+, but there may be some issues with computer programs such as the TI Program Editor.<br />
* '''Second group:''' The ~ @ # $ & `; \ | _ % characters were introduced only with OS version 1.15 (and will work on all higher versions).<br />
* '''Third group:''' The … ∠ ß ^^x^^ ,,T,, ← → ↑ ↓ x ∫ √ [[File:EFh_LUpBlk.gif]] [[File:F0h_LDnBlk.gif]] [[File:7Fh_LinvEQ.gif]] charactes and subscripts ,,0,, through ,,10,, were introduced only with OS version 1.16 (and will work on all higher versions).<br />
<br />
= Calculator Memory & Speed =<br />
<br />
The TI-83 is the oldest TI-83 series calculator, and it only has 27KB of RAM and a 6MHz processor. A program cannot really even take up the whole 27KB of RAM, since there is the in-game use while running the program. In addition, the 6MHz processor is slower than any of the other calculator processors, so if a game is only marginally playable on the TI-83+SE (with its much speedier 15MHz processor), then there is no way it would even be playable on the TI-83.<br />
<br />
This primarily affects large, complex games like the RPG's made by Kevin Ouellet, but can also affect games that need a lot of speed to be fun. For example, if you have a Mario-like game where you need to keep track of and display multiple enemies on the screen, this can be quite time-consuming on the TI-83. In fact, the game would probably slow to a crawl, and you would spend most of your time waiting for things to load.<br />
<br />
This problem doesn't only plague the TI-83, but also the TI-83+. Because the TI-83+ only has 184KB of memory (24KB RAM and 160KB Flash), each of the aforementioned RPG's by Kevin Ouellet would literally take up all of the available memory on the calculator: Metroid II, for instance, takes up over 123KB in Flash, and you need to have several of the almost fifty programs unarchived in order to actually play the game.<br />
<br />
The TI-83+ also only has an 8MHz processor (which is just marginally faster than the TI-83's 6MHz processor), while the TI-83+SE and TI-84+SE each have a 15MHz processor. So, if a game is specifically tailored to run on those two calculators (meaning that the speed of the game is just fast enough), there is no viable way that the TI-83+ would be able to run the game at a sufficient speed (even taking into account [[TI-BASIC:Optimize|optimization]]).<br />
<br />
= Thoughts to Consider =<br />
<br />
There are some additional ways that you can avoid portability problems:<br />
<br />
* Use [[TI-BASIC:Setupeditor|SetUpEditor]] instead of [[TI-BASIC:Unarchive|UnArchive]] for a list -- this is better, and doesn't lose compatibility with the TI-83.<br />
* If possible, replace all lowercase letters from your program with lowercase stat variables from the VARS>Statistics... menu, or just use uppercase letters everywhere.<br />
* Instead of using [[TI-BASIC:Dayofwk|DayOfWk(]], use the [[TI-BASIC:Day_Of_Week|Day_Of_Week]] routine which uses the [[TI-BASIC:Dbd|Dbd(]] command instead.<br />
* Place all of the calculator specific code into [[TI-BASIC:Subprograms|Subprograms]] that the main program calls: one program is your game functions that work on the respective calculators and the other program is the primary all-calculator code for the program.<br />
<br />
{{Template:TI-BASIC:Next-prev<br />
|prevpage = plan<br />
|prevtitle = Planning Programs<br />
|tocpage = development<br />
|toctitle = Overview<br />
|nextpage = usability<br />
|nexttitle = Usability}}[[Category:TI-BASIC]]<br />
[[Category:TIBD]]</div>Maintenance script