<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wikiti.brandonw.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wikiti.brandonw.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RobbieMc</id>
		<title>WikiTI - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wikiti.brandonw.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RobbieMc"/>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=Special:Contributions/RobbieMc"/>
		<updated>2026-04-07T08:56:01Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Basic:Tricks</id>
		<title>83Plus:Basic:Tricks</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Basic:Tricks"/>
				<updated>2006-12-11T10:45:16Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: Added more to the &amp;quot;Get rid of the &amp;quot;Done&amp;quot; section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Basic|Tricks]]&lt;br /&gt;
&lt;br /&gt;
There is a whole list of tricks that one can implement, once one is comfortable programming in TI-Basic which allow for a whole onslaught of capabilities, such as using less memory or making the program run faster.  There used to be a site called Kevtiva Inc. which had the largest list of TI-BASIC hacks I (Saibot84) have ever seen, including how to force a RAM reset (without the use of asm programs) but I've forgotten most of the meanest hacks. Here are some of the many tricks: (Please use common sense in deciding whether a &amp;quot;-&amp;quot; is a minus or a negative sign. When the use is un-common-sense-ical or possibly confusing, it will be specified.)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Memory==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
===Memory Management===&amp;lt;!-- â†’â‰ â‰¤â‰¥  --&amp;gt;&lt;br /&gt;
;Number values:In order to be able to save memory on the calculator, it helps to have a bit of an understanding as to how the calc manages the memory, especially in regards to numbers. Because TIOS is designed for school, and so is oriented for precision, it saves all real number values as 14-digits and an exponent of 10. In other words, it saves the number &amp;amp;pi; as 3.1415926535898 &amp;amp;times; 10&amp;lt;sup&amp;gt;0&amp;lt;/sup&amp;gt;, but in memory, it is something more similar (not exact) to &amp;lt;code&amp;gt;0 31415926535898&amp;lt;/code&amp;gt; where the 0 tells TIOS what the exponent of 10 is that need to be applied to the 31415926535898.  However, this also applies to smaller values, such that a 13 is saved as &amp;lt;code&amp;gt;1 13000000000000&amp;lt;/code&amp;gt;.  For small, rational, terminating values, it can be seen that a good deal of memory is being wasted.  I've created the following formula which, when saved to Y0 (or any other Y function, works with numbers in the same way that the sub( function works with strings:&lt;br /&gt;
 int(fPart(X/10^(int(2-A+log(X))))*10^(F))&lt;br /&gt;
:translated as a sub( statement, it would be the equivalent of sub(X,A,F) regardless of the position of the decimal point in X.  If you don't understand what the formula is doing, it's dividing X by 10&amp;lt;sup&amp;gt;value&amp;lt;/sup&amp;gt; so that the digit we're looking for (identified in A) is &amp;quot;moved&amp;quot; to be the first digit to the right of the decimal point, then ignores anything to the left or the decimal piont, then multiplies the value left over by 10&amp;lt;sup&amp;gt;F&amp;lt;/sup&amp;gt; and ignores anything to the right of the decimal point, thus providing the sub(X,A,F).&lt;br /&gt;
;use more than 27 vars:If you need to use more than the 27 vars TIOS gives you with A-Z, other than using lists, matrices, strings, or Ans, you can go look in the [VARS] menu under Window.  Of these, being that the calculator is usually in function mode, you can use any of the window vars under T/theta (which are for parametric mode) and/or under U/V/W (which are for polar).  It is recommended that you prefer those under U/V/W because this mode is usually never used, whereas parametric has been used on more than one occasion by programs, such as for drawing X in terms of Y. You can also go into the Finance menu under [APPS] and go to Vars, but IIRC, some are read-only vars, so you will need to experiment to see if a var is accessible or not, but it is certain, that at least the '''N''' can be used problemlessly in your programs. You can also use the ''n'', which is found by going to the catalog and pressing &amp;quot;N&amp;quot; as a variable, as well as the sequential functions u,v, and w.&lt;br /&gt;
;Debugging:One of the easiest ways to help you debug your program is through the use of the Pause command.  You can use the Pause command to display the value of a var, or just to track the progress of your program.  During any of the Pause commands, you can press [ON] to break the program and choose Goto so that the calc will automatically bring you to the point in your program where it was Pause-ing when you interrupted it with the [ON] key. Some common bugs include using the Y var or the X var while drawing to the screen (TIOS tends to change the value of Y and/or X when doing certain things on the graph screen, so avoid using Y or X when working on the graph screen.&lt;br /&gt;
&lt;br /&gt;
===Memory Saving===&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
;Never write out closing ''')''' parentheses at the end of a line:You save '''1''' byte. The reason for this is that TIOS closes all still-open parentheses when it encounters $3F, which is the new-line character that is input when you press enter in the Program Editor, or when it encounters the store arrow.&lt;br /&gt;
;Never write out closing '''&amp;quot;''' quotes at the end of a line: You save '''1''' byte. The reason for this is that TIOS closes any still-open quotes when it encounters $3F, which is the new-line character that is input when you press enter in the Program Editor, or when it encounters the store arrow.&lt;br /&gt;
;Never use a Pause right after a Disp, unless the Pause has text:This is because both Disp and Pause can display text to the homescreen. Disp writes the text to the screen and then continues forward, but Pause waits for the [ENTER] key to be pressed.  When Pause is used with text, such as in&lt;br /&gt;
 :Pause &amp;quot;TEXT&amp;quot;&lt;br /&gt;
:then it writes the text to the homescreen first, and then waits for the user to press [ENTER].&lt;br /&gt;
;CAPITALIZE:For the most part, yes, it is nice to see that not EVERY character is in UPPERCASE on the calculator, but if you're looking to save space, don't use lower case letters.  Each lowercase letter takes up twice as much space as the uppercase ones.&lt;br /&gt;
;Read-Only Lists and Matrices:If you have a list or matrix that will be read-only, it behooves you to save it to a string or Y function (Y1-Y0). Instead of doing&lt;br /&gt;
 :{1,2,3,4,5,6,7,8,9â†’L1&lt;br /&gt;
 :L1(5 (to retrieve the 5th element of the list)&lt;br /&gt;
:try doing&lt;br /&gt;
 :&amp;quot;{1,2,3,4,5,6,7,8,9â†’Str1&lt;br /&gt;
 :expr(Str1&lt;br /&gt;
 :Ans(5&lt;br /&gt;
:or&lt;br /&gt;
 :&amp;quot;{1,2,3,4,5,6,7,8,9â†’Y1&lt;br /&gt;
 :Y1:Ans(5&lt;br /&gt;
:The benefit is that you are now no longer wasting the space, as explained in the [[83Plus:Basic:Tricks#Memory_Management|Number Values]].  When choosing between storing your list to a string and storing it to a function, keep in mind that string values are somewhat editable, while functions are completely read-only.  If you needed to edit something in the function, you'd have to convert it to a string first before editing, and then overwrite the original function.  It is therefore recommended that you save your lists to strings.&lt;br /&gt;
;No NewLine Required:The following commands do not require that you neither begin a new line, nor use a colon before the next command: Archive, Unarchive, DelVar. Example:&lt;br /&gt;
 Archive XArchive YArchive ZUnarchive ZUnarchive TDelVar ADelVar BFor(X,0,1&lt;br /&gt;
:this doesn't work with Lists, or labels, and presumably neither with the prgm token.&lt;br /&gt;
&lt;br /&gt;
==Speed Boosters==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
;Use For( loops:In light of research I once read online, as well as through personal research and experimentation, it is fairly simple to see that For( loops are the fastest of the looping options.  To prove this, try running the following program on your calc, and see which one is the fastest:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Program:LOOPTEST&lt;br /&gt;
:Disp &amp;quot;FOR&lt;br /&gt;
:For(X,1,10000&lt;br /&gt;
:End&lt;br /&gt;
:Pause &amp;quot;FOR IS DONE&lt;br /&gt;
:1â†’X&lt;br /&gt;
:Disp &amp;quot;WHILE&lt;br /&gt;
:While X&amp;lt;10001&lt;br /&gt;
:X+1â†’X&lt;br /&gt;
:End&lt;br /&gt;
:Pause &amp;quot;WHILE IS DONE&lt;br /&gt;
:0â†’X&lt;br /&gt;
:Disp &amp;quot;GOTO&lt;br /&gt;
:Lbl XX&lt;br /&gt;
:X+1â†’X&lt;br /&gt;
:If X&amp;lt;10001&lt;br /&gt;
:Goto XX&lt;br /&gt;
Pause &amp;quot;GOTO DONE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:You will notice, especially if using a stopwatch, that the For( loop, IIRC, should even run a FEW SECONDS faster than the While loop, and/or the Goto loop. Therefore, see if you can't change your loops to use For( instead.  In the case of the While, change&lt;br /&gt;
 :While X&amp;lt;Y&lt;br /&gt;
:to&lt;br /&gt;
 :X-1â†’X&lt;br /&gt;
 :For(X,X,Y&lt;br /&gt;
 :X-1â†’X&lt;br /&gt;
:You most likely will be losing a few more bytes in memory, but it's very much worth it for the speed... and you've already saved much speed by doing the tricks above ;-)&lt;br /&gt;
;Get Returns on your IfThens, Fors, etc.:Each time you do an If-Then statement or a For( statement (among others), when the calc is &amp;quot;waiting&amp;quot; for an End statement, these conditions are taking up memory, which, after a while, slow down your BASIC programs. However, the benefit is that this is only the case, as long as your program is running... as soon as the calculator returns to the homescreen, these used memory is cleared again and you are ready to go at it again. The benefit of this is that when the calculator encounters a Return statement in a BASIC program, it &amp;quot;cancels&amp;quot; any conditions for its waiting for an End.&lt;br /&gt;
;Avoid storing to vars in a loop:Brandon Green writes in his BASIC Guru Online that his experiments have led to the conclusion that storing variables is a prime cause of slowdowns in TI-BASIC programs.  Therefore, try to restructure your code so as to avoid using the â†’ as much as possible.&lt;br /&gt;
&lt;br /&gt;
==Graphical Touches==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
;Use Text(-1,X,Y,value or text:I learned this from Kevtiva Inc.  Normally, you do something like this:&lt;br /&gt;
 :Text(15,10,&amp;quot;MY TEXT&lt;br /&gt;
:following this, the text &amp;quot;MY TEXT&amp;quot; will be written on the 15th row, in the 10th column, in the small font... however, try adding a &amp;quot;-1&amp;quot; (without the quotation marks) as the first argument...&lt;br /&gt;
 :Text(-1,15,10,&amp;quot;MY TEXT&lt;br /&gt;
:This time, the text &amp;quot;MY TEXT&amp;quot; will be written on the 15th row in the 10th column, in the LARGE font&lt;br /&gt;
;Write blank spaces to the graph screen when needing to erase stuff:as long as what you are trying to erase is at least 6 pixels high, it is srongly recommeded that you use the Text( command to write blank spaces to the screen instead of creating a Line(A,B,C,D,0 loop.  This is because to write a line, white or black, the calculator needs to do a lot of math to convert the X and Y coordinates into pixel coordinates, while writing text to the screen is almost at the same speed as it would take to draw a sprite to the screen in any asm program (since for the calc, text chars are just sprites) and so writing (blank) text to clear the screen is much faster.&lt;br /&gt;
;Try drawing graphics to the screen using text instead of lines: With access to the lowercase letters, as well as the Catalog menu, it is possible to draw graphics to the screen using text. For example, to draw a heart for a Zelda game would be much faster if you do something like the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;:&amp;quot;vQ6Qv  &amp;quot;&lt;br /&gt;
:For(X,1,7&lt;br /&gt;
:Text(10,9+X,sub(Ans,X,1&lt;br /&gt;
:End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Another typical example is that of &amp;quot;drawing&amp;quot; a status bar to the screen using something such as:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(P is the percent to be shaded in)&lt;br /&gt;
(L is the length of the bar in pixels)&lt;br /&gt;
(H is the horizontal position)&lt;br /&gt;
(V is the vertical position, using the top-left corner of the screen as point 0,0)&lt;br /&gt;
:Text(V,H,&amp;quot;(&lt;br /&gt;
:For(X,0,PL/100&lt;br /&gt;
:Text(V,H+X+1,&amp;quot;8&lt;br /&gt;
:End&lt;br /&gt;
:For(X,1,(100-P)L/100&lt;br /&gt;
:Text(V,H+PL/100+X,&amp;quot;)&lt;br /&gt;
:End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Using this technique, small graphics such as these can be drawn much faster than if we tried to draw them using lines and/or pixels and/or points.&lt;br /&gt;
;Simplify your Life:Save a GDB at the beginning of your program. &amp;quot;Graph Databases (GDBs) are useful storage centers of graph informaiton. This means that it saves not only the Zoom settings, but also Axes on/off, coord on/off, and the Y= equations. Using these can reduce the size of your program.&amp;quot; (quoted from http://web.archive.org/web/20021020121625/www.kevtiva.com/calc/gdb.htm) Turn off the axes with AxesOff, turn off functions with FuncOff, and set the Window to Xmin=0, Xmax=94, Xscl=8, Ymin=-62, Ymax=0, Yscl=8.  When your program is exiting, have it reset the previous GDB so that you don't mess up the gamer's graph settings.  &amp;lt;!--You might have to turn the axes back on. but at 5:22 in the morning, I don't remember anymore... --&amp;gt;While debugging your graphics, moving your cursor on the graph screen will now tell you both the pixel coordinates, as well as the point coordinates since you have synchronized them. http://www.meebo.com//skin/default/img/emoticons/big_smile.gif&lt;br /&gt;
;Convert Pts into Pxls:If you have not used the previous tip, it is important to know that the coordinates you give to any Pt command will be different from those you give to any Pxl command (if you want to use, say Pt-On/Pt-Off, with Pxl-Test).  The reason for this is that Pt commands take your window settings into account, while Pxl commands don't.Here is one set of formulas you can use to convert your Pt coordinates into Pxl coordinates:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;round(94X/(Xmax-Xmin)+47,0)-&amp;gt;A&lt;br /&gt;
round(-62Y/(Ymax-Ymin)+31,0)-&amp;gt;B&lt;br /&gt;
 -RobbieMc&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:With this formula, the Pxl command is Pxl-XX(B,A), where XX is On, Off, Test, or Change. Another formula can be found in the Ans your answers section of Cool Hacks. http://meebo.com/skin/default/img/emoticons/smile.gif&lt;br /&gt;
;Get rid of the &amp;quot;Done&amp;quot;:Use the following right before your program exits to avoid having the calc display the &amp;quot;Done&amp;quot; text on the homescreen&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;:ClrHome&lt;br /&gt;
:&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:When used immediately before a &amp;quot;Stop&amp;quot; token, &amp;quot;Done&amp;quot; is still displayed after the program quits. This also moves the cursor down one line before quitting. To avoid both these, use &amp;lt;code&amp;gt;Output(1,1,&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;Get rid of the RunIndic:On the homescreen, do &amp;lt;code&amp;gt;Output(1,16,&amp;quot;_&amp;lt;/code&amp;gt; in the loop that is displaying the run indicator. On the graph screen, do &amp;lt;code&amp;gt;Text(-1,0,90,&amp;quot;_&amp;lt;/code&amp;gt; in the loop that is displaying the run indicator. (_ in this context refers to the space character.)&lt;br /&gt;
&lt;br /&gt;
==Cool Hacks==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
;Have &amp;quot; and the store arrow in a string:(IIRC, brought to you by Kevtiva Inc.) Type a &amp;quot; and the store arrow at the homescreen and press enter. An error message will appear; choose to Quit.  Press [Y=] and go to Y1. Press [2nd] [ENTER] to paste the previous homescreen entry into Y1. Press [2nd] [MODE] to {ESC}. At the homescreen, type Equ&amp;gt;Str(Y1,Str1 (or whatever Str you want to store it to and press [ENTER]. You now have the &amp;quot; quote and the store arrow in your string. http://www.meebo.com//skin/default/img/emoticons/wink.gif&lt;br /&gt;
;If condition&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;End:This will need a bigger explanation, but in short, you can have a conditional End statement that helps your loops run faster by only executing the End statement if needed. The reason this works is because you didn't use a Then statement: an If followed by a single non-Then statement is interpreted as an If with no Else clause and the single statement as the equivalent of the Then clause, even if the statement is End.  You can therefore also insert comments into your code (which is not recommended for BASIC unless you're still debugging it) by doing If 0:Whatever. For instance:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(untested...)(lines are numbered)&lt;br /&gt;
01:For(X,0,1&lt;br /&gt;
02:getKeyâ†’K&lt;br /&gt;
03:Kâ†’X&lt;br /&gt;
04:If not(Ans&lt;br /&gt;
05:End&lt;br /&gt;
06:0â†’X&lt;br /&gt;
07:&amp;quot;-&lt;br /&gt;
08:If K=25&lt;br /&gt;
09:&amp;quot;LEFT&lt;br /&gt;
10:If K=26&lt;br /&gt;
11:&amp;quot;UP&lt;br /&gt;
12:If K=27&lt;br /&gt;
13:&amp;quot;RIGHT&lt;br /&gt;
14:If K=34&lt;br /&gt;
15:&amp;quot;DOWN&lt;br /&gt;
16:If K=45&lt;br /&gt;
17:&amp;quot;CLEAR&lt;br /&gt;
18:If Ans=&amp;quot;-&lt;br /&gt;
19:End&lt;br /&gt;
20:Disp Ans&lt;br /&gt;
21:If K=45&lt;br /&gt;
22:1â†’X&lt;br /&gt;
23:End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Explanation: Lines 1-2 are normal. Line 3 resets X if there was no key, which will loop back to the For( statement, or allow the routine to continue if there WAS a key. The answer from the getKey is in Ans, so if no key was pressed, Line 5 will be executed, which loops back to Line 1 without wasting any more time. http://www.meebo.com//skin/default/img/emoticons/smile.gif ... If a key was pressed, X is reset, which will cause the routine to loop back to the For( statement the next time it encounters an End statement. If the condition in Line 4 is not met, it automatically skips to Line 6. The string &amp;quot;-&amp;quot; is stored in Ans. We then go into a series of checks looking for any of the arrow keys, and changing Ans to reflect that. Line 8 is executed, and if the condition is not met, it skips to Line 10; if that condition is not met, it skips to Line 12; if that condition is not met, it skips to Line 14; if that condition is not met, it skips to Line 16; if that condition is not met, it skips to Line 18.  Then, it checks the Ans var.  If the Ans var is still unchanged, then none of the keys we are looking for have been found, so we End, which we've already said will loop back to the For( statement, essentially beginning the getKey loop once more. If Ans is different, then one of our keys was found, so we Disp the value in Ans (which is a String). We then check to see if it was the [CLEAR] key., and if it was, we set X so that the next End statement that is encountered will essentially close the loop and the routine will continue beyond this part of the code. We then End, which checks the value of X.  If X is 0, it loops back to the For( statement, recommencing the whole loop, but if X is 1, it &amp;quot;closes&amp;quot; the loop, forgets about it completely, and moves on with its life. Thus can you build in looping conditions into your programs without having to use Lbl or Goto statements. http://www.meebo.com//skin/default/img/emoticons/cool.gif&lt;br /&gt;
;Ans your answers:the Ans var is, IMHO, the most useful yet most unsafe var on the whole calculator because it can be so many different variable types (real, complex, list, matrix, string)... One way to reduce the number of varables you're using in your program is to carefully structure your program so that it stores as much information into the Ans var as possible. One way to do this is to setup Ans to be a list, say {3,1,4,2,5}. Doing Ans(4) is not going to multiply each value in the list by four, but rather going to give you the 4th value in the list:2. This happens because the OS will treat the Ans variable exactly the same as if it were L1 or any other list variable. I've already demonstrated that the Ans var can be used to keep track of whether one of the keys we were looking for was found or not, but there are other things you can do with the Ans var (as long as you're careful not to change the value in Ans unintentionally).  For instance, doing {Ans(2),Ans(4),Ans(1),Ans(3),Ans(5) will change Ans to be the list {1,2,3,4,5}... Note that the Ans var is changed AFTER the whole command has been executed.  There will probably be more examples of using Ans in a program at a later date.  Therefore, you can do something like this:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(50% tested)&lt;br /&gt;
(to convert from Pt coordinates to Pxl coordinates)&lt;br /&gt;
A is the X-coord&lt;br /&gt;
B is the Y-coord&lt;br /&gt;
&lt;br /&gt;
{63/(Ymax-Ymin),95/(Xmax-Xmin&lt;br /&gt;
&lt;br /&gt;
;{pixels per Y, pixels per X&lt;br /&gt;
&lt;br /&gt;
{abs(Ymax-B),abs(Xmin+A),int(Ans(2))+(0=fPart(Ans(2))),int(Ans(1))+(0=fPart(Ans(1&lt;br /&gt;
&lt;br /&gt;
;{Y,X,int ppY,int ppX&lt;br /&gt;
;Ans(1)Ans(3) is now the Pxl-Y&lt;br /&gt;
;Ans(2)Ans(4) is now the Pxl-X&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
;Autodetect Degree or Radian Mode:Robert Maresh states that this is one thing he learned from  James Matthew's Asmguru.hlp&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;:If 0&amp;lt;cos(9)&lt;br /&gt;
:Then&lt;br /&gt;
:Disp &amp;quot;Degree Mode&lt;br /&gt;
:Else&lt;br /&gt;
:Disp &amp;quot;Radian Mode&lt;br /&gt;
:End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
;Ans as a list:It is possible to use the Ans variable as a list in replacement to using any of the real or complex variables.  The trick is knowing how to use the augment( and the seq( commands so that you won't be destroying Ans and inadvertedly converting it into something other than a list. '''NOTE: '''extensive usage of this, as in the case of replacing all variables from a program can/will slow down the program, as well as use up more memory than if you just used variables. A shellsort program using variables A,B,C,D,L,Z, and &amp;amp;theta; used up 143 bytes, while its variable-free counterpart used up 645 bytes and was significantly slower. However, this doesn't mean the technique is completely useless.&lt;br /&gt;
:*augment({1,2},{3,4}  will return {1,2,3,4}... it can only augment 2 lists at a time, so repeated usage will be necessary to maintain the Ans variable as a list&lt;br /&gt;
:*seq(formula,tempvar,start,end will return a list of what the formula evaluats to when the tempvar is (start-to-finish).  I think an example is necessary: seq(X^2,X,1,5 will For(X,1,5) evaluate X^2 and store that value to a list, thus producing {1,4,9,16,25}, without changing the value of X ;) &lt;br /&gt;
:We can therefore use seq(Ans(X),X,start,end as a list-equivalent to sub(String,start,len... using a sequence of augment( and seq( commands, we can therefore store values into specific Ans-list elements.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{0,0,0,0,0,0,0,0}:augment(seq(Ans(X),X,1,3),augment({2,3},seq(Ans(X),X,6,8&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:That returns the list {0,0,0,2,3,0,0,0}.&lt;br /&gt;
;Autodetect if the Calculator is an 82 or 83/+:Robert Maresh states that &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;abs -1+1 would return 2 on a TI-82&lt;br /&gt;
abs(-1+1 would return 0 on a TI-83 (this is because the abs is followed by a parenthese)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:and that one can therefore use the following to display whether the calc is an 82 or 83&lt;br /&gt;
 Text(0,0,&amp;quot;YOU HAVE A TI-&amp;quot;,83-.5(abs -1+1&lt;br /&gt;
==Miscellaneous==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
;Have conditions built into your formulas:This will probably need a better explanation, but I have found it useful to build certain conditions into my formulas, instead of having to write all those If statements... for instance, for piece-wise graphing, you can do Y=(X^2)(X&amp;gt;0)+(2X)(X&amp;lt;1), which is the same as If X&amp;gt;0:Y=X^2:If X&amp;lt;1:Y=2X ...right now, I can't really say what you'll be saving by doing this (memory/speed/etc) because I don't remember, but I can assure you this come quite in handy because you can then have one formula solve a variety of different problems, without the hassle of dealing with a lot of If-Then statements.  For example, if you were to save that formula as Y1, then you'd only need to do Y1(number) to have it do the whole sequence of conditionals. I consider this one of the more complicated tricks to implement (because one can easily get confused as to how to build it as well as to what conditions one is looking for) but I have found it to be extremely useful.  For example, let us say you write a text editor program in BASIC that allows the user to edit Str1, as displayed on the homescreen using Output(1,1,Str1.  However, you run into a problem when Str1 is longer than the 96 chars that fit on the homescreen, so you can, using the sub( and length( functions, you could have one line of code something like&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;:length(Str1&lt;br /&gt;
:Output(1,1,sub(Str1,1(Ans&amp;lt;96)+16frac(Ans/16)(Ans&amp;gt;95)+(16int(Ans/16)-80)(Ans&amp;gt;95),Ans+80-16int(Ans/16&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:should make the Output scroll up one line whenever the screen has been filled (untested, please verify).  What this line is saying is: give me from Str1, starting at the first byte if Str1 is smaller than 96 charachters, otherwise, calculate the beginning to be one &amp;quot;row&amp;quot; less than the total, and give me all the rest of the chars till the end.  If you could not follow that, don't worry, as that is what I meant when I said this is one of the harder tricks. If you did follow with what I was trying to do, Kudos to you!  Keep in mind that the conditions within the () can hold any of the condition-elements of If statements, i.e. and, not, or, =, â‰ , &amp;gt;, &amp;lt;, â‰¥, â‰¤.  BTW, this BASIC trick  does '''NOT''' work on the 89. I tried, but there I could not get the 89 to convert a binary operation into a numerical value, the way the z80s do. (I could be wrong about this working on all z80s... I've tested it on an 82 and an 83+)&lt;br /&gt;
;See program in MirageOS:If you want to see your program in a shell, like MirageOS, you must type the following code in the first line of the program:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;::&amp;quot;Description&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:That will show the program name with the description you typed.&lt;br /&gt;
;User-friendly Error Messages:(brought to you by Kevtiva Inc.) Write an error message to the screen before calling any subroutine programs, and have the subroutines program erase the error message. This way, if the subroutine program is missing, the user will be informed about the specifics of the problem. Example:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;PROGRAM:MYSHELL&lt;br /&gt;
:program code&lt;br /&gt;
:Output(1,1,&amp;quot;ERR:prgmMYSUB MISSING&lt;br /&gt;
:prgmMYSUB&lt;br /&gt;
:more program code&lt;br /&gt;
&lt;br /&gt;
PROGRAM:MYSUB&lt;br /&gt;
:Output(1,1,&amp;quot;                     &amp;quot;&lt;br /&gt;
:The rest of program MYSUB.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
'''The Complete TI-83 BASIC Optimization Guide, Version 2''' [http://www.ticalc.org/archives/files/fileinfo/145/14542.html]&lt;br /&gt;
&lt;br /&gt;
==Special Thanks==&amp;lt;!-- â†’â‰ â‰¤â‰¥ --&amp;gt;&lt;br /&gt;
Special thanks to:&lt;br /&gt;
&lt;br /&gt;
'''Kevtiva Inc.''' [http://web.archive.org/web/*sr_1nr_315/http://kevtiva.com/* Â© 2000 Kevtiva Interactive]&lt;br /&gt;
&lt;br /&gt;
'''BASIC Guru Online''' [http://bgo.netfirms.com/ Copyright Â© 2000-2006 BASIC Guru Online. All Rights Reserved.]&lt;br /&gt;
&lt;br /&gt;
'''Detached Solutions''' [http://www.detachedsolutions.com/forum/ Â© 2000-2006 Detached Solutions]&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4BE5</id>
		<title>83Plus:BCALLs:4BE5</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4BE5"/>
				<updated>2006-10-22T13:18:26Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: fixed type (axis to axes)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name:Graph|DispAxes]] [[Category:83Plus:BCALLs:By Name|DispAxes]] [[Category:83Plus:BCALLs:By Address|4BE5 - DispAxes]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' DispAxes&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4BE5&lt;br /&gt;
&lt;br /&gt;
Displays the X &amp;amp; Y axes on the screen&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
''None''&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''None''&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:RAM:9776</id>
		<title>83Plus:RAM:9776</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:RAM:9776"/>
				<updated>2006-10-22T12:42:07Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:RAM:By_Name|GY1-GW]] [[Category:83Plus:RAM:By_Address|9776 - GY1-GW]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' GY1-GW&lt;br /&gt;
&lt;br /&gt;
'''Memory Address:''' 9776&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 25 bytes&lt;br /&gt;
&lt;br /&gt;
This area of memory stores the draw style for all function, parametric, polar, and sequence equations.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Each byte corresponds to a different equation:&lt;br /&gt;
* GY1 - GY0   = Graph style for equations Y1 - Y0&lt;br /&gt;
* GX1 - GX6   = Graph style for equations X2 - X6&lt;br /&gt;
* GR1 - GR6   = Graph style for equations R1 - R6&lt;br /&gt;
* GU,GV,GW    = Graph style for sequence equations U,V,W&lt;br /&gt;
&lt;br /&gt;
Each byte can contain a value of 0-6&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4BE5</id>
		<title>83Plus:BCALLs:4BE5</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4BE5"/>
				<updated>2006-10-19T14:33:43Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name:Graph|DispAxis]] [[Category:83Plus:BCALLs:By Name|DispAxis]] [[Category:83Plus:BCALLs:By Address|4BE5 - CentCursor]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' DispAxis&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4BE5&lt;br /&gt;
&lt;br /&gt;
Displays the X &amp;amp; Y axis on the screen&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
''None''&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''None''&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4318</id>
		<title>83Plus:BCALLs:4318</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4318"/>
				<updated>2006-10-03T13:47:03Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|CreateTempCList]][[Category:83Plus:BCALLs:By Name:Variable|CreateTempCList]][[Category:83Plus:BCALLs:By Address|4318 - CreateTempCList]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''(Un)Official Name:''' CreateTempCList&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4318&lt;br /&gt;
&lt;br /&gt;
Creates a temporary complex list.&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* HL = Number of elements&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
* HL points to symbol table entry&lt;br /&gt;
* DE points to data section&lt;br /&gt;
* [[83Plus:RAM:8499|OP4]] contains the name.&lt;br /&gt;
&lt;br /&gt;
=== Registers Destroyed ===&lt;br /&gt;
* AF,BC,[[83Plus:RAM:8478|OP1]],[[83Plus:RAM:8483|OP2]]&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
If there are 65536 temporarily variables or if there isn't enough RAM a memory error will be generated. Contents of the list are random.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 ld hl,4&lt;br /&gt;
 B_CALL CreateTempCList&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4312</id>
		<title>83Plus:BCALLs:4312</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4312"/>
				<updated>2006-10-03T13:42:43Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|CreateTempRList]][[Category:83Plus:BCALLs:By Name:Variable|CreateTempRList]][[Category:83Plus:BCALLs:By Address|4312 - CreateTempRList]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''(Un)Official Name:''' CreateTempRList&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4312&lt;br /&gt;
&lt;br /&gt;
Creates a temporary real list.&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* HL = Number of elements&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
* HL points to symbol table entry&lt;br /&gt;
* DE points to data section&lt;br /&gt;
* [[83Plus:RAM:8499|OP4]] contains the name.&lt;br /&gt;
&lt;br /&gt;
=== Registers Destroyed ===&lt;br /&gt;
* AF,BC,[[83Plus:RAM:8478|OP1]],[[83Plus:RAM:8483|OP2]]&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
If there are 65536 temporarily variables or if there isn't enough RAM a memory error will be generated. Contents of the list are random.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 ld hl,4&lt;br /&gt;
 B_CALL CreateTempRList&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:OS:Small_Edit_Buffers</id>
		<title>83Plus:OS:Small Edit Buffers</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:OS:Small_Edit_Buffers"/>
				<updated>2006-09-10T10:01:41Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:OS Information|Small Edit Buffers]]&lt;br /&gt;
The TI-OS offers a number of undocumented B_CALLs and B_JUMPs that allow for input to be performed using the small font. Perhaps the best example of these functions is TI's Conics app, which uses them for inputting the variables for the relations. You can use the small edit routines for either one-line input (which scrolls left to right), or multi-line input (which will scroll up/down, wrapping text like on the homescreen.)&lt;br /&gt;
&lt;br /&gt;
The following entry points are used with the small editing routines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;_InitSmallEditBox		EQU	4CDBh&lt;br /&gt;
_InitSmallEditBoxOP1		EQU	4D38h&lt;br /&gt;
_InitSmallEditBoxVar		EQU	4D35h&lt;br /&gt;
_InitSmallEditLine		EQU	4CA5h&lt;br /&gt;
_InitSmallEditLineOP1		EQU	4D32h&lt;br /&gt;
_InitSmallEditLineVar		EQU	4D2Fh&lt;br /&gt;
_ReleaseSEdit			EQU	4CA2h&lt;br /&gt;
_SmallEditCxErrorEP		EQU	4CC6h&lt;br /&gt;
_SmallEditCxMain		EQU	4CABh&lt;br /&gt;
_SmallEditCxPPutaway		EQU	4CC3h&lt;br /&gt;
_SmallEditCxPutaway		EQU	4CC0h&lt;br /&gt;
_SmallEditCxRedisp		EQU	4CBAh&lt;br /&gt;
_SmallEditCxSizeWind		EQU	4D2Ch&lt;br /&gt;
_StartSmallEdit			EQU	4CA8h&lt;br /&gt;
_StartSmallEditReturn		EQU	4E1Fh&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Customization of the small edit buffer occurs by setting up certain areas of the RAM, with their equates listed below. Interestingly, all of these equates fall between ramCode and ramCodeEnd.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;SmallEditCancelParse		EQU	8194h&lt;br /&gt;
SmallEditColumnLeft		EQU	8177h&lt;br /&gt;
SmallEditColumnRight		EQU	8179h&lt;br /&gt;
SmallEditRow			EQU	8178h&lt;br /&gt;
SmallEditRowCount		EQU	81B7h&lt;br /&gt;
SmallEditPromptString		EQU	81CCh&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To begin an edit session, you first must setup some of the settings in RAM. All of the small edit routines require the following to be set:&lt;br /&gt;
&lt;br /&gt;
'''SmallEditCancelParse:''' Set to 03h if you do not want the small edit routines to parse the string typed, set to anything else for automatic parsing. This will be discussed later.&lt;br /&gt;
&lt;br /&gt;
'''SmallEditColumnLeft:''' The leftmost column for the small edit buffer.&lt;br /&gt;
&lt;br /&gt;
'''SmallEditColumnRight:''' The rightmost column. If the text would extend past this point, the edit routines will automatically handle scrolling.&lt;br /&gt;
&lt;br /&gt;
'''SmallEditRow:''' The row (in pixels, from the top of the screen) for the first row of the edit buffer.&lt;br /&gt;
&lt;br /&gt;
'''SmallEditPromptString:''' The string to display. This is analogous to the first string argument for the Input command in TI-BASIC. SmallEditPromptString should contain the length, in characters, and SmallEditPromptString + 1 should contain the actual string. If you don't want a string, simply set SmallEditPromptString to zero.&lt;br /&gt;
&lt;br /&gt;
Also, if you are doing multi-line input (&amp;quot;box&amp;quot; input), then you must also set SmallEditRowCount, which is the number of rows to use for editing.&lt;br /&gt;
&lt;br /&gt;
Once the various settings in RAM are setup, you must then B_CALL one of the Init entrypoints. There are six of them, with their names describing exactly what behaviors should occur, the format being _InitSmallEdit[Type][WhatToEdit]. Type is either line, which is for one line input, or Box, which does multi-line. WhatToEdit describes what should appear in the edit buffer by default. If WhatToEdit isn't there (either _InitSmallEditLine or _InitSmallEditBox), then the edit buffer is initially empty. If WhatToEdit is Var, the contents of the variable given in OP1 is used. If WhatToEdit is OP1, then OP1 is treated as a real and converted to a string, the resulting string then is placed in the edit buffer.&lt;br /&gt;
&lt;br /&gt;
The following actions are taken by the _InitSmallEdit entry points:&lt;br /&gt;
&lt;br /&gt;
* An edit buffer is opened on the &amp;quot;text_buf&amp;quot; equation, with the contents requested (if any) placed inside.&lt;br /&gt;
* The prompt string and contents of the edit buffer are displayed based on the settings in RAM and the form of InitSmallEdit called.&lt;br /&gt;
* Monitor vectors are installed to prepare for the editing. The previous monitor vectors are backed up. I believe appFlags is not touched.&lt;br /&gt;
&lt;br /&gt;
Once the small edit buffer is open, you perform the actual editing by B_CALLing _StartSmallEdit. This entrypoint saves the return page / address combination for the B_CALL to RAM, and then passes control to Mon, and editing starts.&lt;br /&gt;
&lt;br /&gt;
Editing is completed by pressing Enter or 2nd+Quit, and if you are doing line input, then also up or down. _StartSmallEdit returns with A being the key pressed that caused the edit session to complete. If you didn't disable parsing, parsing will occur (a system error is thrown if a parse error occurs), with OP1 (and maybe OP2 in the case of complex results) containing the result. Otherwise, OP1 contains the name of &amp;quot;text_buf&amp;quot;, which is:&lt;br /&gt;
&lt;br /&gt;
EquObj, 0&lt;br /&gt;
&lt;br /&gt;
Notes about _StartSmallEdit:&lt;br /&gt;
&lt;br /&gt;
* appBackUpScreen is used when backing up the image during a cxPPutAway for restoration during cxRedisp.&lt;br /&gt;
* Switching to other contexts (say by doing 2nd+Mem, 2) can cause unexpected behaviors. TI's Conics app uses a keyhook to disable various keys that open menus that contain problematic items (the memory, stat and program menus are blocked entirely, for example.)&lt;br /&gt;
* 2nd-Off also causes problems. Conics handles this by installing it's own monitor vectors, as mentioned later.&lt;br /&gt;
* If a parse error occurs, you can call this again to continue input, but it appears some internal states are messed up, so errors are always thrown (at least if we're asking it to parse for us.) If anyone can clear this up, tell me!&lt;br /&gt;
&lt;br /&gt;
Once you are done with the edit buffer, B_CALL ReleaseSEdit. This closes the edit buffer, and restores the original monitor vectors. You must do this under all conditions.&lt;br /&gt;
&lt;br /&gt;
There is an extra B_CALL _StartSmallEditReturn, which is a very odd and not very useful routine. When you B_CALL _StartSmallEdit, the top three items on the stack (placed there by the B_CALL routine itself) are popped off (and stored at 818Bh for the curious), and the SP is then saved (saved to 9D88h.) This is used so StartSmallEdit can actually return (the sp is restored, the values are pushed back, and the OS then does ret.) _StartSmallEditReturn basically restores the SP to what it was before you B_CALLed _StartSmallEdit. Incidently, this also changes the same pieces of RAM where _StartSmallEdit saved the return location, so if you were to call _StartSmallEditReturn in a hook (key hook for example), the edit session may continue, but when it's done, _StartSmallEdit will return to the op-code after where you B_CALLed _StartSmallEditReturn!&lt;br /&gt;
&lt;br /&gt;
Notes about Conic's use of the small edit routines:&lt;br /&gt;
&lt;br /&gt;
* A _GetKey hook is used for disabling various keys that open uneeded menus. Also, the softkeys are also implemented with this hook. If the user presses Graph for example, the hook sets an internal flag and changes the key to kEnter. This causes the small edit to finish (_StartSmallEdit returns), at which point the app then checks the internal flag to see if extra actions should be taken.&lt;br /&gt;
* Conics installs it's own monitor vectors before calling _StartSmallEdit (but after it calls one of the _InitSmallEdit routines.) This allows it to get putaway notification to cleanly handle 2nd+Off. It's cxMain, cxPPutaway and cxRedisp handlers simply B_JUMP to _SmallEditCxMain, _SmallEditCxPPutaway, and _SmallEditCxRedisp for handling. _SmallEditCxErrorEP and _SmallEditCxSizeWind can also be used for the same purpose. (thanks to mmartin for this info!) _SmallEditCxPutaway loads SP from 9D88h, pushes three saved items on the stack and does a ret. Which is the routine used to return in the _StartSmallEdit B_CALL.&lt;br /&gt;
* Conics parses text_buf manually by setting the SmallEditCancelParse byte, and then calling ParseInp with an error handler.&lt;br /&gt;
&lt;br /&gt;
== Credits and Contributions ==&lt;br /&gt;
* '''mmartin:''' For helping figure out some of the extra B_JUMPs&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BA0</id>
		<title>83Plus:Hooks:9BA0</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BA0"/>
				<updated>2006-08-19T05:30:22Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Hooks:By Address|9BA0 - Regraph Hook]]&lt;br /&gt;
[[Category:83Plus:Hooks:By Name|Regraph Hook]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Name:''' Regraph Hook&lt;br /&gt;
&lt;br /&gt;
'''Hook Pointer Block Address:''' [[83Plus:RAM:9BA0|9BA0]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4FEA|4FEA]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4FED|4FED]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Call BCALL:''' [[83Plus:BCALLs:4FF0|4FF0]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Active Flag:''' [[83Plus:Flags:35#Bit_6|6, (iy + 35h)]]&lt;br /&gt;
&lt;br /&gt;
This hook allows one to intercept various events that occur during a regraph, and optionally cancel them. Be aware that this hook is called if a function is being drawn on top of a currently existing graph (&amp;quot;smart graph.&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
'''Note:''' This was only extensively researched in function mode.&lt;br /&gt;
&lt;br /&gt;
== Using the Hook ==&lt;br /&gt;
In most cases, returning with zero set will allow something to occur, and returning with zero reset will cancel something. Like some hooks, this hook is rather messy.&lt;br /&gt;
&lt;br /&gt;
These events are listed in the order below to match the order they are actually called in.&lt;br /&gt;
&lt;br /&gt;
* '''A = 00h:''' Graphing has started, otherwise nothing has occured. Returning with zero reset will cancel the entire graphing procedure.&lt;br /&gt;
* '''A = 01h:''' Graph about to be erased if required, otherwise presented (from plotSScreen) Returning with zero reset will cancel the entire graphing process.&lt;br /&gt;
* '''A = 02h:''' About to draw axes and grid. Returning with zero reset will cancel this drawing only.&lt;br /&gt;
* '''A = 09h:''' Stat plots drawn. About to draw equations. Returning with zero reset will cancel drawing of all equations (or at least the ones being drawn in this graph.)&lt;br /&gt;
* '''A = 03h:''' About to evaluate a point. OP1 contains the value of the independant variable. E contains the equation number only if this is the first time this message is sent for this function, otherwise may hold C9h. Return value ignored. Message skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 08h:''' About to evaluate a point---this is somewhat a duplicate of event 03h. OP1 contains equation name. Called twice in the case of Parametric graphs (one time for X and one time for Y). Value of E here the same as value of E during the message A = 3, or if in Simultaneous mode then the number of the equation. During the first call per equation (when not in Simultaneous mode), OP4 may contain the name of the independant variable. This event can also be called when the next location of the trace cursor has to be calculated. Returning with zero reset will make the os try to use the value in OP1 as result. Returning with zero set will make the os try to execute the equation, resulting in event 04h.  (Changing the name of the equation in OP1 has no effect.)&lt;br /&gt;
* '''A = 04h:''' Function evaluated. OP1 is the X coordinate after evaluation. OP2 is the Y coordinate after evaluation, assuming that zero was set as a return value when A = 08h, otherwise contains function name. Canceling this event will cancel drawing of that point, as well as any line connecting to it. This event is skipped if an error occured in parsing.&lt;br /&gt;
* '''A = 05h:''' Called after A = 4 regardless of return value or if A = 4 wasn't called due to parse error. Skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 06h:''' B contains pixel x-coordinate of the next point to be drawn. Can be modified if desired (but not sure on exact behavior.) Skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 07h:''' About to draw axes labels, and done drawing equations. Return values ingored.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Below is a table of the order of events that are called for each point to be evaluated. In parametric mode the event 08h is called twice because it has to evaluate both X and Y (in that order).&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Function (sequential)&lt;br /&gt;
| 03h || 08h || 04h || 05h || 06h&lt;br /&gt;
|-&lt;br /&gt;
! Function (simultaneous)&lt;br /&gt;
| || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Parametric&lt;br /&gt;
| 08h || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Polar&lt;br /&gt;
| || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Sequential&lt;br /&gt;
| || || 04h&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As mentioned, this hook's behavior is rather erratic and messy; the best way to learn it is to just mess with it.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4345</id>
		<title>83Plus:BCALLs:4345</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4345"/>
				<updated>2006-08-18T07:10:09Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|UpdatePointers]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Utility|UpdatePointers]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|4345 - UpdatePointers]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Unofficial Name:''' UpdatePointers&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4345&lt;br /&gt;
&lt;br /&gt;
Updates 23 pointers after memory has been inserted or deleted&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* DE = Location in RAM where memory was inserted/deleted&lt;br /&gt;
* BC = Number of bytes to decrease each pointer by (use signed integer to increase the pointers)&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
All&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
These 23 pointers in RAM are updated:&lt;br /&gt;
* iMathPtr1&lt;br /&gt;
* iMathPtr2&lt;br /&gt;
* iMathPtr3&lt;br /&gt;
* iMathPtr4&lt;br /&gt;
* iMathPtr5&lt;br /&gt;
* asm_data_ptr1&lt;br /&gt;
* asm_data_ptr2&lt;br /&gt;
* fmtMatMem&lt;br /&gt;
* newDataPtr&lt;br /&gt;
* EQS&lt;br /&gt;
* 9319h&lt;br /&gt;
* 9302h&lt;br /&gt;
* insDelPtr&lt;br /&gt;
* 9306h&lt;br /&gt;
* 9311h&lt;br /&gt;
* editDat&lt;br /&gt;
* chkDelPtr1&lt;br /&gt;
* XOutDat&lt;br /&gt;
* YOutDat&lt;br /&gt;
* fOutDat&lt;br /&gt;
* 84E7h&lt;br /&gt;
* inputDat&lt;br /&gt;
* chkDelPtr2&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BA0</id>
		<title>83Plus:Hooks:9BA0</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BA0"/>
				<updated>2006-08-17T14:52:14Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Hooks:By Address|9BA0 - Regraph Hook]]&lt;br /&gt;
[[Category:83Plus:Hooks:By Name|Regraph Hook]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Name:''' Regraph Hook&lt;br /&gt;
&lt;br /&gt;
'''Hook Pointer Block Address:''' [[83Plus:RAM:9BA0|9BA0]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4FEA|4FEA]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4FED|4FED]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Call BCALL:''' [[83Plus:BCALLs:4FF0|4FF0]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Active Flag:''' [[83Plus:Flags:35#Bit_6|6, (iy + 35h)]]&lt;br /&gt;
&lt;br /&gt;
This hook allows one to intercept various events that occur during a regraph, and optionally cancel them. Be aware that this hook is called if a function is being drawn on top of a currently existing graph (&amp;quot;smart graph.&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
'''Note:''' This was only extensively researched in function mode.&lt;br /&gt;
&lt;br /&gt;
== Using the Hook ==&lt;br /&gt;
In most cases, returning with zero set will allow something to occur, and returning with zero reset will cancel something. Like some hooks, this hook is rather messy.&lt;br /&gt;
&lt;br /&gt;
These events are listed in the order below to match the order they are actually called in.&lt;br /&gt;
&lt;br /&gt;
* '''A = 00h:''' Graphing has started, otherwise nothing has occured. Returning with zero reset will cancel the entire graphing procedure.&lt;br /&gt;
* '''A = 01h:''' Graph about to be erased if required, otherwise presented (from plotSScreen) Returning with zero reset will cancel the entire graphing process.&lt;br /&gt;
* '''A = 02h:''' About to draw axes and grid. Returning with zero reset will cancel this drawing only.&lt;br /&gt;
* '''A = 09h:''' Stat plots drawn. About to draw equations. Returning with zero reset will cancel drawing of all equations (or at least the ones being drawn in this graph.)&lt;br /&gt;
* '''A = 03h:''' About to evaluate a point. OP1 contains the value of the independant variable. E contains the equation number only if this is the first time this message is sent for this function, otherwise may hold C9h. Return value ignored. Message skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 08h:''' About to evaluate a point---this is somewhat a duplicate of event 03h. OP1 contains equation name. Called twice in the case of Parametric graphs (one time for X and one time for Y). Value of E here the same as value of E during the message A = 3, or if in Simultaneous mode then the number of the equation. During the first call per equation (when not in Simultaneous mode), OP4 may contain the name of the independant variable. This event can also be called when the next location of the trace cursor has to be calculated. Returning with zero reset will make the os try to use the value in OP1 as result. Returning with zero set will make the os try to execute the equation, resulting in event 04h.  (Changing the name of the equation in OP1 has no effect.)&lt;br /&gt;
* '''A = 04h:''' Function evaluated. OP1 is the X coordinate after evaluation. OP2 is the Y coordinate after evaluation, assuming that zero was set as a return value when A = 08h, otherwise contains function name. Canceling this event will cancel drawing of that point, as well as any line connecting to it. This event is skipped if an error occured in parsing.&lt;br /&gt;
* '''A = 05h:''' A = 5 - Called after A = 4 regardless of return value or if A = 4 wasn't called due to parse error. Skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 06h:''' B contains pixel x-coordinate of the next point to be drawn. Can be modified if desired (but not sure on exact behavior.) Skipped in Simultaneous mode.&lt;br /&gt;
* '''A = 07h:''' About to draw axes labels, and done drawing equations. Return values ingored.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Below is a table of the order of events that are called for each point to be evaluated. In parametric mode the event 08h is called twice because it has to evaluate both X and Y (in that order).&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Function (sequential)&lt;br /&gt;
| 03h || 08h || 04h || 05h || 06h&lt;br /&gt;
|-&lt;br /&gt;
! Function (simultaneous)&lt;br /&gt;
| || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Parametric&lt;br /&gt;
| 08h || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Polar&lt;br /&gt;
| || 08h || 04h&lt;br /&gt;
|-&lt;br /&gt;
! Sequential&lt;br /&gt;
| || || 04h&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As mentioned, this hook's behavior is rather erratic and messy; the best way to learn it is to just mess with it.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4360</id>
		<title>83Plus:BCALLs:4360</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4360"/>
				<updated>2006-08-12T05:19:12Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|UpdateVATandPointersADD]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Memory|UpdateVATandPointersADD]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|4360 - UpdateVATandPointersADD]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' UpdateVATandPointersADD&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4360&lt;br /&gt;
&lt;br /&gt;
Updates VAT and pointers after memory has been inserted&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* DE = Location in RAM where memory was inserted&lt;br /&gt;
* BC = Number of bytes to increase each VAT entry and pointer by (amount of memory inserted)&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
All&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Along with the VAT entries, these 29 pointers in RAM will be updated:&lt;br /&gt;
* iMathPtr1&lt;br /&gt;
* iMathPtr2&lt;br /&gt;
* iMathPtr3&lt;br /&gt;
* iMathPtr4&lt;br /&gt;
* iMathPtr5&lt;br /&gt;
* asm_data_ptr1&lt;br /&gt;
* asm_data_ptr2&lt;br /&gt;
* fmtMatMem&lt;br /&gt;
* newDataPtr&lt;br /&gt;
* EQS&lt;br /&gt;
* 9319h&lt;br /&gt;
* 9302h&lt;br /&gt;
* insDelPtr&lt;br /&gt;
* 9306h&lt;br /&gt;
* 9311h&lt;br /&gt;
* editDat&lt;br /&gt;
* chkDelPtr1&lt;br /&gt;
* XOutDat&lt;br /&gt;
* YOutDat&lt;br /&gt;
* fOutDat&lt;br /&gt;
* 84E7h&lt;br /&gt;
* inputDat&lt;br /&gt;
* chkDelPtr2&lt;br /&gt;
* fpBase&lt;br /&gt;
* FPS&lt;br /&gt;
* 965Bh&lt;br /&gt;
* 965Dh&lt;br /&gt;
* 965Fh&lt;br /&gt;
* tempMem&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4345</id>
		<title>83Plus:BCALLs:4345</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4345"/>
				<updated>2006-08-12T05:19:11Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|UpdatePointers]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Utility|UpdatePointers]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|4345 - UpdatePointers]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' UpdatePointers&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4345&lt;br /&gt;
&lt;br /&gt;
Updates 23 pointers after memory has been inserted or deleted&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* DE = Location in RAM where memory was inserted/deleted&lt;br /&gt;
* BC = Number of bytes to decrease each pointer by (use signed integer to increase the pointers)&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
All&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
These 23 pointers in RAM will be updated:&lt;br /&gt;
* iMathPtr1&lt;br /&gt;
* iMathPtr2&lt;br /&gt;
* iMathPtr3&lt;br /&gt;
* iMathPtr4&lt;br /&gt;
* iMathPtr5&lt;br /&gt;
* asm_data_ptr1&lt;br /&gt;
* asm_data_ptr2&lt;br /&gt;
* fmtMatMem&lt;br /&gt;
* newDataPtr&lt;br /&gt;
* EQS&lt;br /&gt;
* 9319h&lt;br /&gt;
* 9302h&lt;br /&gt;
* insDelPtr&lt;br /&gt;
* 9306h&lt;br /&gt;
* 9311h&lt;br /&gt;
* editDat&lt;br /&gt;
* chkDelPtr1&lt;br /&gt;
* XOutDat&lt;br /&gt;
* YOutDat&lt;br /&gt;
* fOutDat&lt;br /&gt;
* 84E7h&lt;br /&gt;
* inputDat&lt;br /&gt;
* chkDelPtr2&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4360</id>
		<title>83Plus:BCALLs:4360</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4360"/>
				<updated>2006-08-12T04:59:22Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|UpdateVATandPointersADD]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Memory|UpdateVATandPointersADD]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|4360 - UpdateVATandPointersADD]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' UpdateVATandPointersADD&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 4360&lt;br /&gt;
&lt;br /&gt;
Updates VAT and pointers after memory has been inserted&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* DE = Location in RAM where memory was inserted&lt;br /&gt;
* BC = Number of bytes to increase each VAT entry and pointer by&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
All&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Along with the VAT entries, these 29 pointers in RAM will be updated:&lt;br /&gt;
* iMathPtr1&lt;br /&gt;
* iMathPtr2&lt;br /&gt;
* iMathPtr3&lt;br /&gt;
* iMathPtr4&lt;br /&gt;
* iMathPtr5&lt;br /&gt;
* asm_data_ptr1&lt;br /&gt;
* asm_data_ptr2&lt;br /&gt;
* fmtMatMem&lt;br /&gt;
* newDataPtr&lt;br /&gt;
* EQS&lt;br /&gt;
* 9319h&lt;br /&gt;
* 9302h&lt;br /&gt;
* insDelPtr&lt;br /&gt;
* 9306h&lt;br /&gt;
* 9311h&lt;br /&gt;
* editDat&lt;br /&gt;
* chkDelPtr1&lt;br /&gt;
* XOutDat&lt;br /&gt;
* YOutDat&lt;br /&gt;
* fOutDat&lt;br /&gt;
* 84E7h&lt;br /&gt;
* inputDat&lt;br /&gt;
* chkDelPtr2&lt;br /&gt;
* fpBase&lt;br /&gt;
* FPS&lt;br /&gt;
* 965Bh&lt;br /&gt;
* 965Dh&lt;br /&gt;
* 965Fh&lt;br /&gt;
* tempMem&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:42FA</id>
		<title>83Plus:BCALLs:42FA</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:42FA"/>
				<updated>2006-08-11T17:27:15Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|InsertMemNoUpdateVAT]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Memory|InsertMemNoUpdateVAT]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|42FA - InsertMemNoUpdateVAT]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' InsertMemNoUpdateVAT&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 42FA&lt;br /&gt;
&lt;br /&gt;
Inserts memory to a given location without updating the VAT pointers&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* HL = Number of bytes to insert&lt;br /&gt;
* DE = Location to insert memory&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
* HL,BC&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
This routine works by copying everything from DE to (fps) forward HL bytes in RAM.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:42FA</id>
		<title>83Plus:BCALLs:42FA</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:42FA"/>
				<updated>2006-08-11T16:17:41Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:BCALLs:By Name|InsertMemNoUpdateVAT]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Name:Utility|InsertMemNoUpdateVAT]]&lt;br /&gt;
[[Category:83Plus:BCALLs:By Address|42FA - InsertMemNoUpdateVAT]]&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Official Name:''' InsertMemNoUpdateVAT&lt;br /&gt;
&lt;br /&gt;
'''BCALL Address:''' 42FA&lt;br /&gt;
&lt;br /&gt;
Inserts memory to a given location without updating the VAT pointers&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* HL = Number of bytes to insert&lt;br /&gt;
* DE = Location to insert memory&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
* HL,BC&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
This routine works by copying everything from DE to (fps) forward HL bytes in RAM.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Ports:04</id>
		<title>83Plus:Ports:04</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Ports:04"/>
				<updated>2006-08-04T05:52:51Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Ports:By_Address|04 - Memory Map / Interrupt]] [[Category:83Plus:Ports:By_Name|Memory Map / Interrupt]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Port Number:''' 04h&lt;br /&gt;
&lt;br /&gt;
'''Function:''' Interrupting Device Identification and Memory Map Control&lt;br /&gt;
&lt;br /&gt;
This port serves two purposes. When read it indicates the device that triggered an interrupt. When written it sets the memory map mode and hardware timer speed.&lt;br /&gt;
&lt;br /&gt;
=== Read Values ===&lt;br /&gt;
* Bits 0~2 and 4~7 are set according to which device triggered the running interrupt.&lt;br /&gt;
** Bit 0: Set if pressing the ON Key triggered the interrupt.&lt;br /&gt;
** Bit 1: Set if the first hardware timer triggered the interrupt.&lt;br /&gt;
** Bit 2: Set if the second hardware timer triggered the interrupt.&lt;br /&gt;
** Bit 4: Link activity generated an interrupt.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 5: First crystal timer has expired.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 6: Second crystal timer has expired.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 7: Third crystal timer has expired.&lt;br /&gt;
* Bit 3 is reset if the ON key is being pressed, set otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Write Values ===&lt;br /&gt;
* Bit 0 reset to select memory map mode 0. In mode 0 the RAM and ROM is mapped to CPU memory as follows:&lt;br /&gt;
** Address 0000h ~ 3FFFh: ROM Page 0&lt;br /&gt;
** Address 4000h ~ 7FFFh: Memory Bank A (Page selected in [[83Plus:Ports:06|Port 06h]])&lt;br /&gt;
** Address 8000h ~ BFFFh: Memory Bank B (Page selected in [[83Plus:Ports:07|Port 07h]])&lt;br /&gt;
** '''83+ Basic''': Address C000h ~ FFFFh: RAM Page 0&lt;br /&gt;
** '''Everything else''': Address C000h ~ FFFFh: Page selected in [[83Plus:Ports:05|Port 05h]]&lt;br /&gt;
* Bit 0 set to select memory map mode 1. In mode 1 the RAM and ROM is mapped to CPU memory as follows:&lt;br /&gt;
** Address 0000h ~ 3FFFh: ROM Page 0&lt;br /&gt;
** Address 4000h ~ 7FFFh: RAM Page 0&lt;br /&gt;
** Address 8000h ~ BFFFh: Memory Bank A (Page selected in [[83Plus:Ports:06|Port 06h]])&lt;br /&gt;
** Address C000h ~ FFFFh: Memory Bank B (Page selected in [[83Plus:Ports:07|Port 07h]])&lt;br /&gt;
* Bits 1 and 2 control the hardware timer frequency. Setting both 0 sets the timer to the fastest speed, and both 1 is the slowest speed. The normal speed is with both bits 1.&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|+Frequency (Hz)&lt;br /&gt;
|-&lt;br /&gt;
!&amp;amp;nbsp;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|first timer&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|second timer&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|both enabled&lt;br /&gt;
|-&lt;br /&gt;
!value&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
|-&lt;br /&gt;
!00&lt;br /&gt;
|560||512||1120||1024||1680||1536&lt;br /&gt;
|-&lt;br /&gt;
!01&lt;br /&gt;
|248||227||497||455||746||682&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|170||156||344||315||517||473&lt;br /&gt;
|-&lt;br /&gt;
!11&lt;br /&gt;
|118||108||236||216||353||323&lt;br /&gt;
|}&lt;br /&gt;
* Bits 4~6 should be 1 on the 83+ and 83+SE, and 0 on the 84+ and 84+SE.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
The calculator uses mode 0 for normal operation. If you change the memory map mode be sure to change it back before returning control.&lt;br /&gt;
Also, do not switch from mode 0 to mode 1 inside the 4000h ~ 7FFFh range, as it will basically crash the calculator because RAM Page 0 will take over that section and RAM Page 0 cannot execute code.&lt;br /&gt;
&lt;br /&gt;
Interrupt timers seem to be independant of the CPU speed, so setting an SE calculator to 15mhz will not increase the timer frequency.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This example shows successful use of this port, switching to mode 1 and back. Mode 1 is the only way to execute code beyond address C000h on the 83+ Basic.  (Assumes code is running from 4000h (i.e. an application))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; in a, (7) ;Save current Bank B page because we'll trash it.&lt;br /&gt;
 push af&lt;br /&gt;
 in a,(6) ;Put this app's page into 8000&lt;br /&gt;
 out (7), a&lt;br /&gt;
 jp $ + 4003h ;This will actually jump to the next statement, but in Bank B.&lt;br /&gt;
 ld a, 77h ;Select mode 1 and keep the timer speed at normal...&lt;br /&gt;
 out (4), a ;Now we're in mode 1.&lt;br /&gt;
 ;We're still at 8000h here but we are back in Bank A.&lt;br /&gt;
 ;Now to go back.&lt;br /&gt;
 ld a, 76h ;I could dec a for this example, but...&lt;br /&gt;
 out (4), a ;Back in mode 0 and bank B.&lt;br /&gt;
 jp $ - 3FFDh ;Jump back to bank A.&lt;br /&gt;
 pop af&lt;br /&gt;
 out (7), a ;Restore bank B.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits and Contributions ==&lt;br /&gt;
* '''Dan Englender''': Originally documented memory map modes [http://www.detachedsolutions.com/forum/viewtopic.php?p=21593#21593 here]&lt;br /&gt;
* '''Michael Vincent''': For his docs [http://www.michaelv.org/programs/calcs/ports/port4.html here], which helped me figure out the interrupt device bits.&lt;br /&gt;
* '''James Montelongo''': For his docs [http://www.geocities.com/jimm09876/calc/port4.html here] on the hardware timer.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Ports:04</id>
		<title>83Plus:Ports:04</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Ports:04"/>
				<updated>2006-08-04T05:52:32Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Ports:By_Address|04 - Memory Map / Interrupt]] [[Category:83Plus:Ports:By_Name|Memory Map / Interrupt]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Port Number:''' 04h&lt;br /&gt;
&lt;br /&gt;
'''Function:''' Interrupting Device Identification and Memory Map Control&lt;br /&gt;
&lt;br /&gt;
This port serves two purposes. When read it indicates the device that triggered an interrupt. When written it sets the memory map mode and hardware timer speed.&lt;br /&gt;
&lt;br /&gt;
=== Read Values ===&lt;br /&gt;
* Bits 0~2 and 4~7 are set according to which device triggered the running interrupt.&lt;br /&gt;
** Bit 0: Set if pressing the ON Key triggered the interrupt.&lt;br /&gt;
** Bit 1: Set if the first hardware timer triggered the interrupt.&lt;br /&gt;
** Bit 2: Set if the second hardware timer triggered the interrupt.&lt;br /&gt;
** Bit 3: Set if the ON Key is not pressed&lt;br /&gt;
** Bit 4: Link activity generated an interrupt.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 5: First crystal timer has expired.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 6: Second crystal timer has expired.&lt;br /&gt;
** '''83+SE / 84+ only:''' Bit 7: Third crystal timer has expired.&lt;br /&gt;
* Bit 3 is reset if the ON key is being pressed, set otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Write Values ===&lt;br /&gt;
* Bit 0 reset to select memory map mode 0. In mode 0 the RAM and ROM is mapped to CPU memory as follows:&lt;br /&gt;
** Address 0000h ~ 3FFFh: ROM Page 0&lt;br /&gt;
** Address 4000h ~ 7FFFh: Memory Bank A (Page selected in [[83Plus:Ports:06|Port 06h]])&lt;br /&gt;
** Address 8000h ~ BFFFh: Memory Bank B (Page selected in [[83Plus:Ports:07|Port 07h]])&lt;br /&gt;
** '''83+ Basic''': Address C000h ~ FFFFh: RAM Page 0&lt;br /&gt;
** '''Everything else''': Address C000h ~ FFFFh: Page selected in [[83Plus:Ports:05|Port 05h]]&lt;br /&gt;
* Bit 0 set to select memory map mode 1. In mode 1 the RAM and ROM is mapped to CPU memory as follows:&lt;br /&gt;
** Address 0000h ~ 3FFFh: ROM Page 0&lt;br /&gt;
** Address 4000h ~ 7FFFh: RAM Page 0&lt;br /&gt;
** Address 8000h ~ BFFFh: Memory Bank A (Page selected in [[83Plus:Ports:06|Port 06h]])&lt;br /&gt;
** Address C000h ~ FFFFh: Memory Bank B (Page selected in [[83Plus:Ports:07|Port 07h]])&lt;br /&gt;
* Bits 1 and 2 control the hardware timer frequency. Setting both 0 sets the timer to the fastest speed, and both 1 is the slowest speed. The normal speed is with both bits 1.&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|+Frequency (Hz)&lt;br /&gt;
|-&lt;br /&gt;
!&amp;amp;nbsp;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|first timer&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|second timer&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|both enabled&lt;br /&gt;
|-&lt;br /&gt;
!value&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|83+SE 84+(SE)&lt;br /&gt;
|-&lt;br /&gt;
!00&lt;br /&gt;
|560||512||1120||1024||1680||1536&lt;br /&gt;
|-&lt;br /&gt;
!01&lt;br /&gt;
|248||227||497||455||746||682&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|170||156||344||315||517||473&lt;br /&gt;
|-&lt;br /&gt;
!11&lt;br /&gt;
|118||108||236||216||353||323&lt;br /&gt;
|}&lt;br /&gt;
* Bits 4~6 should be 1 on the 83+ and 83+SE, and 0 on the 84+ and 84+SE.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
The calculator uses mode 0 for normal operation. If you change the memory map mode be sure to change it back before returning control.&lt;br /&gt;
Also, do not switch from mode 0 to mode 1 inside the 4000h ~ 7FFFh range, as it will basically crash the calculator because RAM Page 0 will take over that section and RAM Page 0 cannot execute code.&lt;br /&gt;
&lt;br /&gt;
Interrupt timers seem to be independant of the CPU speed, so setting an SE calculator to 15mhz will not increase the timer frequency.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This example shows successful use of this port, switching to mode 1 and back. Mode 1 is the only way to execute code beyond address C000h on the 83+ Basic.  (Assumes code is running from 4000h (i.e. an application))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; in a, (7) ;Save current Bank B page because we'll trash it.&lt;br /&gt;
 push af&lt;br /&gt;
 in a,(6) ;Put this app's page into 8000&lt;br /&gt;
 out (7), a&lt;br /&gt;
 jp $ + 4003h ;This will actually jump to the next statement, but in Bank B.&lt;br /&gt;
 ld a, 77h ;Select mode 1 and keep the timer speed at normal...&lt;br /&gt;
 out (4), a ;Now we're in mode 1.&lt;br /&gt;
 ;We're still at 8000h here but we are back in Bank A.&lt;br /&gt;
 ;Now to go back.&lt;br /&gt;
 ld a, 76h ;I could dec a for this example, but...&lt;br /&gt;
 out (4), a ;Back in mode 0 and bank B.&lt;br /&gt;
 jp $ - 3FFDh ;Jump back to bank A.&lt;br /&gt;
 pop af&lt;br /&gt;
 out (7), a ;Restore bank B.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits and Contributions ==&lt;br /&gt;
* '''Dan Englender''': Originally documented memory map modes [http://www.detachedsolutions.com/forum/viewtopic.php?p=21593#21593 here]&lt;br /&gt;
* '''Michael Vincent''': For his docs [http://www.michaelv.org/programs/calcs/ports/port4.html here], which helped me figure out the interrupt device bits.&lt;br /&gt;
* '''James Montelongo''': For his docs [http://www.geocities.com/jimm09876/calc/port4.html here] on the hardware timer.&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B88</id>
		<title>83Plus:Hooks:9B88</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B88"/>
				<updated>2006-01-22T05:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: /* Synopsis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Hooks:By_Name|GetCSC Hook]] [[Category:83Plus:Hooks:By_Address|9B88 - GetCSC Hook]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Name:''' GetCSC ''(officially GetKey; there is some disagreement as to the appropriateness of both names)''&lt;br /&gt;
&lt;br /&gt;
'''Hook Pointer Block Address:''' [[83Plus:RAM:9B88|9B88]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4F7B|4F7B]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4F7E|4F7E]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Call BCALL:''' [[83Plus:BCALLs:4F78|4F78]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Active Flag:''' [[83Plus:Flags:34#Bit_0|0, (iy + 34h)]]&lt;br /&gt;
&lt;br /&gt;
This hook is called when the OS scans for keypad activity.  (Note, however, that it is only called when the OS is idle in the [[83Plus:BCALLs:4972|GetKey]] routine.)  It is called once before the key scan begins, and a second time after the keypad has been scanned.  It thus operates at a lower level than the [[83Plus:Hooks:9B84|Raw Key hook]], which operates on actual GetKey values.&lt;br /&gt;
&lt;br /&gt;
== Using the Hook ==&lt;br /&gt;
These different values, passed in A, determine what the hook should do.&lt;br /&gt;
&lt;br /&gt;
* 1Ah: Before the keypad is scanned&lt;br /&gt;
** Return with Z set and A = keycode to force a key to be &amp;quot;pressed.&amp;quot;&lt;br /&gt;
** Return with NZ set and A = 1Ah to scan the keypad normally.&lt;br /&gt;
* 1Bh: After the keypad is scanned&lt;br /&gt;
** B = scancode found (or 0 if no key pressed)&lt;br /&gt;
** Return with NZ set and A = scancode to be returned.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Officially named the &amp;quot;GetKeyHook&amp;quot; by ti83plus.inc.  Although it has been pointed out that it is only called during GetKey, referring to it as the &amp;quot;GetKeyHook&amp;quot; is rather misleading, because it deals only with raw scan codes (&amp;quot;GetCSC values&amp;quot;) as opposed to the full keypresses returned by GetKey (which depend, for example, on whether 2nd or Alpha are active.)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The following code will swap the 2nd and Alpha keys:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;GetKeyHook:&lt;br /&gt;
        .db 83h             ; Required for all hooks&lt;br /&gt;
        cp 1Bh              ; which condition?&lt;br /&gt;
        ret nz&lt;br /&gt;
        ld a,b              ; which key was pressed?&lt;br /&gt;
        cp skAlpha          ; was it Alpha?&lt;br /&gt;
        jr z,AlphaKey&lt;br /&gt;
        cp sk2nd            ; was it 2nd?&lt;br /&gt;
        ret nz&lt;br /&gt;
        ld a,skAlpha-1      ; change to Alpha&lt;br /&gt;
        inc a               ; set NZ&lt;br /&gt;
        ret&lt;br /&gt;
AlphaKey:&lt;br /&gt;
        ld a,sk2nd-1        ; change to 2nd&lt;br /&gt;
        inc a               ; set NZ&lt;br /&gt;
        ret&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits and Contributions ==&lt;br /&gt;
* '''Texas Instruments''' (thanks for all the confusing equates)&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B88</id>
		<title>83Plus:Hooks:9B88</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B88"/>
				<updated>2006-01-22T05:15:05Z</updated>
		
		<summary type="html">&lt;p&gt;RobbieMc: /* Using the Hook */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:83Plus:Hooks:By_Name|GetCSC Hook]] [[Category:83Plus:Hooks:By_Address|9B88 - GetCSC Hook]]&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
'''Name:''' GetCSC ''(officially GetKey; there is some disagreement as to the appropriateness of both names)''&lt;br /&gt;
&lt;br /&gt;
'''Hook Pointer Block Address:''' [[83Plus:RAM:9B88|9B88]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4F7B|4F7B]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4F7E|4F7E]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Call BCALL:''' [[83Plus:BCALLs:4F78|4F78]]&lt;br /&gt;
&lt;br /&gt;
'''Hook Active Flag:''' [[83Plus:Flags:34#Bit_0|0, (iy + 34h)]]&lt;br /&gt;
&lt;br /&gt;
This hook is called when the OS scans for keypad activity.  (Note, however, that it is only called when the OS is idle in the [[83Plus:BCALLs:4972|GetKey]] routine.)  It is called once before the key scan begins, and a second time if the scan finds a key pressed.  It thus operates at a lower level than the [[83Plus:Hooks:9B84|Raw Key hook]], which operates on actual GetKey values.&lt;br /&gt;
&lt;br /&gt;
== Using the Hook ==&lt;br /&gt;
These different values, passed in A, determine what the hook should do.&lt;br /&gt;
&lt;br /&gt;
* 1Ah: Before the keypad is scanned&lt;br /&gt;
** Return with Z set and A = keycode to force a key to be &amp;quot;pressed.&amp;quot;&lt;br /&gt;
** Return with NZ set and A = 1Ah to scan the keypad normally.&lt;br /&gt;
* 1Bh: After the keypad is scanned&lt;br /&gt;
** B = scancode found (or 0 if no key pressed)&lt;br /&gt;
** Return with NZ set and A = scancode to be returned.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Officially named the &amp;quot;GetKeyHook&amp;quot; by ti83plus.inc.  Although it has been pointed out that it is only called during GetKey, referring to it as the &amp;quot;GetKeyHook&amp;quot; is rather misleading, because it deals only with raw scan codes (&amp;quot;GetCSC values&amp;quot;) as opposed to the full keypresses returned by GetKey (which depend, for example, on whether 2nd or Alpha are active.)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The following code will swap the 2nd and Alpha keys:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;GetKeyHook:&lt;br /&gt;
        .db 83h             ; Required for all hooks&lt;br /&gt;
        cp 1Bh              ; which condition?&lt;br /&gt;
        ret nz&lt;br /&gt;
        ld a,b              ; which key was pressed?&lt;br /&gt;
        cp skAlpha          ; was it Alpha?&lt;br /&gt;
        jr z,AlphaKey&lt;br /&gt;
        cp sk2nd            ; was it 2nd?&lt;br /&gt;
        ret nz&lt;br /&gt;
        ld a,skAlpha-1      ; change to Alpha&lt;br /&gt;
        inc a               ; set NZ&lt;br /&gt;
        ret&lt;br /&gt;
AlphaKey:&lt;br /&gt;
        ld a,sk2nd-1        ; change to 2nd&lt;br /&gt;
        inc a               ; set NZ&lt;br /&gt;
        ret&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits and Contributions ==&lt;br /&gt;
* '''Texas Instruments''' (thanks for all the confusing equates)&lt;/div&gt;</summary>
		<author><name>RobbieMc</name></author>	</entry>

	</feed>