Disaster

author: 'Matthias Vandersanden'
version: '1.0'
summary: 'Horner''s method is a algorithm to divide a polynom by (x-a) ( From wikipedia:[In mathematics, Horner''s method is either of two things: (i) an algorithm for calculating polynomials, which consists of transforming the monomial form into a computationally efficient form;[2] or (ii) a method for approximating the roots of a polynomial. The latter is also known as Ruffini–Horner''s method.])'
description: 'A simple graphical program to use Horner''s method. There may be some bugs. Coefficients and a''s are inputted in this form => a,b,c,d,e…. max 7 coefficients.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: bb
image: 'archiveimage:screen02-1/SCREEN02.BMP'
fileSize: '933'
fileSizeUnit: '1'

author: 12Me21
version: '8.1'
summary: 'Fast 2D Minecraft-ish game.'
description: "I wanted to make a game that would be fast enough to be fun to play, and I mostly succeeded.\n\nFeatures:\nSaving/Loading levels \nGravity\nMovement\nPlacing/Removing Blocks\nPlayer Location Saves\nRandomly Generated Terrain\nSeed Input\nNEW:\nTerrain Generator Customization\nHelp Menu\n\n\nControls:\nArrow keys: Move left/right and jump\nDEL: Climb up (move 2 pixels up)\nSTAT: Climb down (move 2 pixels down)\n1,2,3,4,6,7,8,9: Place/Remove \"Blocks\" (ex: 8 places/removes the block directly above the player.)\nSTO->: Pause Menu\nON: Quit without saving\n\nNotes:\nPlayer coordinates are saved in List \"TC\"\nIf you fall off the screen, the game will crash.\nYou can fly by holding the up button or by tapping the up and DEL buttons.\nTrying to load files that don't exist will cause the game to crash (Duh)\n\n\n"
graphics: '0'
platform: '1'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '1191'
fileSizeUnit: '1'

```cpp code block
```

author: 'Denis M'
version: '2.0'
summary: 'This program converts between the base 2, base 10 and base 16 numeral systems. [UPDATE: REDUCED IN SIZE (A LOT)]'
description: 'This program converts between the base 2, base 10 and base 16 numeral systems, A.K.A. binary, decimal and hexadecimal. Written in pure TI-Basic. That''s all it does. Have fun with it!'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: bb
image: 'archiveimage:bdhcnvrt-2/BDHCNVRT.gif'
fileSize: '1286'
fileSizeUnit: '1'

 Oct 10 — Silver Phantom was made a site moderator due to his commitment and dedication to the forum.
 Oct 10 — Toothless the Dragon was made a site moderator due to his commitment and dedication to the forum.

Routine Summary

Converts a String into a List

Inputs

Str1

Outputs

L₁

Variables Used

A,B, Str0, Str1, L₁

Calculator Compatibility

TI-83/84/+/SE

Author

Toothless the Dragon

``````" ABCDEFGHIJKLMNOPQRSTUVWXYZ->Str0
DelVar L1
int(length(Str1)/7->dim(L1
For(A,0,dim(L1
0
For(B,1,min(7,length(Str1)-7A
Ans+.1^(2B)inString(Str0,sub(Str1,B+7A,1
End
Ans->L1(A+1
End
"```
```

This code was made as an alternative to the string-to-list code. it works in conjunction with the list to string alternative.

# Related Routines

Routine Summary

Converts a List into a String

Inputs

L₁

Outputs

Str1

Variables Used

A, B, C, Str0, Str1, L1

Calculator Compatibility

TI-83/84/+/SE

Author

Toothless the Dragon

``````" ABCDEFGHIJKLMNOPQRSTUVWXYZ->Str0
" ->Str1
For(A,1,dim(L₁
L₁(A->B
For(C,1,7
Str3+sub(Str0,int(100B),1->Str1
fPart(100B->B
If not(int(100Ans
8->C
End
End
sub(Str1,2,length(Str1)-1->Str1
"```
```

This code was made as an alternative to the previously existing list-to-string code.

# Related Routines

author: N/A
version: N/A
summary: 'Chemistry and Physics Program'
description: 'THIS PROGRAM HAS MOVED! It may now be found Here'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '1'
compatibility: bb
image: null
fileSize: '2318'
fileSizeUnit: '1'

author: 'Robert Black'
version: '0.1'
summary: '2-dimensional Minecraft!'
description: "I've finished!\n2-dimensional Minecraft on a calculator!\nPress arrow keys to move, press 4,2,6, and 8 to move your selector thing around (the thing you use to place and destroy blocks), Mode to switch between place and destroy modes.\nThere is gravity, but you have infinite blocks. This program is not slow like most of my other ones.\nThis program doesn't include blocks that have any function, but I will add it as soon as I remove the letter graphics.\nCan someone show me how to convert this program from the Home Screen to the graph? I know a way, but it takes over 5 minutes for the program to redraw the screen.\nIf you have played this, please comment, I want to see how many people have used this.\n\n[[code]]\n:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]→[A]\n:5→X\n:1→Y\n:5→L\n:1→M\n:5→A\n:5→B\n:5→N\n:5→O\n:1→P\n:1→H\n:1→R\n:While 1\n:getKey→K\n:X-(K=24 and [A](Y,X-1)=0)+(K=26 and [A](Y,X+1)=0)→X\n:If K=25 and not([A](Y+1,X) = 0)\n:Then\n:For(W,1,3\n:If Y>1\n:Then\n:If [A](Y,X)=0\n:Y-1→Y\n:End\n:End\n:End\n:If Y<8 and [A](Y+1,X)=0\n:Y+1→Y\n:If K=22\n:Then\n:If P=1\n:Then\n:0→P\n:Else\n:1→P\n:End\n:End\n:If K=83\n:Then\n:If P=0\n:Then\n:0→[A](B,A\n:Output(B,A,\" \"\n:End\n:If P=1\n:Then\n:H→[A](B,A //Sorry for the earlier mistake, fixed now\n:Output(B,A,H\n:End\n:End\n:If R=1\n:Then\n:0→R\n:ClrHome\n:For(V,1,16\n:For(W,1,8\n:If not([A](W,V)=0)\n:Output(W,V,[A](W,V\n:End\n:End\n:End\n:If [A](M,L)=0\n:Then\n:Output(M,L,\" \"\n:Else\n:Output(M,L,[A](M,L\n:End\n:X→L\n:Y→M\n:If [A](O,N)=0\n:Then\n:Output(O,N,\" \"\n:Else\n:Output(O,N,[A](M,L\n:End\n:X→N\n:Y→O\n:If (K=82 and A>1) or (K=84 and A<16) or (K=73 and B>1) or (K=93 and B<8)\n:Then\n:If [A](B,A)=0\n:Then\n:Output(B,A,\" \"\n:Else\n:Output(B,A,[A](B,A\n:End\n:If K=82\n:A-1→A\n:If K=84\n:A+1→A\n:If K=73\n:B-1→B\n:If K=93\n:B+1→B\n:Output(B,A,\"O\n:End\n:Output(Y,X,\"*\n:End\n[[/code]]"
graphics: '0'
platform: '1'
puzzle: '0'
rpg: '1'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Robert Black'
version: '1.0'
summary: 'Classic Minesweeper game'
description: "Hello, I'm back.\nThis is a game exactly like Minesweeper.\nPress the arrow keys to move your selector thingy.\nPress Clear when you think you have won.\nPress Enter to chose a space.\n[[code]]\n:{16,16→dim([A] //sorry for the long matrix :) Fixed\n:For(W,1,20\n:1→[A](randInt(1,8),randInt(1,16\n:End\n:ClrHome\n:8→X\n:4→Y\n:While 1\n:getKey→K\n:If not([A](Y,X)=2)\n:Output(Y,X,\" \"\n:X-(K=24 and X>1)+(K=26 and X<16)→X\n:Y-(K=25 and Y>1)+(K=34 and Y<8)→Y\n:Output(Y,X,\"O\n:If K=105 or [A](Y,X)=2\n:Then\n:0→G\n:If X>1\n:Then\n:If [A](Y,X-1)=1\n:G+1→G\n:End\n:If X<16\n:Then\n:If [A](Y,X+1)=1\n:G+1→G\n:End\n:If Y>1\n:Then\n:If [A](Y-1,X-1)=1 //You might have to change Y-1 to Y+1, I can't remember\n:G+1→G\n:End\n:If Y<8\n:Then\n:If [A](Y+1,X-1)=1 //You might have to change Y+1 to Y-1, I can't remember\n:G+1→G\n:End\n:If [A](Y,X)=1\n:Then\n:Pause \"YOU LOSE\n:Output(8,1,9\n:End\n:Output(Y,X,G\n:2→[A](Y,X\n:1→X\n:1→Y\n:0→G\n:End\n:If K=45\n:Then\n0→G\n:For(H,1,16\n:For(I,1,8\n:If [A](I,H)=0\n:1→G\n:End\n:End\n:If G=0\n:Pause \"YOU WIN!\n:Output(8,1,9\n:End\n:End\n:End\n[[/code]]"
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

Routine Summary

A program that factors a quadratic using the inspection method.

Inputs

A,B,C

Outputs

L1

Variables Used

A,B,C,P,F,L,N,M,J,O,I,L1

Calculator Compatibility

TI-83/84/+/SE

Author

b2jammer

``````:Prompt A,B,C
:AC→P:A→F:C→L
:1→N:1→M
:If (P<0) or (B<0):Then
:-1→N
:-1→M
:End
:For(J,M,N*abs(P),N)
:J+(J=0)→J
:If fPart(P/J)=0 and (P/J)+J=B:Then
:J→I
:(P/J)→O
:N*abs(P)→J
:End
:End
:{0,0,0,0→L1
:1-2(F<0)
:Ansgcd(abs(F),abs(O→L1(1
:1-2(I<0)
:Ansgcd(abs(I),abs(L→L1(2
:1-2(F<0 xor A<0)
:Ansgcd(abs(F),abs(I→L1(3
:1-2(O<0 xor B<0)
:Ansgcd(abs(O),abs(L→L1(4
:Disp "(AX+B)(CX+D)
:Disp "{A,B,C,D}
:(L1(1)L1(3)=A)
:Ans(L1(1)L1(4)+L1(2)L1(3)=B)
:Ans(L1(2)L1(4)=C)
:AnsL1```
```

A program that takes the coefficients of a quadratic function and factors it using the Factoring by Inspection method, storing the new coefficients to L1.

author: 'Robert Black'
version: '1.0'
summary: 'There are two bridges, you are trying to shoot the other person, you can damage their bridge by shooting it, you can repair it by trying to walk off.'
description: "There are two bridges, you are trying to shoot the other person, you can damage their bridge by shooting it, you can repair it by trying to walk off.\nThe enemy has an insanely smart AI, and this program is so insanely fast you'll never recover, and, for once, I don't need help making it faster!\nIt's faster because the screen doesn't redraw itself.\nI finally created a game more frustrating than flappy bird! >:)\nI WILL FINISH THIS PAGE SOON\n(sorry it is taking so long to finish this, but my friend has the calculator with the coding on it, and he keeps forgetting to bring it to school)\n\n\n:ClrHome\n:Disp \"----\"\n:For(A,1,16\n:Output(8,A,\"-\n:End\n:{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}→⌊1\n:{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}→⌊2\n:3→W\n:0→E\n:13→X\n:16→A\n:8→B\n:16→C\n:1→D\n:While 1\n:getKey→K\n:If X>1\n:Then\n:If K=24\n:Then\n:If ⌊1(X-1)=1\n:Then\n:Output(8,X,\"-\n:X-1→X\n:Else\n:If randInt(1,5) = 5\n:Then\n:Output(8,X,\"-\n:1→⌊1(X-1\n:X-1→X\n:End\n:End\n:End\n:End\n:If X<16\n:Then\n:If ⌊1(X+1)=1\n:Then\n:Output(8,X,\"-\n:X+1→X"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: ThinkManify
version: v1.0
summary: 'Shows a model of a prism in 3D.'
description: "This program is able to rotate and resize a model, and also change its vertex count.\nIt isn't the fastest - neither is it smooth, but that's kind of a restriction on the calculator's hardware.\nOnly assembly would make ik quicker, although I'm not experienced in that language.\n\nA port can be made to TI-84+ calculators - the only reason it isn't for the non-color calculators is the drawing coordinates;\nTI-84+C calculators have a resolution almost 3 times bigger than the regular TI-84's.\nWith enough notice I'll create such a version.\n\n====CONTROLS====\n[ENTER]: Quit program\n[(] or [)]: Change vertexcount. This is for the top and bottom face only.\n[Arrow keys]: Rotate model.\n[-] or [+]: Change model size."
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: ff
image: 'archiveimage:rot3d/Rot3D.gif'
fileSize: '1202'
fileSizeUnit: '1'

author: 'Robert Black'
version: '1.0'
summary: 'Calculator etch-a-sketch'
description: "Hello, back from my garden.\nI made a simple etch-a-sketch program.\nPress the arrows to move.\nPress Delete to clear screen.\n\n\n:8→X\n:4→Y\n:While 1\n:getKey→K\n:If K=24\n:Then\n:Output(Y,X,\"O\n:X-1→X\n:Output(Y,X,\"*\n:End\n:If K=25\n:Then\n:Output(Y,X,\"O\n:Y-1→Y\n:Output(Y,X,\"*\n:End\n:If K=26\n:Then\n:Output(Y,X,\"O\n:X+1→X\n:Output(Y,X,\"*\n:End\n:If K=34\n:Then\n:Output(Y,X,\"O\n:Y+1→Y\n:Output(Y,X,\"*\n:End\n:End"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Robert Black'
version: '1.0'
summary: 'Shoot asteroids'
description: "Hi.\nI'm back.\nThis is a really fun but slow game, I would appreciate it if anyone could tell me how to make it faster.\nThe download doesn't work.\nI created this program before I knew how to use For loops, sorry.\nYou are the letter H at the bottom, you press the left and right arrows to move, and the up arrow to shoot.\nYou can only have one bullet on the screen at one time.\nI am working on making it faster.\nThank you.\n\n\n:1→L\n:0→Z\n:8→X\n:0→P\n:{15,2,7,13,5,6,9,11,3,8}→⌊1\n:{1,2,3,4,3,2,1,2,3,2}→⌊2\n:{1,1,1,1,1,1,1,1,1,1}→⌊3\n:{1,1,1,1,1,1,1,1,1,1}→⌊4\n:16→A\n:8→B\n:0→W\n:{0,50,100,200,400}→⌊5\n:0→V\n:While Z=0\n:getKey→K\n:0→W\n:If K=24\n:Then\n:X-1→X\n:End\n:If K=26\n:X+1→X\n:If K=25\n:Then\n:If B=8\n:Then\n:X→A\n:7→B\n:End\n:End\n:0→W\n:While not(W=10)\n:W+1→W\n:If A=⌊1(W) and B=⌊2(W)\n:Then\n:⌊3(W)-1→⌊3(W)\n:16→A\n:8→B\n:If ⌊3(W)=0\n:Then\n:randInt(1,15)→⌊1(W)\n:1→⌊2(W)\n:P+((⌊4(W)*⌊4(W))*10)→P\n:randInt(1,L)→⌊3(W)\n:⌊3(W)→⌊4(W)\n:End\n:End\n:End\n:If X=16\n:Then\n:15→X\n:End\n:If X=0\n:Then\n:1→X\n:End\n:If not(Z=V)\n:Then\n:Disp \"YOU FINISHED\"\n:Disp \"LEVEL\"\n:Pause V\n:Z→V\n:End\n:0→W\n:While not(W=5)\n:W+1→W\n:If P>= ⌊5(W)\n:Then\n:W→L\n:End\n:End\n:0→W\n:While not(W=10)\n:W+1→W\n:If ⌊1(W) = X and ⌊2(W)=8\n:Then\n:If not(L=5)\n:Then\n:While 1\n:Disp P\n:End\n:End\n:End\n:End\n:0→W\n:While not(W=10)\n:W+1→W\n:If ⌊3(W)=1\n:Then\n:Output(⌊2(W),⌊1(W),\"A\n:End\n:If ⌊3(W)=2\n:Then\n:Output(⌊2(W),⌊1(W),\"B\n:End\n:If ⌊3(W)=3\n:Then\n:Output(⌊2(W),⌊1(W),\"C\n:End\n:If ⌊3(W)=4\n:Then\n:Output(⌊2(W),⌊1(W),\"D\n:End\n:If ⌊3(W)=5\n:Then\n:Output(⌊2(W),⌊1(W),\"E\n:End\n:End\n:0→W\n:Output(8,X,\"H\n:Output(B,A,\"O\n:While not(W=10)\n:W+1→W\n:⌊2(W)+1→⌊2(W)\n:End\n:If not(B=8)\n:Then\n:B-1→B\n:End\n:0→W\n:While not(W=10)\n:W+1→W\n:If ⌊2(W)>8\n:Then\n:1→⌊2(W)\n:randInt(1,15)→⌊1(W)\n:randInt(1,L)→⌊3(W)\n:⌊3(W)→⌊4(W)\n:End\n:End\n:If B=1\n:Then\n:16→A\n:8→B\n:End\n:Output(1,1,P\n:End"
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Ramm, Bernd'
version: '1.0'
summary: 'Analyses the german plate load test for soil testing. In german it is called "Lastplattendruckversuch".'
description: "The program consists of three parts (LPlatte, LPlatte1, LPlatte2) and will only work with all parts. The asked inputs are written in german. The results are the deformtionmodule\nEV1 and EV2 and the ratio between the two results."
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: bb
image: null
fileSize: '2372'
fileSizeUnit: '1'

author: 123outerme
version: '1.3'
summary: 'An Adventure game with RPG and Puzzle elements. Collect the ten Ancient Uvutian artifacts and save the world from the mischevious group, the Terrors! This game can run from the TI-83+ to the TI-84+CSE. Enjoy it on all platforms!'
description: 'A dungeon crawler RPG with action and puzzle elements. As an unarmed, regular civilian, go on an epic quest to defeat a mischievous group called the Terrors and bring peace back to the world. This game is fully compatible with non-color and color calculators; you can use the same game files for both the +C and non-color calcs.'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '1'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:screenshot/screenshot.gif'
fileSize: '10695'
fileSizeUnit: '1'

|author=TDecker

|size=690 bytes

|description=Flappybird with endless levels of hardness

# The Code

:0->S
:0->G
:Zstandard
:Zinteger
:For(A,-47,-35
:Vertical A
:End
:For(A,47,35,-1
:Vertical A
:End
:For(A,-20,20
:Line(A,7,A,0,0
:End
:0->V
:Lbl L
:L+1->L
:2->F
:Text(25,25,"LEVEL: ",L
:Text(40,15,"PRESS ANY KEY"
:Repeat getkey
:End
:Text(25,25," " //40 spaces
:Text(40,15," " //50 spaces
:For(M,1,15
:S+50+abs(R)->S
:For(A,35,-35,-3
:Vertical A
:Line(A,R,A,R+15-1.5L,0
:Line(A-3,31,A-3,-31,0
:getkey->K
:If K=45
:Goto Q
:If K=25
:6->F
:F-2->F
:V->U
:V+F->V
:pt-off(-18,U,3
:pt-off(-15,U,2
:pt-on(-18,V,3
:pt-on(-15,V,2
:-V+31->P
:If P<0 or P>62
:Goto Q
:If pxl-test(P,32
:Goto Q
:End
:End
:Goto L
:Lbl Q
:If K=45
:Then
:Clrdraw
:Clrhome
:Return
:End
:For(A,1,12
:Line(-15,V,-15+randint(-7,7),V+randint(-7,7)
:End
:Clrdraw
:Text(-1,25,12,"SCORE: ",LS

author: 'Robert Black'
version: '1.0'
summary: 'A mix between Pong and Brick-Breaker'
description: "Part 2 is where you are trying to get through the city walls. You control the paddle on the bottom, and the calculator controls the paddle on the top. If you get the ball past the paddle on top, it smashes part of the wall and you need to get the ball through there. This is a modified version of a program I found online. (The original coding only had one paddle (yours), and there wasn't a way to win)\n>= is greater than or equal to.\nIf you played this game, please comment, I want to see how many people have played this.\n\n:Delvar C\n:Delvar G\n:{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}→⌊1\n:7→A\n:8→B\n:1→D\n:5→I\n:randInt(1,2)→J\n:0→Q\n:-1→E\n:6→F\n:While not(C\n:ClrHome\n:0→W\n:Output(A,B,\".\n:Output(8,F,\"—\n:Output(2,I,\"==\n:Q+1→Q\n:If Q=J\n:Then\n:1→J\n:0→Q\n:randInt(1,5)→S\n:If S=1\n:Then\n:3→J\n:End\n:B→I\n:End\n:If A=1\n:-D→D\n:If A=7\n:Then\n:If B>=F-1 and B<=F+2\n:-D→D\n:End\n:If A=3\n:Then\n:If B>=I-1 and B<=I+2\n:Then\n:abs(D)→D\n:End\n:End\n:If A=2\n:Then\n:While not(W=16\n:W+1→W\n:If B=W\n:Then\n:If ⌊1(W)=0\n:Then\n:Pause \"YOU WON PART 2!\n:Output(100,100,\"P\n:End\n:If ⌊1(W)=1\n:Then\n:0→⌊1(W\n:End\n:End\n:End\n:End\n:0→W\n:While not(W=16\n:W+1→W\n:If ⌊1(W)=1\n:Then\n:Output(1,W,\"-\n:End\n:End\n:If B=1 or B=16\n:-E→E\n:(A=8)→C\n:A+D→A\n:B+E→B\n:getKey→K\n:F+(K=26 and F<13)*2-(K=24 and F>1)*2→F\n:End\n:Pause \"YOU LOSE\"\n:ClrHome\n:Output(1,1,\"\")"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Robert Black'
version: '1.0'
summary: 'Save the existence of cheese!'
description: "Cheese Quest is a game where someone kills all the cows on the world except 2, which he captures, so he can get rich off the only cheese supply in the world. Part 1 is crossing the dangerous terrain to reach his fortress.\nCheese Quest part 2 is coming soon. EDIT: Part 2 is here!\nPress up to jump.\nThere is a glitch where the platforms turn invisible when they reach the left side of the screen…\n\n:ClrHome\n:{3,5,8,10,13}→⌊1\n:{2,3,4,5,7}→⌊2\n:7→Y\n:0→Z\n:0→W\n:0→B\n:0→V\n:Lbl AA\n:Z+1→Z\n:For(W,1,5\n:⌊1(W)-1→⌊1(W)\n:End\n:ClrHome\n:For(W,1,5\n:Output(⌊2(W),⌊1(W),\"-\n:End\n:Output(Y,4,\"*\n:getKey→K\n:For(W,1,5\n:If ⌊1(W)=4 or ⌊1(W)=3 or ⌊1(W)=2 or ⌊1(W)=1 or ⌊1(W)=0\n:Then\n:If ⌊2(W)=Y-1\n:Then\n:If K=25\n:Then\n:2→B\n:End\n:If not(K=25\n:Then\n:0→B\n:End\n:End\n:End\n:Y+B→Y\n:If Y<1\n:Then\n:Output(100,100,\"P\n:End\n:If B>-1\n:Then\n:B-1→B\n:End\n:If not(Z>99\n:Goto AA\n:Disp \"GOOD JOB!\"\n:Disp \"YOU FINISHED\"\n:Pause \"PART 1!\""
graphics: '0'
platform: '1'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Robert Black'
version: 0.9.0
summary: 'A frogger clone'
description: "Hi\nI decided to make a frogger clone.\nI don't know how to allow people to download, so you'll have to type in the coding yourself.\nPretend <= is less than or equal to .\nSadly, I won't be able to contribute to this website during the summer, because my dad makes me work in my garden all day(hey, not every programmer has to be an adult).\n\n:8→X\n:0→Z\n:8→Y\n:{14,12,7,2,3,9,4,11,6,13,1,15}→⌊1\n:{2,2,3,3,4,4,5,5,6,6,7,7}→⌊2\n:0→W\n:While Z=0\nWhile not(W=16\n:W+1→W\n:If ⌊1(W)>16\n:1→⌊1(W)\n:randInt(2,7)→⌊2(W)\n:If ⌊1(W)<1\n:16→⌊1(W\n:randInt(2,7)→⌊2(W\n:End\n:If ⌊1(W)<=1\n:Then\n:1→⌊1(W\n:randInt(2,7)→⌊2(W\n:End\n:End\n:0→W\n:While not(W=12\n:W+1→W\n:If ⌊2(W)=2 or ⌊2(W)=4 or ⌊2(W)=6\n:Then\n:⌊1(W)+1→⌊1(W\n:End\n:If ⌊2(W)=3 or ⌊2(W)=5 or ⌊2(W)=7\n:Then\n:⌊1(W)-1→⌊1(W\n:End\n:End\n:getKey→K\n:If K=24\n:Then\n:X-1→X\n:End\n:If K=34\n:Then\n:Y=1→Y\n:End\n:If K=26\n:Then\n:X+1→X\n:End\n:If K=25\n:Then\n:Y-1→Y\n:End\n:0→W\n:ClrHome\n:While not(W=12\n:W+1→W\n:If ⌊1(W)>=1 and ⌊1(W)<=16\n:Then\n:Output(⌊2(W),⌊1(W),\"====\n:End\n:End\n:0→W\n:Output(Y,X,\".\n:While not(W=12\n:W+1→W\n:If X=⌊1(W) or X=⌊1(W)+1 or X=⌊1(W)+2 or X=⌊1(W)+3\n:Then\n:If Y=⌊2(W\n:Then\n:If not(⌊2(W)=2 and ⌊2(W)=7\n:Then\n:While 1\n:Disp C\n:End\n:End\n:End\n:End\n:End\n:0→W\n:If Y=1\n:Then\n:If D=1\n:Then\n:C+1→C\n:2→D\n:End\n:End\n:If Y=8\n:Then\n:If D=2\n:Then\n:C+1→C\n:1→D\n:End\n:End\n:End\n\n\nI know it is insanely slow, does anyone know how to make this program faster?"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '0'
fileSizeUnit: '1'

author: 'Robert Black; Code edited and optimized by Trenly'
version: 2.0.1
summary: "A flappy bird clone\n"
description: "+ This program has been remade. To see the remake, visit the Flappy Bird 2 page.\nHi, this is my first post to this site! I knew how to program in Python, which got me interested in learning TI-Basic. Within 2 hours of knowing that Ti-Basic existed, I made a flappy bird game. The program might have a few bugs (I programed it from scratch on my friend's calculator, so I don't have it with me), so if you find any bugs, please edit this page to remove them if you can figure out where they are.\n\nInstead of the game plainly ending when you die, it returns an error message.\n\nPlease comment if there is something wrong with the program.\n\nNote: The download link doesn't work, you'll have to type in the code by hand.\nEDIT: I borrowed my friend's calculator, here is the actual coding: (other coding was deleted)\nANOTHER EDIT: Now has a scoring system\n\n[[code]]\n:1→Y\n:16→A\n:1→B\n:5→E\n:0→Z\n:Lbl G\n:getKey→K\n:A-1→A\n:randInt(2,7)→D\n:ClrHome\n:If not(A:16→A\n:If not(A=16:0→B\n:If A=16:1→B\n:If B=1:D=E\n:If K=25:Y-1→Y\n:If not(K=25:Y+1→Y\n:Output(Y,3,\"0\n:For(I,1,8)\n:Output(I,A,\"H\n:End\n:Output(E,A,\" \"1 space\n:Output(E+1,A,\" \"1 space\n:If A=3\n:Then\n:If not(Y=E) and not(Y=E+1\n:Output(10,10,\"P\n:Output(1,8,Z\n:Z+1→Z\n:End\n:Goto G\n[[/code]]"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: bb
image: null
fileSize: '300'
fileSizeUnit: '1'

author: Zachatoo
version: V1.3.7
summary: 'Dungeon Crawler compatible with TI-83 and upTI-84CSE! Hope you guys enjoy! '
description: 'Classic dungeon crawler on the home-screen (for portability). Further work on project is based on ''fanbase'' and time available. Game is based on you being a snake trying to escape a cave that you found yourself lost in. Can you use your intellect and the objects around you in order to get out?'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '1'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: ff
image: 'archiveimage:screen-image-cave/SCREEN_IMAGE_CAVE.PNG'
fileSize: '1119'
fileSizeUnit: '1'

author: TI123outerme
version: '1.2'
summary: 'A semi-text based adventure. You go on an quest to avenge your burned-down home.'
description: "This game is somewhat text-based, but support for basic pixel graphics may be coming soon.\nThis game includes features such as a tournament, the ability to buy new weapons and HP, a fighting system, and much more!\nThe screenshot shows the game's title screen working and centered on a TI-84+CSE, but there's an option at the beginning to center it on the TI-83+ and up calculators. If you are having trouble with downloading or running any of the programs or subprograms, you can find the individual programs and documentation here: https://www.dropbox.com/sh/h4ruxl1obyjs2qn/AAAJGwiLEfaxheRSuNsz-mUQa"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '1'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: 'archiveimage:terrorstitlescreen/TERRORSTITLESCREEN.GIF'
fileSize: '5792'
fileSizeUnit: '1'

author: 'Timothy Foster'
version: '1.0'
summary: 'This Snake game is not like the normal snake game. In this game, you are trying to outlive your opponent, a basic AI, by not running into any walls or plus signs. The longer you last, the more points you earn. You also earn points by collecting donut like squares. The moment you collide with a wall, a plus sign, your tail, or your opponent''s tail, you lose and the game ends.'
description: "This Snake game is not like the normal snake game. In this game, you are trying to outlive your opponent, a basic AI, by not running into any walls or plus signs. The longer you last, the more points you earn. You also earn points by collecting donut like squares. The moment you collide with a wall, a plus sign, your tail, or your opponent's tail, you lose and the game ends.\n\nAs you move, you create a wall behind you which permanently remains there. You continue in a straight path until you change direction with the press of one of the arrow keys. If the AI runs into a wall, you progress to the next level.\n\nThis game features a title screen, quick and addictive game play, and a highscore system. Have fun!\n\nIf you need to quit while in the middle of program operation, press CLEAR.\n\nThis program was my entry for Challenge 8."
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:snake/SNAKE.BMP'
fileSize: '994'
fileSizeUnit: '1'

author: Mapar007
version: '1.0'
summary: 'This is a program to create data sheets and read them. You must input a random code of 6 letters/numbers which form your personal ID. It will make secure that nobody else can read your data sheets on their calculator!'
description: "This is a program to create data sheets and read them. You must input a random code of 6 letters/numbers which form your personal ID. It will make secure that nobody else can read your data sheets on their calculator!\n\n(note:do not pick MNEMON as a code, unless you want everyone to be able to read your files!)"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
image: 'archiveimage:cht1/CHT1.BMP'
fileSize: '1073'
fileSizeUnit: '1'

author: 7thAce
version: '1.0'
summary: 'This is a game package. There are 4 games in there now, and 4 more will be coming. Press 2nd to play them all in order. Just read the readme :)'
description: 'This is a game package. There are 4 games in there now, and 4 more will be coming. Press 2nd to play them all in order. Just read the readme :)'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:minigames/minigames.bmp'
fileSize: '7856'
fileSizeUnit: '1'

author: 'Edward H'
version: '1.0'
summary: 'Balances chemical equations, inputted as a string.'
description: 'Balances chemical equations, inputted as a string.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: bb
image: 'archiveimage:chemical/chemical.gif'
fileSize: '928'
fileSizeUnit: '1'

author: Architeuthiskid
version: '1.0'
summary: 'In collect, you go around and collect the dots that appear as soon as you eat the previous one. It is almost exactly the same as snake, with the major difference that the dot does NOT grow. If you move 100 times, or hit one of the walls, it''s game over. For further info, look at the readme. Remember, this is a beta version, so it is lacking in many features that I will add later.'
description: 'In collect, you go around and collect the dots that appear as soon as you eat the previous one. It is almost exactly the same as snake, with the major difference that the dot does NOT grow. If you move 100 times, or hit one of the walls, it''s game over. For further info, look at the readme. Remember, this is a beta version, so it is lacking in many features that I will add later.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:collect/collect.bmp'
fileSize: '3000'
fileSizeUnit: '1'

author: Builderboy
version: '2005'
summary: 'In Six Differences, you attempt to find the six differences in the two pictures displayed side by side on your calculator. Has 9 well designed levels, with a feature to install multiple level packs, AND a custom level editor. Uses a revolutionary system to store levels as a series of lines, which eliminates the need for picture variables, allowing the entire game to be hosted in One Program!'
description: 'An Angel production! In Six Differences, you attempt to find the six differences in the two pictures displayed side by side on your calculator. Has 9 well designed levels, with a feature to install multiple level packs, AND a custom level editor. Uses a revolutionary system to store levels as a series of lines, which eliminates the need for picture variables, allowing the entire game to be hosted in One Program! Create your own levels! Install new level packs! Find the Differences!!'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:sixdiff/sixdiff.gif'
fileSize: '4152'
fileSizeUnit: '1'

author: Builderboy
version: '2005'
summary: 'The simple game of Spider entails arranging the pipes so the spider can crawl through them for as long as possible. There are 3 Difficulty settings which enable extra pipe sections, and make the spider move faster. A highscore table is avaailiable so you can boast to your Friends! An Angel Production.'
description: 'The simple game of Spider entails arranging the pipes so the spider can crawl through them for as long as possible. There are 3 Difficulty settings which enable extra pipe sections, and make the spider move faster. A highscore table is avaailiable so you can boast to your Friends! An Angel Production.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:spider/spider.gif'
fileSize: '2358'
fileSizeUnit: '1'

author: Mapar007
version: '1.0'
summary: 'A VERY upgraded version of Mnemon with better interface and remembering utilities.'
description: 'A VERY upgraded version of Mnemon with better interface and remembering utilities.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
image: 'archiveimage:phmain/PHMAIN.BMP'
fileSize: '4500'
fileSizeUnit: '1'

author: patriotsfan
version: '1.0'
summary: 'This program calculates quarterback ratings for four different leagues: NFL, CFL, NCAA, and AFL.'
description: 'This program calculates quarterback ratings for four different leagues: NFL, CFL, NCAA, and AFL.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '1'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
image: 'archiveimage:rating/RATING.gif'
fileSize: '975'
fileSizeUnit: '1'

author: 'Rhombus Productions'
version: '1.4'
summary: 'This program includes three games that has every thing to do with dots.'
description: "this program includes three games that has every thing to do with dots\n\nNew in version 1.4\n\n* Smaller\n* Faster\n* New Splash Screen\n\nNew in version 1.3\n\n* Runs Faster!\n* Size reduced by 600 bytes\n* bug fixes!\n"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: 'archiveimage:pythagorean-1/pythagorean.png'
fileSize: '4857'
fileSizeUnit: '1'

author: HJTP
version: '1.0'
summary: 'A program containing a digital timer and a digital and analog clock.'
description: 'A program containing a digital timer and a digital and analog clock.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: dd
image: 'archiveimage:show-analog-2/SHOW_ANALOG_2.JPG'
fileSize: '1500'
fileSizeUnit: '1'

author: Noahbaby94
version: '1.0'
summary: 'Have you played 15 square before? Well this is XSquare. You can create any size field between 2-5 for the length and 2-7 for the width. See the readme for more details.'
description: 'Have you played 15 square before? Well this is XSquare. You can create any size field between 2-5 for the length and 2-7 for the width. See the readme for more details.'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '1'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:xslider/xslider.gif'
fileSize: '1025'
fileSizeUnit: '1'

author: 'Rhombus Productions'
version: '1.0'
summary: 'Solves and shows you the work of every step of the distance, midpoint, and Pythagorean theorem formulas.'
description: 'Solves and shows you the work of every step of the distance, midpoint, and Pythagorean theorem formulas.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
image: 'archiveimage:pythagorean/pythagorean.png'
fileSize: '1703'
fileSizeUnit: '1'

author: 'N*E*V*E*M_X'
version: 1.1.4
summary: 'A basketball free throw emulator for the TI-83 to the TI-84+SE.'
description: 'A basketball free throw emulator for the TI-83 to the TI-84+SE.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '1'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: 'archiveimage:foulshot/foulshot.gif'
fileSize: '1548'
fileSizeUnit: '1'

author: 'N*E*V*U*M_X'
version: 1.0.2
summary: 'An optimized Tetris remake with extremely accurate controls, timings, and collision detections. Compare size and accuracy to BC''s Beta Tetris.'
description: 'An optimized Tetris remake with extremely accurate controls, timings, and collision detections. Compare size and accuracy to BC''s Beta Tetris.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:tetrix/tetrix.gif'
fileSize: '2267'
fileSizeUnit: '1'

author: 'Thomas P.'
version: '0.3'
summary: 'A chatprogramm for 2 calculators with a complex user interface. Both users have their own names and can even write messages at the same time.'
description: "A chatprogramm for 2 calculators with a complex user interface. Both users have their own names and can even write messages at the same time.\n\nWhen you've send a message and the calculator screens \"press enter\", wait 1 sec (the other calc needs time to update). This is the only bug I know in this program and I hope I'll find a solution soon."
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
compatibility: cc
image: 'archiveimage:chat/chat.gif'
fileSize: '900'
fileSizeUnit: '1'

author: Symphsoft
version: '3.5'
summary: 'This program is intended for teachers or anyone who wants to grade tests or exams. It is one of the first programs that I have written, but it is constantly being improved. Version 3.5 has a better user interface, and improved control.'
description: 'This program is intended for teachers or anyone who wants to grade tests or exams. It is one of the first programs that I have written, but it is constantly being improved. Version 3.5 has a better user interface, and improved control. This version is designed to work with the standard grading scale(eg. 100-93: A, 92-85: B, etc.), but for states with different grading scales, contact me. Email me at macperson84 AT mac DOT com.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
image: null
fileSize: '912'
fileSizeUnit: '1'

author: Builderboy
version: '2005'
summary: 'Vortex is a fun, challenging, turn-based multiplayer strategy game. The object of the game is to kill your opponent. You can go around collecting boxes of money and use them to buy upgrades, items, and weapons. The game also features a random level generator. Fully MirageOS compatible.'
description: 'Vortex is a fun, challenging, turn-based multiplayer strategy game. The object of the game is to kill your opponent. You can go around collecting boxes of money and use them to buy upgrades, items, and weapons. The game also features a random level generator. Fully MirageOS compatible.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:vortex/vortex.gif'
fileSize: '3964'
fileSizeUnit: '1'

author: Builderboy
version: '2005'
summary: 'The Beta version of the new Trapped game. Ungroup the file and run ALEV to install. Then run A to play. Tell me what you think!'
description: 'The Beta version of the new Trapped game. Ungroup the file and run ALEV to install. Then run A to play. Tell me what you think!'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '1'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: dd
image: 'archiveimage:trapped/trapped.GIF'
fileSize: '10079'
fileSizeUnit: '1'

author: Weregoose
version: '1.0'
summary: 'You have to navigate a scrolling tunnel for as long as possible.'
description: 'You have to navigate a scrolling tunnel for as long as possible. You can view and study the source on this page.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: null
fileSize: '356'
fileSizeUnit: '1'

version: '1.0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: cc
fileSize: '694'
fileSizeUnit: '1'

author: graphmastur
version: '2.0'
summary: 'This program will take the graphscreen and turn it into recallable lines.'
description: 'This program will take the graphscreen and turn it into recallable lines.'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
compatibility: dd
image: 'archiveimage:line-2-0-screenshot/line-2-0-screenshot.gif'
fileSize: '16'
fileSizeUnit: '2'

author: builderboy
version: '1.0'
summary: 'You wake up to find yourself trapped in the center of a fiendish maze filled with mystery and enemies that want to eat you. A mysterious friend and long forgotten notes guide you through the maze. Find items, blow up walls, fight logical enemies, and above all, find the machine that will help you escape.'
description: 'You wake up to find yourself trapped in the center of a fiendish maze filled with mystery and enemies that want to eat you. A mysterious friend and long forgotten notes guide you through the maze. Find items, blow up walls, fight logical enemies, and above all, find the machine that will help you escape.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '1'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: null
fileSize: '13932'
fileSizeUnit: '1'

author: 7thAce
version: '1.2'
summary: 'A Casino game where you roll 5 dice three times and try to accumulate the highest score with your rolls.'
description: 'A Casino game where you roll 5 dice three times and try to accumulate the highest score with your rolls. Played on the graph screen.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '1'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:yahtzee/yahtzee.gif'
fileSize: '4100'
fileSizeUnit: '1'

 Apr 18 — burr added all of the pending programs to the archives

author: 'James Kanjo'
version: '1.9'
summary: 'Bunny Gotchi is a virtual pet (a bunny rabbit) on your calculator, environmentally friendly bunny made up of only brackets and periods.'
description: "Bunny Gotchi is a virtual pet (a bunny rabbit) on your calculator.\nIt is an environmentally friendly bunny made up of only brackets and periods.\nBunny Gotchi uses interesting animation techniques with ASCII characters, to generate images.\nBunny Gotchi is a fun game which will challenge your efforts to keep it alive, healthy and happy!\n\nA nice feature of this game is a working demonstration of using TI-Basic to connect two calculators and they will distinguish automatically a client-host negotiation to prepare real-time animation."
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: 'archiveimage:bunnygotchi/BUNNYGOTCHI.gif'
fileSize: '5740'
fileSizeUnit: '1'

author: Builderboy
version: '2005'
summary: 'Peggle is a fun and addicting physics based game. The game consists of 9 levels composed of several different types of blocks. You are given 9 balls to shoot into the arena to try to hit as many blocks as possible, resulting in them being erased at the end of a turn. If all blocks are erased, you proceed to the next level.'
description: 'Peggle is a fun and addicting physics based game. The game consists of 9 levels composed of several different types of blocks. You are given 9 balls to shoot into the arena to try to hit as many blocks as possible, resulting in them being erased at the end of a turn. If all blocks are erased, you proceed to the next level. Sophisticated scoring also allows for highscores to be made even if a level is not beaten. You can choose to play as one of 4 characters, each character having there own powerup accessible by hitting a special block. With challenging gameplay, stunning graphics, and great replayability, Peggle is a must for all calculator gamers!'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '1'
utility: '0'
misc: '0'
compatibility: dd
image: 'archiveimage:screen01/SCREEN01.gif'
fileSize: '7300'
fileSizeUnit: '1'

author: 'Edward H'
version: '1.0'
summary: 'Nibbles is a version of snake, which is very graphical and very fast. This version of snake is unique because it doesn''t use any list variables to control the movement of the snake.'
description: 'Nibbles is a version of snake, which is very graphical and very fast. This version of snake is unique because it doesn''t use any list variables to control the movement of the snake.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: 'archiveimage:nibbles/nibbles.gif'
fileSize: '580'
fileSizeUnit: '1'

author: 'Mikhail Lavrov (Darkerline)'
version: '1.0'
summary: 'Donut Quest is a TI-Basic game of revolutionary quality. It uses no libraries of any kind, in fact, you don''t need anything other than the game program to play it. On each of eight levels, you must get to (and eat) all the donuts, then leave through an exit (unless given other instructions).'
description: 'Donut Quest is a TI-Basic game of revolutionary quality. It uses no libraries of any kind, in fact, you don''t need anything other than the game program to play it. On each of eight levels, you must get to (and eat) all the donuts, then leave through an exit (unless given other instructions).'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:donut-quest/donut-quest.gif'
fileSize: '10154'
fileSizeUnit: '1'

author: Builderboy
version: '1.0'
summary: 'In Portal, you are a test subject at The Aperture Science Enrichment Program and are testing The recent invention of the Portal Gun! Yay! It allows you to shoot portals and move between them. Those who have played the official version will remember GlaDos… And she''s back in the calculator version!'
description: 'In Portal, you are a test subject at The Aperture Science Enrichment Program and are testing The recent invention of the Portal Gun! Yay! It allows you to shoot portals and move between them. Those who have played the official version will remember GlaDos… And she''s back in the calculator version! GlaDOS is your narrator and guide and is the one that will monitor all your tests. But when the tests are over… Watch out! the game isn''t over yet…'
graphics: '0'
platform: '1'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: dd
image: 'archiveimage:screenshot2-1/SCREENSHOT2.gif'
fileSize: '9405'
fileSizeUnit: '1'

author: ''
version: ''
summary: ''
description: ''
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: bb
image: null
fileSize: '3'
fileSizeUnit: '1'

jonbush

Connect Four game with an AI. Temporarily removed.

Puzzle Strategy Board Misc

challenges:26/connect4.gif

connect4.zip

2031

author: 'Simon Alford'
description: "My take on the popular 2048 game.\n-Optimized for speed (not size)\n-Includes a high score\n-Lacks game-over detecting (for sake of speed)\n-Looks ugly because a nice GUI is too slow."
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '1'
utility: '0'
misc: '0'
image: 'archives:2048/2048.jpg'
size: '1548'
unit: '1'

author: Zachatoo
description: 'Pretty standard game. Gives you range between 1-100 and you input your guess until you get it correct. Features levels up to 10,000 with a mystery level!'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:guessing-game/screen_image.PNG'
size: '843'
unit: '1'

author: 'Magnus Groß'
description: "A Snake game, written in pure Basic\nIt uses the home screen."
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
size: '335'
unit: '1'

```span.pager-no {
display: none;
}
#main-content .form-table .form-value{  display: inline; }
#main-content .form-table .row-9 .form-value{
display: inline-block;
margin-right: 7px;
}
.form-table .form-value.field-fileSize{  display: inline-block; }
#edit-page-form input[type=text],
#edit-page-form textarea,
#edit-page-form .form-table{  width: 100%; }
#edit-page-form .form-labels{  width: 150px; }
.form-table .form-labels{  vertical-align: top; }

.row-5 .form-values .form-label{
display: inline-block;
width: 80px;
}

.do-not-notify{  display: none; }

.archive_Table{  width: 100%; }
.archive_InfoElementTitle{  width: 120px; }
.showWhenFail{  display: none; }

.archive_Image{
width: 200px;
/*  vertical-align: top;  */
}
.archive_Image img{
width: 192px;
height: 128px;
}
.archive_ImageFail img{  display: none; }

border: 1px solid #F66;
background: rgba(255, 190, 190, .8);
font-size: 125%;
margin: 0 1em 1em 10px;
text-align: center;
}

.genre0, .genre1{
display: inline-block;
}
.genre0{  display: none; }
```

author: 'Timothy Foster'
version: '1.1'
summary: 'This is minesweeper written in pure BASIC, no assembly. It takes advantage of three difficulty levels and a custom dimension setter. It also keeps track of the high score (or low score, rather) for each difficulty. With easy controls and relatively fast loading times, this program is worth trying! '
description: "This is minesweeper written in pure BASIC, no assembly. It takes advantage of three difficulty levels and a custom dimension setter. It also keeps track of the high score (or low score, rather) for each difficulty. With easy controls and relatively fast loading times, this program is worth trying! \n\nThe code is open source and free to use without my explicit permission."
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
compatibility: cc
image: 'archiveimage:minesweeperpic/MINESWEEPERPIC.BMP'
fileSize: '2530'
fileSizeUnit: '1'

author: kdnooij
description: 'The most addictive game is now made for the TI-84 Plus Calculator with nice graphics! Enjoy playing for a while! (maybe a bit longer than that)'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
size: '4107'
unit: '1'

Routine Summary

Calculates the day that Easter Sunday falls on any given year.

Inputs

Y - The year (any year at all)

Outputs

Ans - The day in March of Easter Sunday (plus 31 if the month is April)

Variables Used

Y, Ans

Calculator Compatibility

TI-83/84/+/SE

Author

John Horton Conway

eastercalculation.zip

``````:int(Y/ᴇ2
:50-30fPart((11(1+19fPart(Y/19))-Ans+int(Ans/4)+int(8(Ans+11)/25))/30
:If Ans=50 or Ans=49 and 11≤19fPart(Y/19
:Ans-1
:round(Ans+7-7fPart((int(23(3+(Ans>31))/9)+Ans-31(Ans>31)+2+Y+int(Y/4)-int(Y/ᴇ2)+int(Y/400))/7),0```
```

This is the TI-BASIC version of an Easter Calculation algorithm by John Horton Conway (famous for creating the cellular automata "The Game of Life"). After implementation of this program, 3+(Ans>31) is the month it occurs in, and Ans-31(Ans>31) is the day.

# Date Identification

This code, as it stands right now, displays the day of March it falls on (if it's over 31, then the day in April+31).

Append the following code to display the actual day:

``````:ClrHome
:Disp sub("MARCHAPRIL",1+5(Ans>31),5
:Output(1,7,Ans-31(Ans>31```
```

# Why it Works

Easter is the first Sunday strictly after the Paschal Full Moon, which is an approximation of the real full moon (the 14th day of a lunar month, specifically), although it may be off by as much as two days.

The formula is

$(April\;19=March\;50)-((11G+C)\mod30)$

except if the formula gives April 19, take April 18, and if the formula gives you April 18 and G≥12, take April 17.

Here is the value of G:

$G=(Y\mod19)+1$

Here is the value of C (with H=int(Y/100), and [H]=int(H)):

$C=-H+[H/4]+[8(H+11)/25]$

The first four lines of code implement this algorithm.

Lastly, the last line of code adjusts the date to the next Sunday using a modified version of the Day of Week routine.1

# Alternate Routine

This routine is a modified version of the Easter20Ops function on this page.

``````:2613+1483int(.01Y)-2225int(Y/400→A
:round(29fPart(int((66690fPart(Y/19)+319int(Ans/25))/330)/29
:56-Ans-7fPart((int(5Y/4)+A-Ans)/7```
```

This returns the date of Easter as day-of-March, just like the previous routine. Retrieving the actual date is the exact same.

• None known.

# Related Routines

author: BatedMarlin
description: 'Allows the user to get 1, 5, 10, or unlimited guesses. Range is from 1-10, 1-100, 1-1000, or is user-specified. When unlimited guesses is selected the total number of guesses will be tracked.'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
size: '3'
unit: '2'

author: 'Simon Alford'
description: 'Based off of the 24 game app for the iPhone, you try to make 24 using addition, subtraction, multiplication, and division using the four numbers given. The game features a timer, high scores, undo button, and superb graphics ;)'
graphics: '1'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: 'archives:24-game/24game.jpg'
size: '3523'
unit: '1'

 Nov 16 — A new routine was made to replace the dayOfWk( command on the TI-83/+/SE

Routine Summary

Calculates the day of week of a date, without using dayOfWk( (because it's only available on the 84+ and 84+SE)

Inputs

D - The day
M - The month
Y - The year (Any year at all)

Outputs

Ans - 0-6 = the day of week (Sunday - Saturday)

Variables Used

D, M, Y, Ans

Calculator Compatibility

TI-83/84/+/SE

Author

Michael Keith

weekday2.zip

``````:Y-(M<3
:round(7fPart((int(23M/9)+D+4+Y+int(Ans/4)-int(Ans/ᴇ2)+int(Ans/400)-2(M≥3))/7```
```

This is the TI-BASIC version of a Day of Week formula in C by Michael Keith, found at the beginning of this page. The formula is (d+=m<3?y—:y-2,23*m/9+d+4+y/4-y/100+y/400)%7, a mere 45 characters. In comparison with the other Day of the Week routine, this handles not just the years between 1950 and 2049.1

There is also a human-readable version on the site, as follows.

dayofweek = ( [23m/9] + d + 4 + y + [z/4] - [z/100] + [z/400] - 2 (if m ≥ 3) ) mod 7

where
[x] means to truncate downward to the nearest integer, and
z = y - 1 if m < 3,
z = y otherwise.

# Why it Works

Directly from this website:

Assume for the moment that February has 30 days (we'll correct for this later). Then the number of days in each of month is 31, 30, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, which modulo 7 is 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3. Now stick a 2 before this sequence and a 2 3 2 3 3 after it, and you get (2) 3 2 3 2 3 2 3 3 2 3 2 3 (2 3 2 3 3), which is just 2,3,2,3,2,3,2,3,3 repeated twice. But - this is the key - these numbers are the first differences of the sequence [23m/9] = (2,5,7,10,12,15,17,20,23). Therefore, the term [23m/9] adds the sum (mod 7) of the total number of days in months 1 to m-1 to the day of the week, thus correctly adjusting the formula for the months that have passed prior to m.

The next term, d, simply adjusts the sum based on the day of the month. The constant term, 4, shifts the result to correctly align with the calendar.2 The next term, y, adds 1 for each passing year, since 365 = 1 mod 7. The next three terms add 1 (the leap day) for each leap year that's passed since the "base date", including this year. To complete the correct formula requires handling two exceptions:

1. If m ≥ 3 (we are later than February), then we must subtract 2 because February actually has 28 days rather than the 30 we assumed.
2. If m < 3 (the opposite case), then we must use z = y-1 rather than z = y. This causes the leap-day correction term to not include the leap day for the given year, since in this case it hasn't yet occured.

# Display Day

Just as the other formula, append the following code to display the day of the week,

````:Disp sub("SUNDAY***MONDAY***TUESDAY**WEDNESDAYTHURSDAY*FRIDAY***SATURDAY*",9Ans+1,9      //replace *s with spaces`
```

Or you can use the alternative code, which is smaller and space-pads it.
````Disp sub("***SUN***MON**TUESWEDNES*THURS***FRI*SATUR",6Ans+1,6)+"DAY       //replace *s with spaces`
```

• None known.

# Related Routines

…that you can use check max(N=L₁ to check if N is in L₁, and 1+sum(not(cumSum(N=L₁ to tell where?

…that you can store an empty string into a string variable, but you cannot perform operations on it?

This is a program to find out if any number from 1 to 999 is a happy number. Before I put the code in though, some of you may be wondering what a happy number is though.
To find a happy number:
Take X (Ex. 123)
Take each of the digits in X and square them (Ex. 1²,2²,3²)
Keep on doing this until you get either 1 or 4. If you get 1, the number is happy; if you get 4, it is not.
Here is the code. It might not be in the most convenient format, but here it is:

``````Lbl A
Prompt J
Goto B
Lbl B
If J>999:Goto A
If 1000>J>99:Goto C
If 100>J>9:Goto D
If 10>J>0 Goto E```
```

Here's where things get complicated. I'll try to explain in words what the code is. The explanation is after the // on each line, so don't put it in the actual program.

``````Lbl C
(J/100)→K //To isolate each digit, I first divided the number by 100 (Ex. 123 becomes 1.23)
iPart(K)→T //Then, I took the integer part, which was formerly the hundreds digit. (Ex. 1.23 becomes 1)
(K-T)→O // Next, I subtracted the iPart from the full number, so that I had only 2 digits. (Ex. 1.23-1 becomes 0.23)
(O*10)→L //And then I multiplied the new number by 10 to get the next digit. (Ex. 0.23 becomes 2.3)
iPart(L)→U //(Ex. 2.3 becomes 2)
(L-U)→P //(Ex. 2.3-2 becomes 0.3)
(P*10)→V //(Ex. 0.3 becomes 3)
(T²+U²+V²)→J
Goto B //At the end, we plug the final number back into J and check for the number of digits.```
```

The next piece of code (if J has 2 digits) works the same way.

``````Lbl D
(J/10)→K
iPart(K)→T
(K-T)→O
(O*10)→U
(T²+U²)→J
Goto B```
```

The last part (if J has only 1 digit) is a bit different.

``````Lbl E
If J=1 or 4
Then
Goto F
Else
J²→J:Goto B
Lbl F
If J=1:Disp "HAPPY"
If J=4:Disp "NOT HAPPY"```
```

Again, I know it isn't the most effective method, but it was the first one I came up with. Perhaps, when I am better at coding, I will find a more effective way to do this, but for now, here it is.

Have fun trying out numbers!

author: SuperJedi224
description: 'A simple battle game with single-calculator player-versus-player and player-versus-cpu modes. To install, simply ungroup it. G1P and G2P are the master programs, the other programs provide the nescessary function calls. There seems to be a bug in the ai routine (involving the block command), let me know if you manage to fix it.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
size: '2576'
unit: '1'

author: Tybo10000
description: "*This update is necessary if you are using an older version*\nNew to v0.6.1: re-worked setup; updated apps; many bug fixes; lots of optimization; slightly easier navigation\n\nNew to v0.5: setup bug fix; new ans updated apps; slightly faster; misc bug fixes\n\n\ncurrent version- v0.6.0\n\nFull release of version 1.0 coming soon!!!"
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '1'
image: archives%3Agameplayer/scr00.gif
size: '40246'
unit: '1'

author: smaldragon979
description: 'A simple addicting game about clicking on the right key before time runs out that takes advantage of the position of the functions keys relative to the screen, displaying arrows and other symbols in the bottom of the screen that point directly to the key that must be pressed. \nIncludes 3 difficulty levels, high scores and instructions on the program itself.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: 'archives:clicker/clicker.gif'
size: '2873'
unit: '1'

author: ''
description: ''
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '0'
size: '0'
unit: '1'

author: theFlyingDutchman
description: 'A simple program used to solve cubic equations (AX^3+BX^2+CX+D=0)'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: /home/no_image_2.png
size: '347'
unit: '1'

Routine Summary

Solves for the complex roots of a cubic equation.

Inputs

A, B, C, D - the constants in Ax3+Bx2+Cx+D=0

Outputs

The three roots (or repeated roots)

Variables Used

A, B, C, D, M, N, O, P, Q, R, U, V, W

Calculator Compatibility

TI-83/84/+/SE

Author

theFlyingDutchman

URL: United TI

cubicformula.zip

``````ClrHome
Disp "AX³+BX²+CX+D=0
Prompt A,B,C,D
2B³-9ABC+27A²D→R
√(Ans²-4(B²-AC)³→M
³√(0.5(R+Ans→N
³√(0.5(R-M→O
(1+i√(3))/6A→P
(1-i√(3))/6A→Q
3A→E
-B/Ans→F
Ans+(-N-O)/E→U
F+PN+QO→V
F+QN+PO→W
Disp "X1=",U
Disp "X2=",V
Disp "X3=",W```
```

This is the complete program used to give the three roots that solve the cubic equation. If there are less than 3 roots, it will still give three answers. Because the formula used to solve cubic equations is quite big, several repeated parts are turned into variables.

author: vapaavetehinen
description: 'A tic-tac-toe game that doesn''t overwrite any variables and uses the graph screen to look good. It has three game modes; two-player, and two levels of one-player difficulty.'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: 'archives:tic-tac-toe/preview.gif'
size: '3804'
unit: '1'

Imagine you're creating an RPG, and the current problem you're facing is how to display all of the data for each character on the screen. Without putting too much thought into it, the easiest approach to you seems to be to simply write out the data each time. Unfortunately, when you start implementing this approach, it soon becomes apparent that it will not work in your program.

While you've only programmed in a few of the characters and their respective data, you can already see that there is simply too much data to enter in; and then when you think about the possibility of having to go through and change all of the data again if you update the program, you're now left feeling overwhelmed and wondering if there's another way. Thankfully, there is, and its name is subprograms.

A subprogram is a program called by another program to perform a particular task or function for the program. When a task needs to be performed multiple times (such as displaying character data), you can make it into a separate subprogram. The complete program is thus made up of multiple smaller, independent subprograms that work together with the main program.

There are two different general types of subprograms available:

• External — They exist as stand-alone programs that are listed in the program menu, and can be executed just like a regular program.
• Internal — They are contained inside the program itself, so that they can be called by the program whenever needed.

There are certain advantages and disadvantages to using each type of subprogram, and consequently, situations where using one type of subprogram makes more sense than using the other. This doesn't mean you can't use whichever you like, though.

# External Subprograms

External subprograms are the simplest type of subprogram, and involve executing one program from inside another program using the prgm command. You just insert the prgm command into the program where you want the subprogram to run, and then type the subprogram's name. You can also go to the program menu, and press ENTER on whichever program you want to use to paste the program's name into the program.

````:prgmPROGNAME`
```

When creating a subprogram, you take whatever code you want from the parent program and put it in its own program (see your first program for more information), and then put a Return command whenever you want to return to the parent program. (A Return command is optional at the end of a program, and you typically leave it off as part of program optimization.)

You should try to name your subprograms Zparentn or θparentn, where parent is the name of the parent program and n is the number (if you have more than one). Because subprograms are relatively unimportant by themselves, you want them to appear at the bottom of the program menu so they don't clutter it up and interfere with the user's ability to find whatever program they're looking for.

Here's a simple example where we are storing maps for our maze game in a subprogram, and then retrieving the desired map from the subprogram as a string, so we can print it out on the home screen. (This example is somewhat contrived, but it should be enough to illustrate external subprograms).

``````PROGRAM:MAZE
:ClrHome
:prgmZMAZE
:Output(1,1,Ans
:Pause

PROGRAM:ZMAZE
:int(3rand→A
:"X    XX    XXXXXX    XX    XXXXXX    XX    XXXXX
:If A=1:"X X X X X X X X X X X X X X X X X X X X X X X X
:If not(A:"X              XX              XX              X```
```

When the subprogram's name is encountered (in this case, prgmZMAZE), execution of the program will be put on hold, and program execution will transfer to the subprogram. Once the subprogram is finished running, or the Return command is executed, program execution will go back to the program, continuing right after the subprogram name. (If the Stop command is used instead of Return, however, the complete program hierarchy will stop.) See the image to the right for a graphical view of program flow using subprograms.

Although subprograms can call themselves (i.e., recursion) or other subprograms, each subprogram should return to the parent program and let it handle all the program calling. A structured program hierarchy is easier to understand and update (in fact, it's actually a code convention), and helps cut down the potential for memory leaks.

Each program call is sixteen bytes, and gets put on a stack in RAM by the calculator. This is fine as long as its size isn't larger than the free RAM available, but each additional program call takes more memory until the program Returns. Having many nested program calls can run out of memory and crash the calculator (giving you a ERR:MEMORY error).

External subprograms often are made to increase the speed of a program and decrease the size of the program overall by executing often used code at one place, where it can be called quickly. (as opposed to Labels)

To make subprograms even faster, a Return may be used in the subprogram, but only is useful in subprograms with several methods, and only after a method has been completed. The problem with using a Return in such a method is that it isn't very easy to prevent memory leaks by using a Return before an End command should have been called.

Because the same thing happens with Goto's before End commands as Returns before End commands, we can use this to our advantage, to quickly return from a subprogram. By using a Goto to a label with one or possibly more End commands, you can quickly return from a program, or quickly reset a While, Repeat, or For( loop without having to execute the rest of the code in the subprogram or loop.

``````Goto ST
Lbl E1
End
Lbl E0
Return
Lbl ST
[code]
If [condition]
Goto E0
[code]
If [condition]
Then
[code]
Goto E1
End
For(A,1,10
[code]
If [condition]
Goto E1
[code]
End```
```

This can significantly increase the speed of subprograms or loops, by using Labels without worry of ERR:MEMORY.

## Passing Arguments

The main problem associated with trying to use external subprograms is that there is no built-in support for passing arguments to subprograms. This feature is important because it allows the subprogram to act differently based on what values are given to it for processing.

Fortunately, you can mimic this functionality by using variables. Because all variables are global (variables used by one program can be used by another), changing a variable in one program affects that variable everywhere else. While you can use almost any variable that you want, there are three main types of variables that you should choose from:

• Pre-Defined Variables — Includes reals, strings, matrices, built-in lists, etc. These variables are frequently used by most programs, so you don't have to worry very much about whether the user cares if your mess with them.
• User-Defined Lists — Uses the individual list elements to store different values. These variables have a certain sense of security that comes with using them because they are the only variable that you can actually create, so a program can have its own custom list to use.
• Ans — It can take on whatever value and variable you want, so the program doesn't have a specific variable hard-coded in. Its value changes whenever you store something or simply place an expression or string on a line by itself.

When using a pre-defined variable or user-defined list, you simply have to set the variable to the value that you want and then call the subprogram. The subprogram should be able to use that variable without problems, but if you don't properly setup the variable, the subprogram won't work correctly.

``````:{2,3,5,7,9→PRIME
:prgmZPRIME```
```

Using the Ans variable is essentially the same, except you need to add some additional code to the subprogram. Because the value of Ans changes whenever there is a new variable storage, you should have the first line inside the subprogram save Ans to another, more stable variable.

``````:{2,3,5,7,9
:prgmZPRIME

PROGRAM:ZPRIME
:Ans→PRIME```
```

This change saves some memory in the main program (in our example, we were able to get rid of the →PRIME statement), but the subprogram size is larger, since we really just shifted the variable storage code to the subprogram. However, if the subprogram is called multiple times this extra memory is only used once instead of once per call.

This does create a problem, though, because now when you store Ans to another variable, it will crash the program if Ans isn't the same type of variable. There is only one case where you can avoid crashing when the subprogram receives the wrong variable type. If the subprogram is expecting a real variable (such as A or X) and it is passed a list, it can prevent a crash by using the fact that a parenthesis ("(") has multiple functions.

``````PROGRAM:ZSUB
:Ans(1→A```
```

The reason that this works is because a user-defined list doesn't need the ∟ prefixed character at the beginning when referring to the list. While you may be only asking the user to input a simple real variable, a list would also be allowed. There is nothing you can really do to fix this problem with other types, so just be careful.

The main consideration when using external subprograms is how many subprograms your program should have. While you're still putting your program together, it's good to keep it in many small, separate subprograms; but when you're done, all those subprograms become a liability and make your program unwieldy to use. This is because you have to remember all those subprograms in order to use your program.

There are two different ways to resolve this problem. The first way is to put the subprograms back in your program. This should only be done if a subprogram was only called once or twice, and putting it back in won't slow down the program. All you have to do is paste the code from the subprogram in place of the subprogram call. When you're done, you can delete the now unnecessary subprograms.

(The more detailed explanation is to go through your main program, and whenever you see a prgm call for a subprogram, clear that line and press 2nd STO. The Recall option will come up. Press the PRGM key and select the appropriate subprogram from the EXEC menu. The calculator will paste that subprogram's code into the main program.)

This is the same subprogram example from before, but now we've gotten rid of the ZMAZE subprogram and simply placed the subprogram code in the MAZE program itself:

``````PROGRAM:MAZE
:ClrHome
:int(3rand→A
:"X    XX    XXXXXX    XX    XXXXXX    XX    XXXXX
:If A=1:"X X X X X X X X X X X X X X X X X X X X X X X X
:If not(A:"X              XX              XX              X
:Output(1,1,Ans
:Pause```
```

The second way to resolve the problem is by simply combining your subprograms together, so that there are fewer subprograms needed. Of course, how many subprograms you decide to use is up to you, but you should try to limit it to three or four subprograms at most, and just one subprogram ideally. This might take some effort on your part, but it will most certainly make your users happy.

When you start combining your subprograms together, you should place the subprograms one after the other, giving each subprogram a unique branching label (note that labels are local, so you can't use Goto in one program to jump to a label in another program). Instead of having to search through each individual subprogram, branching allows you to simply jump to the desired subprogram. You then just use the subprogram's variable argument to determine which subprogram to access.

``````:If A=e:Goto A  // jump to first subprogram
:Stop  // the subprogram was accidentally called
:Lbl A
: // subprogram code
:Return
:Lbl B
: // subprogram code
: // No Return needed here```
```

Looking at the example, the first thing you should notice is the variable values that are used to determine which subprogram to jump to. While you could use something simple like one or two, those values have a high probability of being accidentally entered in by the user or being set by another unrelated program. What works better is to use random decimals (like .193 or 1.857) or math symbols (like e or π).

If none of the variable values for the subprograms match, then none of the subprograms will be executed; instead, program execution will go to the Stop command on the next line, which will immediately stop the entire program. The reason for adding this program protection is to prevent the user from running the subprogram separate from our main program.

This is a real concern since external subprograms are listed in the program menu, and the user most likely at some point will try to run the subprogram just out of pure curiosity. Unless the user is a competent TI-Basic programmer who knows what they are doing, however, you normally don't want to let the user mess with your subprograms. If they change something, or delete some lines of code, then your program might stop working correctly.

The second thing you should notice about the example is the Return command at the end of each subprogram. If you have lots of subprograms, and you're accessing a subprogram near the bottom, it takes a considerable amount of time for program execution to go back to the main program. This happens because program execution doesn't return to the main program until after it reaches the end of the program, or it executes a Return command. So, just remember to include the Return commands as needed.

## Using Assembly

Although using assembly programs can limit the compatibility of your program, they can be helpful in reducing the memory your program occupies, and allow for easier calling of subprograms. To use an assembly program for calling subprograms, have your subprograms named using some very simple pattern (e.g. "ZZ10", "ZZ11", "ZZ12", "ZZ13", etc). Then create a program such as the following called ZEXEC (or something similar):

``````:"ZZ"+Ans→StrX
://Assembly program to run program name in StrX```
```

Then you can call this program through the line:

``````:"13
:prgmZEXEC```
```

This will create a string with the contents "ZZ13" which will then run the program ZZ13. Depending on the assembly program you are using, you could have "ZZ13" archived (along with the rest of the subroutines) and when ZEXEC is called, it copies it to an unarchived program, runs the copy, and then deletes the copy, thus only one subroutine at a time is unarchived. This is useful for programs with lots of subroutines. One way of doing this is using xLIB, for which the ZEXEC code would look like this:

``````"ZZ"+Ans
real(10,0,0
prgmXTEMP000
real(10,1,0```
```

In order to make this concept more efficient, a number to string routine would come in handy. If one were using such a routine one could have various actions in a program return number values. These numbers would be converted into strings and the program would run the corresponding subprogram. This would become useful with a custom menu, one could have the program return the location of the cursor, convert that into a string and run the subprogram that corresponds to that cursor location. Some assembly programs that can be used may be found on the assembly libraries page.

There are several advantages of using external subprograms. First, and foremost, they reduce program size by eliminating redundant code. Instead of having to type the code multiple times for a task that occurs more than once in a program, you just type it once and put it in a subprogram. You then call the subprogram whenever you want to perform the task in your program.

Second, external subprograms increase program speed by making programs as compact as possible. You separate conditional tasks from the program (they either happen every time or they are skipped over), and put them in a subprogram; you then call the subprogram instead. This improves program speed because the calculator doesn't have to go through all of the conditional code anymore.

Third, external subprograms make editing, debugging, and optimizing easier. Instead of going through the entire program, looking for the code you want to change, you can focus on one subprogram at a time. This makes the code more manageable, allowing you to more thoroughly look at each subprogram and to better keep track of which subprograms you have looked at. It also prevents you from accidentally changing other parts of the program.

Lastly, subprograms are reusable, allowing multiple programs to share and use the same code. Breaking a program into smaller, individual subprograms, which each do a basic function or task, allows other programs to use those subprograms. Consequently, this reduces program size.

# Internal Subprograms

Internal subprograms are the most complicated type of subprogram, and involve putting the subprograms in the main program itself. This is not the same thing as pasting the code from the subprogram in place of the subprogram call, like you do with external subprograms; rather, it is designing your main program so that it can take advantage of subprograms, but all the code is self-contained.

There are several different ways that you can make internal subprograms, but the three most common ways are:

1. Append to the beginning of the program
2. Structured loops or branching
3. Branching out of broken loops

## Append to Program Beginning

If you remember how we used external programs, then this should be very familiar. Instead of placing the subprograms in their own separate program, we are now just placing the subprograms at the beginning of our main program.

The standard way to make a subprogram is to use an If-Then conditional:

``````:If A=1.234:Then
: // subprogram code
:DelVar A
:Return
:End```
```

Then to call the subprogram, you just set the variable to the desired value:

``````:1.234→A
:prgmPROGNAME```
```

Of course, there are some important considerations that you need to be aware of. You can use whatever random value for the variable that you want, just as long as it isn't something that the user would typically use. This is to ensure that the subprogram isn't accidentally run when it shouldn't be, which is why you need to reset the variable's value inside the subprogram before exiting.

While you could use any variable that you want (including Ans), the best variables to use are the simple real variables (A-Z and θ). This is because they are small in size and they are constantly being used by other programs, so you don't have to really worry very much about your subprograms being accidentally run. (Ans is not a very good variable to use for the reasons listed above.)

You should always remember to include the Return command at the end of the subprogram. Once the subprogram is finished, the Return command will cause the subprogram to stop and return to the previous place in the program from where it was called. The other reason for the Return command is to prevent any memory errors that can occur if a program recursively calls itself too much.

You can have multiple subprograms at the beginning listed one after the other by simply using different values for the the variable:

``````:If A=1.234:Then
: // subprogram 1
:End
:If A=2.246:Then
: // subprogram 2
:End```
```

While this works quite well when you only have three or four subprograms, with more subprograms it can actually slow down the main program. This happens because the calculator has to go through all the subprograms to get to the main program code.

You could fix this problem in a couple different ways, but the easiest way is to simply place all the subprograms in an If-Then conditional and then make that part of the subprograms. If this conditional is false, all of the subprograms will be skipped over.

A real number has an integer (accessed with the iPart( command) and fraction (accessed with the fPart( command) part, and you can use both of those for the subprograms: the integer will be the subprogram access check on the outside If-Then conditional and the fraction will be the respective subprogram we want to run.

``````:If 123456=iPart(A:Then  // get integer part of number
:10fPart(A  // get fraction part of number
:If Ans=1:Then
: // subprogram 1
:End
:If Ans=2:Then
: // subprogram 2
:End
: // rest of subprograms
:End```
```

For calling the subprograms, you then just set the variable to the desired value like before:

``````:123456.1→A  // run subprogram 1
:prgmPROGNAME```
```

## Structured Loops or Branching

If you don't like placing subprograms at the beginning of a program, the next approach that you can try is placing subprograms in the actual program code. While it would appear easy to simply place the subprograms wherever you feel like in your program, you can't readily do this since it would almost certainly cause your program to stop working correctly. Instead, you need to modify your program and subprograms so they can be put together.

What this modification entails is reorganizing your program so that the code works in a modular fashion as individual subprograms. This may not seem like it would be worth the effort, depending on the amount of code in your program, but modularization makes the program easier to understand and update (see planning programs for more information).

While there are several different ways you can structure the code in a modular fashion, the simplest way is to give each subprogram its own individual loop with a respective variable value as the loop condition. You can then access and exit the desired loop by simply changing the value of the variable. Of course, you have to determine which loop and variable you are going to use.

There are three different loops you can choose from (While, Repeat, and For(), but the best loop to use in this circumstance is While. This is because the condition is tested at the top of the loop, so if it's false already before the loop, then the loop will actually be skipped over (which is what allows us to use the loops as subprograms).

Once you have decided upon a particular loop, now you need to choose which variable you want to use. Like with the first way to make internal subprograms, the best variable to use is one of the real variables (A-Z and θ). This is because we just need a single value, and real variables only take up 15 bytes of memory (other variables are just as small, but they take up more memory when you're accessing them).

Now that the loop and variable have been chosen, we need to setup the system of loops to act as the subprograms. What works best is to have a main program loop and then place the subprogram loops inside of it. Putting the variable and loops together, here is what the program skeleton looks like:

``````:Repeat not(A  // main program loop
:1→A
:While A=1
: // subprogram 1
:2→A  // enter loop for second subprogram
:End
:While A=2
: // subprogram 2
:DelVar A  // exit main program loop
:End
: // rest of subprograms
:End```
```

You just set the value of the variable in the loop to use the desired subprogram. Then when you are done with the subprogram, you just change the value of the variable to something different to exit the loop. You do the same thing to exit the main program loop. You can use whatever system of values for the variable that you want, but just remember to keep it simple enough so that you can come back to it later and it still makes sense to you.

The one drawback of using this approach is that the calculator has to go through all the subprograms to exit the main program loop, which can really be slow depending on the size of the subprograms. At the same time, this approach is very easy to understand and follow because the loops are organized in a straight forward manner, so it's kind of an even trade off.

Related to using structured loops, the alternative you can use is branching. While using branching by itself to structure a program is generally frowned upon (see planning programs for more information), you can actually use it quite effectively for making internal subprograms that only need to be called a few times. Here is a simple example:

``````:0→A:Goto A
:Lbl B
: // main program code
:1→A:Goto A
:Lbl C
: // main program code
:Stop
:Lbl A
: // subprogram code
:If A:Goto C
:Goto B```
```

The A variable is used for determining when to stop the program: a zero value will simply cause the subprogram to jump back to the main program, but a value of one will cause the subprogram to jump to the exit of the program (the C label). Because the calculator doesn't store the label positions, there is no way to get memory leaks using this approach, which is especially important when exiting the program. However, it does get hard to follow and maintain the code the more branching there is.

## Branching out of Loops

The last way to make internal subprograms is arguably the most difficult to understand, but once you have it setup in your program, it provides an easy framework for adding additional subprograms. The best time to use these kind of subprograms is when you have a main program loop that you're running and you want to be able to jump out of it and then back into it whenever you want.

The basis of these subprograms is using branching (Goto and Lbl) with loops and conditionals (anything that uses an End command). Branching by itself allows the calculator to jump from one point in a program to another, skipping over whatever code you don't want executed. When you use branching to exit loops and conditionals, however, it has the unwanted effect of causing memory leaks.

Memory leaks happen because the calculator doesn't get to reach the End command for the associated loop or conditional, and the calculator just keeps on storing the End commands in its stack until there is eventually no free memory left. (Memory leaks can also occur with excessive program recursion.) Here is a simple example that has a memory leak:

``````:Lbl A
:While 1
:Goto A
:End```
```

If you notice, when the Goto A command is executed, it jumps to the matching label A that is on the line before the loop. The While 1 loop is never allowed to finish because the End command never gets reached, and the branching occurs over and over again until the calculator finally slows down to a stop (because there is less and less free memory available) and returns a memory error.

This type of programming is common with beginners, and its use is generally frowned upon; instead you should try to use proper program structure (see planning programs for more information). However, if you know what you are doing, you can actually use these broken loops and conditionals for internal subprograms, and you won't have to worry about memory leaks or the dreaded memory error.

There are two different approaches that you can use. The first approach is to use another Goto and matching label to jump back into the loop. Because the calculator doesn't store the labels, you can freely use whatever branching in the loop that you want, and the calculator will act like it had never even left the loop:

``````:Repeat getKey
:Goto A
:Lbl B
:End
:Stop
:Lbl A
: // subprogram code
:Goto B```
```

The key here is that the Goto A command jumps to the matching label A outside the loop, and then the Goto B jumps to the matching label B back inside the loop. The calculator still has the loop's associated End command on its stack, so the loop will just keep looping without problems until you eventually press a key to stop it and it executes the Stop command.

While this first approach works rather nicely in small programs, it is not very practical for use in large programs because all the branching starts to slow the program down. Unlike loops and conditionals, the calculator doesn't keep track of the label positions, so it must start from the beginning of the program to find the matching label to jump to. The further down the label is in the program code, the more time the calculator must spend looking for it.

The second approach solves this problem by using a duplicate End command for the loop or conditional. Since the calculator keeps track of the number of unfinished loops and conditionals by storing the associated End commands in its stack, we can make the calculator believe that our different End command is actually the End command that belongs to the loop. Here is a simple example to illustrate:

``````:Repeat getKey
:Goto A
:End
:Stop
:Lbl A
: // subprogram code
:End```
```

Like with the first approach, when Goto A is executed the program will jump to the matching label A, and then the subprogram code will be executed. This time, however, the calculator will read the End command after the subprogram code, which it believes is the end of the loop, and then immediately jump back to the beginning of the loop. This process will be repeated over and over again until the user presses a key, at which time the Stop command will be executed and the program will stop.

The subprogram code for both approaches can be whatever you want, including other loops and conditionals. You just need to remember to close the loops and conditionals before returning to the original loop, otherwise the calculator will have the wrong End command on its stack. You also want to have a matching number of End commands for your loops and conditionals, or you will get a memory leak.

There are a couple different ways you can enhance the duplicate End subprogram approach so that you get the most use out of it. The first way is relatively simple, and just involves using a For( loop as the looping structure, instead of a While loop or Repeat loop (which is what we had in our previous examples).

A For( loop is basically a specialized form of a While loop, with the main differences being that it is executed a specific number of times and it has the variable setup and ending condition built-in. You just choose a variable, the range of values, and the increment (it is optional, with one as the default); and then the loop will start the variable at the initial value and increment it each time until it reaches the ending value.

Now when you start using the For( loop for internal subprograms, you need to make sure the For( loop executes at least twice. This is so that the End command of the For( loop gets used along with the End command of the subprogram, otherwise it will simply fall through after the first time through the loop. You can select different subprograms based on the variable's value. Here is our example from above, now using a For( loop instead:

``````:For(A,0,1
:If not(A:Goto A
:End
: // main program code
:Stop
:Lbl A
: // subprogram code
:End```
```

When the For( loop is executed, the A variable is set to zero. The not(A condition is true, so the calculator executes the Goto A command and then jumps to the matching label A. The calculator then jumps back to the beginning of the For( loop and increments the A variable to one. This time, however, there is no subprogram jump taking place, and the calculator simply finishes the For( loop like normal.

The second way to enhance the duplicate End subprogram approach is by using a simple trick. Because a While loop loops only when the condition is true, when the calculator comes across a While loop with a false condition, it will simply skip over the entire loop (and everything inside the loop). The easiest way to make a false condition is to use zero, since zero will never be true (based on Boolean logic). Here is a simple example to demonstrate:

``````:While 0
:Lbl A
: // subprogram code
:End
: // main program code
:If getKey:Then
: // program code
:Goto A
:End```
```

When the calculator encounters the While 0 loop, it won't execute it because 0 is false. After the calculator enters the subprogram conditional, it executes some program code and then hits the Goto A command and jumps to the matching label A inside the While 0 loop. The calculator takes the End command of the loop as the End command of the conditional, and thus no memory leak occurs.

The reason that this trick is so valuable is because it allows you to place your subprograms at the beginning of the program, and you don't ever have to worry about them being accidentally executed (they will always be skipped over). In addition, now that the labels are at the beginning of the program, there is no more speed problem to deal with, since the calculator doesn't have to search through the entire program to find the labels.

The main advantage of using internal subprograms is that there is only one program needed to make your program run. When you give someone your program, you don't have to worry about forgetting to include any subprograms; or somebody deleting your subprograms afterwards, causing your program to stop working correctly. These things are mostly out of your hands, but users will think your program is at fault.

Related to the first advantage, the other advantage is that the user's program menu doesn't get cluttered up with insignificant subprograms. This problem is relative to how many subprograms a program has, but it can become tiresome to have to sort through the program menu in order to find the program that you want. If anything, this is just a nice courtesy to the users of your programs.

# References

author: Harrison
description: "Finally play 5x5 and 8x8 picross puzzles! 4 puzzles are included with the game and a new puzzle pak is coming soon.\nVersion 1.2.0 features-\n*Smaller (compressed) program size\n*Bug fixes\n*Better stability"
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
size: '13970'
unit: '1'

name: ''
content: "In preparation for TI-Concours, I picked up my TI-89t and tried to make a few programs with it. Among other things, I made a tilemap engine, so I thought I would share the code and explain the parts.\n\n First, let's take a look at how indirection works. If you have an argument that requires a variable name, you can indirectly refer to it with a string. For example, you can draw a picture on the graph screen named sprite0 like this:\n[[code]]\n\"sprite0\"→string\nRclPic #string,0,0\n[that example, 'string' had the variable name and we used the indirection symbol '#' to tell the program to use the string as the variable name. This will do the same thing:\n[[code]\nRclPic sprite0,0,0\n[[/code]]\n\nIf you are familiar with the string() command, then you are probably coming up with all sorts of ideas already. For example, say you had a bunch of sprites named sprite0,sprite1,sprite2,… and you wanted to draw a sprite based on an input number:\n[[code]]\n\"sprite\"&string(num)→string\nRclPic #string,0,0\n[to optimise this a little:\n[[code]\nRclPic #(\"sprite\"&string(num)),0,0\n[if 'num' holds the sprite number to draw, it will draw the appropriate sprite. Using this, we can make a tilemap engine that uses a matrix to hold the tile numbers and uses 8x8 tiles:\n[[code]\nFor a,1,8 ;8 tiles tall\nFor b,1,8 ;8 tiles wide\nRclPic #(\"sprite\"&string(tilemap[a,b])),shift(a,3),shift(b,3)\nEndFor\nEndFor\n[[/code]]\ntilemap[a,b] is used to access each matrix element and shift(a,3) basically multiplies the value of a by 8. A more memory efficient way of storing tilemaps, though, is to use strings. For example, if you start your sprite index at sprite1 instead of sprite0, you can convert your matrix to 1-byte char() strings and then add them all together. So the conversion code:\n[[code]]\n\"\"→str0\nFor a,1,8\nFor b,1,8\nstr0+char(tilemap[a,b])→str0\nEndFor\nEndFor\n[[/code]]\nThen to draw your tilemap, you can use the inverse function of char()— ord():\n[[code]]\n0→c\nFor a,1,8\nFor b,1,8\nc+1→c\nRclPic #(\"sprite\"&string(ord(mid(str0,c,1)))),shift(a,3),shift(b,3)\nEndFor\nEndFor\n[probably better:\n[[code]\nFor a,0,63\nRclPic #(\"sprite\"&string(ord(mid(str0,a+1,1)))),8*int(a/8),8*mod(a,8)\nEndFor\n[[/code]]\n\nAttached is a screenshot taken using CalcCapture. I tested it and unfortunately, the screenshot is about half the speed that it actually runs at, so keep that in mind!\n\nThis program is a little different from the code that is posted in that it uses another level of indirection. It takes two inputs for the name of the tileset and the name of the tilemap, so it is meant to be a general tilemap engine."
attachment: 'file:tilemapex0/TileMapEx0.GIF'

Command Summary

Returns a previous answer from the Home screen.

Command Syntax

ans([integer]).

2nd, ANS (the (-) key)

This command works on all calculators.

X byte(s)

Simply put, the ans() function returns an answer that the calculator has already returned. The argument specifies which answer to return, and must be an integer between 1 and 99 and may not be an expression or a variable. For example ans(1), the default, will return the last answer displayed on the home screen. ans(3), however, will return return the third most recent answer. If no argument is provided, the calculator assumes 1. Strangely, while official documentation states that the argument must be between 1 and 99, 0 may be used, which returns the same answer as if 1 were used (this is probably why ans() returns the most recent answer, even though no argument is provided).

``````Example home screen input to generate the Fibonacci sequence.

:1
1
:1
1
:ans(1)+ans(2)
2
:ans(1)+ans(2)
3```
```

When entered into a program, the calculator will automatically change the ans() command into whatever value it represents at runtime, so that even if the home screen changes, the program will always return the same value of the ans() function as the first time it was run. This may be avoided by using the expr() function and putting the ans() function in quotes to make it a string. For example: expr("ans(3)"). This can be rather cumbersome, however, and generally anything that you can do with the ans() function can be accomplished equally well with a variable.

# Error Conditions

260 - Domain error happens when the argument is not in the range 1-99 or the argument is not an integer.

380 - Invalid ans() happens when that many answers haven't been stored yet.

620 - Invalid variable or function name happens when the user attempts to store a value to ans().

name: ''
content: "There are still a few weeks left to register! Currently the BASIC (z80) category has 12 contestants. 8 are from France, 3 are from the US, and 1 is from Belgium. Last year the topics were Tic-Tac-Toe, Tron, and a personal project. We won't find out what the topic is until the start of the competition, either :D\n\nIn the Axe category, there are 7 contestants, 4 from France, 2 from the US, and 1 from Belgium (yay, powers of two!). Last year the topics were making a grayscale image editor, making Snake, and a personal project.\n\nIn z80 Assembly, there are 6 competitors. 4 are from France, 1 is myself from the USA, and 1 is from Belgium. By the way, ben_g is the guy from Belgium in each of these categories so far.\n\nFor nSpire Lua, there are 4 competitors including 2 from the US, and 2 from Belgium (Jim Bauwens, the brother of Stefan Bauwens, and Nick). \n\nFinally, for TI-BASIC (68K), it still just Stefan and I D:\n\nReally, y'all should join if you can, it will be great fun. I would feel sorry for the judges, but they have been working hard to get a bunch of people to compete :D I think last year they had three NSpire CX calculators from their sponsors to give to the first place winners in each category (there were three categories) and I think there were similar prizes for the second, and third places, and some goodies for fourth and fifth. I don't know if they have this for this time around, but regardless, you get to compete with people from different countries o__o Isn't that awesome?\n\nEDIT: Also, if you have difficulty with the French stuff that they haven't translated yet, you can ask here or use Google Translate. I should theoretically understand the French >.>"
attachment: null

name: ''
content: "One small note:\n\"or\" and \"and\" can be replaced with addition and multiplication, respectively\n\nSo\nIf G=72 and Y-L+31\nbecomes\nIf (G=72)(Y-L+31\n\nand\nIf N=1 or N=93\nbecomes\nIf (N=1)+(N=93\n\nThese increase size but also offer a marginal increase in speed\n\nIf max(N={1,93 \ncan also replace\nIf N=1 or N=93\nfor the same size, though I do not know which is faster\n"
attachment: null

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Member

Included page "lflskdafjlkdjgflv" does not exist (create it now)

The ListPages module does not work recursively.
page 1 of 12123...1112next »

name: ''
content: "Thank you so much for your optimizations. I really can't express how much this means to me; I'm ecstatic to try them out.\n\nI just realized I forgot to mention trick shots. The ball /does/ move at an angle, but you have to set it off first with a trick shot executed by moving the paddle exactly one pixel away from the ball when you hit the ball. It's kind of hard to explain but really easy to understand once you do it once. I made it this way purposefully to give skilled players an edge; once you start a trick shot ball it can't be undone until the next ball. It's also impossible to score anything in Challenge Mode without using trick shots. If you didn't know about them, you probably weren't having much fun :P"
attachment: null

name: ''
content: "Thank you so so much for your optimizations. I really can't express how much I appreciate it; I'm literally ecstatic right now. \n\nAlso, I may have forgotten to mention this, but the ball does move at an angle, but you have to \"set it off\" first by moving the paddle exactly one pixel away from the ball. This is kind of hard to explain until you do it once. I made it this way on purpose to give skilled players an edge; they'll have the precision to set off trick shots and once a trick shot is off, it can't be undone until the next ball. Haha, if you were playing without knowing that you probably weren't having a lot of fun :P"
attachment: null

name: ''
content: "I am going through and optimising some of your code and I can tell a bunch of it was well thought out :D\nThere are a handful of common optimisations that I can suggest:\n\n* Instead of using ~L+32 (I am assuming ~ is negative), you can use 32-L to save a byte\n* You can drop ending quotes and parentheses\n* To elaborate on what Silver said, DelVar is two bytes, so 0→Q is the same size as DelVar Q. However, DelVar and the other memory functions have a cool trick where you don't need to use a newline for the next command, saving a byte! For example, instead of this:\n[[code]]\n0→Q\n1→P\n-or-\nDelVar Q\n1→P\n[are the same size) You can do this:\n[[code]\nDelVar Q1→P\n[[/code]]\nWhich is one byte less and essentially does the same thing.\n* Disp has a cool trick like Text( where each additional argument is treated like a new Disp. For example:\n[[code]]\nDisp \"YOU LOSE…\"\nDisp \"YOUR SCORE:\"\n[instead be:\n[[code]\nDisp \"YOU LOSE…\",\"YOUR SCORE:\n[neat, right?\n* One random trick optimisation was with this line:\n[[code]\nIf G=72 and Y-L+32≠1\n[changed it in my head to:\n[[code]\nIf G=72 and Y-L+32-1\n[can be optimised to save two bytes:\n[[code]\nIf G=72 and Y-L+31\n[am weird, so my methods are awkward. If you want to do the more logical version of my solution:\n[[code]\nIf G=72 and Y-L+32≠1\n-use some algebra-\nIf G=72 and Y-L+32-32≠1-32\nIf G=72 and Y-L≠~31\n-get rid of that negtive sign, it is using an unnecessary byte D: -\nIf G=72 and Y-L+L≠~31+L\nIf G=72 and Y≠L-31\n[[/code]]\nYay :3 (I am in a math optimisy mood, sorry).\n* Often Repeat is more useful than While (in my opinion) because you don't need to set the variables before the loop. When I started learning TI-BASIC, I actually never learned what While did until I joined this site and saw people using it. I just found Repeat and figured out how it worked and I like it .-.\nHere is how I convoluted it:\n[[code]]\nDelVar CDelVar P\" ;6 spaces here\nMenu(Ans+\"PONG\"+Ans,\"TWO PLAYER\",2,\"PRACTICE\",P,\"CHALLENGE\",C,\"QUIT\",Q\nLbl C\n1→C\n2→U\nLbl P\n1→P\nLbl 2\nDelVar VDelVar WDelVar SDelVar T4→L\n32→O\n48→N\nDelVar EDelVar Q1→D\nStoreGDB 0\n1→Xmin\n95→Xmax\nFnOff \nAxesOff\nClrDraw\nIf C or P\nThen\nVertical 1\nVertical 2\nEnd\nHorizontal (-)10\nHorizontal 10\nFor(I,1,93,92\nFor(J,32-L,L+32,1\nPxl-On(J,I\nEnd\nEnd\nRepeat Q\ngetKey→G\nIf G\nThen\nIf G=72 and Y-L+31\nThen\nY-1→Y\nPxl-On(Y-L+32,1\nPxl-Off(Y+L+33,1\nElse\nIf G=92 and Y+L≠29\nThen\nY+1→Y\nPxl-On(Y+L+32,1\nPxl-Off(Y-L+31,1\nElse\nIf G=45\nThen\nClrHome\nDisp \"GAME PAUSED\",\"[ENTER]: RESUME\",\"[CLEAR]: QUIT\nRepeat 30=abs(Ans-75\ngetKey\nEnd\nIf Ans=45\n1→Q\nElse\nIf G=74 and T-L+31\nThen\nT-1→T\nPxl-On(T-L+32,93\nPxl-Off(T+L+33,93\nElse\nIf G=94 and T+L≠29\nThen\nT+1→T\nPxl-On(T+L+32,93\nPxl-Off(T-L+31,93\nEnd\nEnd\nEnd\nEnd\nEnd\nEnd\nN→A\nO→B\nIf N=1 or N=93\nThen\nIf not(C\nThen\nClrHome\nIf N=1\nV+1→V\nIf N=93\nW+1→W\nDisp \"LEFT SCORE:\nOutput(1,13,V\nDisp \"RIGHT SCORE:\nOutput(2,14,W\nPause \nIf V>9\nThen\nDisp \"LEFT WINS!\n1→Q\nEnd\nIf W>9\nThen\nDisp \"RIGHT WINS!\n1→Q\nEnd\n32→O\nDelVar E48→N\nElse\nClrHome\nDisp \"YOU LOSE…\",\"YOUR SCORE:\nOutput(2,13,U\nIf U>|LPONG(1\nU→|LPONG(1\nDisp \"HIGH SCORE:\nOutput(3,13,|LPONG(1\nPause \n1→Q\nEnd\nEnd\nIf pxl-Test(O,N+D\nThen\nIf C and U>2\nThen\nVertical U-1\nVertical U\nU+1→U\nEnd\n~D→D\nElse\nIf pxl-Test(O+1,N+D\nThen\n~1→E\nIf N=2 or N=92\nThen\n~D→D\nIf C\nThen\nVertical U-1\nVertical U\nU+1→U\nEnd\nEnd\nEnd\nIf pxl-Test(O-1,N+D\nThen\n1→E\nIf N=2 or N=92\n~D→D\nEnd\nEnd\nO+E→O\nN+D→N\nPxl-Off(B,A\nPxl-On(O,N\nEnd\nLbl Q\nRecallGDB 0\nClrHome\n[[/code]]\nI gave it a try and I like how you implemented the two player mode. Also, should the pixel be moving at an angle or just back and forth? If you want, I can put together a simple Pong engine so that you can compare it :D"
attachment: null

name: ''
content: 'instead of 0→(variable) try delvar variable'
attachment: null

name: ''
content: 'Oh jeez, looks like you can''t edit posts on this forum. Well, regardless, the PONG.8Xp file is attached. I didn''t mean to cross it out in the previous post.'
attachment: 'file:pong/PONG.8Xp'

name: ''
attachment: null

Command Summary

Returns the angle of expression, interpreting expression as a complex number.

Command Syntax

angle(expression)

• Press 2nd MATH to enter the MATH popup menu.
• Press 5 to enter the Complex submenu.
• Press 4 to select angle(

This command works on all calculators.

X byte(s)

The angle() command returns the angle of a complex number. The argument may be an expression, a list, or a matrix. In the case of a lists and matrices, each element is evaluated individually and the result is outputted to the corresponding element of a matrix or list of the same dimensions as the original.

``````:angle(2i)
pi/2
:angle({2i,3+i})
{pi/2  tan^-1(1/3)}
:angle([[2i,3+i][i+7,2i]])
[pi/2  tan^-1(1/3)]
[tan^-1(1/7)  pi/2]```
```

name: ''
content: 'Haha, oops, sorry XD I am used to adding things to the end of Str1 instead of putting things before it x_x'
attachment: null

name: ''
content: "Oh, sorry, I misread something and thought that you wanted it at the end of the string, sorry. You could add this to the end of my code to remedy that:\n[[code]]\nsub(Ans,5B+1,int(B\n[[/code]]\nMy code assumes that the input might not be a multiple of 5 digits."
attachment: null

name: ''
content: "[[code]]\n\" → Str0\n.2length(Str1→B\nFor(A,1,B\n0\nFor(C,-4,0\n2Ans+expr(sub(Str1,5A+C,1\nEnd\nStr0+sub(\"ZYXWVUTSRQPONMLKJIHGFEDCBA\",Ans-5,1→Str0\nEnd\n[[/code]]\n\nIt stores it to Str0."
attachment: null

name: ''
content: 'Xeda Elnara''s code works, but it adds the answer to the end of the input. how could that be fixed?'
attachment: null

name: ''
content: 'yet again…above post is mine'
attachment: null

name: ''
content: "it almost works, just need to make this small change\n\n[[code]]\n\"0→Str1\nWhile A\nsub(\"0123456789ABCDEF\",1+16fPart(A/16),1)+Str1→Str1\niPart(A/16→A\nEnd\nIf Str1≠\"0\nsub(Str1,1,length(Str1)-1\n[[/code]]"
attachment: null

name: ''
content: 'Yes, I think we''ve all been there before XD'
attachment: null

name: ''
content: 'Yes, we''ve all been there before XD'
attachment: null

 Welcome to TI-Basic Developer (TI|BD), the TI-Basic information repository! If you are a first-time visitor, please check out the welcome pack to get you up to speed on using the site. We encourage you to become a member and to get involved in the community, and to come back often to see what changes have occurred. And above all else, enjoy your stay!
 The ListPages module does not work recursively.

name: ''
content: "I believe you want a command to convert decimal to hexadecimal? You can do this, where A is the number to convert:\n[[code]]\n\"0→Str1\nWhile A\nsub(\"0123456789ABCDEF\",1+16fPart(A/16),1)+Str1→Str1\niPart(A/16→A\nEnd\nIf Str1≠\"0\nsub(Str1,2,length(Str1)-1\n[[/code]]\nHopefully that works ^^'"
attachment: null

name: ''
content: "[[code]]\n.2length(Str1→B\nFor(A,1,B\n0\nFor(C,-4,0\n2Ans+expr(sub(Str1,5A+C,1\nEnd\nStr1+sub(\"ZYXWVUTSRQPONMLKJIHGFEDCBA\",Ans-5,1→Str1\nEnd\n[[/code]]\n\nI am sure there is a faster and smaller way, but I think that works (I didn't test it)."
attachment: null

name: ''
content: 'Does anyone know how to convert from numeral to hexadecimal? I have a TI-83+ which does not have the ▶Hex command. Please help'
attachment: null

name: ''
content: "Lat's see…my best program is probably either my own version of snake or a blackjack program I wrote. I became interested in programming originally because I was lazy and did not feel like remembering all of the math and science formulas. And I'm terrible at optimizing because…I'm terrible at optimizing (my programs are all like 10x longer than they would be if they were optimized). An example of what some of my early programs were (like when I had never even heard of optimizing).\n[[code]]\nIf A=1\nthen\ndisp \"1\"\nend\nif A=2\nthen\ndisp \"2\"\nend\nif a=3\nthen\ndisp \"3\"\nif a=4\nthen\ndisp \"4\"\nend\netc.\n[[/code]]"
attachment: null

name: ''
content: "clarification:\nwhat i meant would look something like this\n\n[[code]]\n[input]\n\n[divide string into segments of 5]\n\n[compare segments of 5 to 11111 (A) all the way to 00110 (Z)]\n A:11111\n B:11110\n C:11101\n…11100,11011,11010,11001,11000,10111,10110,10101,10100,10011,10010,10001,10000,01111,01110,01101,01100,01011,01010,01001,01000,00111,00110\n\n[add new letter to existing string]\n\n[output string once done]\n[[/code]]"
attachment: null

name: ''
content: 'I''ve got CSS in two places: some on a spreadsheet somewhere and the rest on each page that the CSS is specific to. That''s why you are able to see some stuff and not see others. The spreadsheet passes through wdfiles, but the page-specific stuff does not.'
attachment: null

name: 'Boba Foxx'
content: 'Why is it that the Css for the board index and actually displaying the posts (like on this page) use different Css sheets? The board index page looks just like it should (sans avatar images), but the actual thread pages don''t load the css.'
attachment: null

name: 'Boba Foxx'
content: "Oh, that's what had me confused. Before, you said\n> θ-2x→A\nbut you meant \n> 2X-θ→A\nWhich is basically the solve() line simplified.\n\nI probably would've done that if I'd optimized it much; I'd just woken up from a move in history and was still kinda sleepy, but I was more concerned with getting it to work, rather than getting it to work quickly."
attachment: null

name: ''
content: 'It''s nice to see you again :) What got you interested in programming? Why do you say you''re terrible at optimizing?'
attachment: null

name: ''
content: 'darn… I don''t know how to go about doing this problem. They never teach us any probability at my school >:( I don''t think I''d be able to do it anyway, though.'
attachment: null

name: ''
content: "Right, which is why I said it needs to be negated; try 2X-θ→A instead of the solve line.\n\nBesides that, good work (:\n\nHere's what I came up with, where Ans is the displayed percentage:\n\n[[div class=\"werecode\"]]\n:2Ans-50.5+.01(101-2Ans)abs(Ans-50\n[[/div]]"
attachment: null

name: 'Boba Foxx'
content: "Another correction (I really should get into the habit of testing my code more since I haven't written much recently >.>\n[[code]]\n:If X<5 or X=31\n:Stop\n:Sub(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",X,1\n[be\n\n[[code]\n:If X<4\n:Stop\n:output(2,1,Sub(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",32-X,1\n[[/code]]"
attachment: null

name: 'Boba Foxx'
content: "It looks like what you're doing is inverted binary (instead of 1 being on and 0 being off, you have 1 represent off and 0 be on). \nThe code I wrote allows you to input a 5 character string of 1's and 0's and it inverts it to give the intended answer (as you said, 11111 is A)."
attachment: null

name: 'Boba Foxx'
content: "Yeah, I never tested anything below 25 (which is where the abs(A breaks for me); your code works perfectly (It should have been \":If abs(A>100)) or (A<0\")\nIf I change the solve( line, then I get way different answers than what I should (like 0 when I input 85, whereas before I got 95.35)."
attachment: null

name: ''
content: "Could the solve() line be simplified to θ-2X→A (which actually needs to be negated for the algorithm to actually work)?\n\nI don't have a calculator that operates TI-Basic anymore, so I transcribed it to C++. It seems to work for numbers greater than 50, but for numbers less than 50, it estimates low (ie. 0 outputs -50.5). I assumed that abs(A>100 was actually 100<abs(a.\n\nI can get it to work by changing:\n[[div class=\"werecode\"]]\n:If abs(A>100\n:100(A>0)→A\n[class=\"werecode\"]\n:If A>E2\n:E2→A\n:If A<0\n:DelVar A\n[[/div]]"
attachment: null

name: ''
content: 'Oops…i forgot to login. The above post is mine'
attachment: null

name: ''
content: 'could you please explain what this does? Because I do not think we are thinking of the same thing'
attachment: null

name: 'Boba Foxx'
content: "Correction:\n[[code]]\n:Delvar B\n:Input \"String?\",str1\n:if 5≠length(str1\n:stop\n:For(Z,1,5\n:B+1(sub(str1,6-Z,1)=2^(Z-1\n:end\nAns→X //not sure if needed, replace the x's on the following lines with Ans if it's not\n:If X<5 or X=31\n:Stop\n:Sub(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",X,1\n\n[[/code]]"
attachment: null

name: ''
content: 'Hello AriMB! Nice to see a new face around! What would you say is your best program?'
attachment: null

name: 'Boba Foxx'
content: "If it is inverted binary, then this should do it:\n[[code]]\n:Delvar B\n:Input \"String?\",str1\n:if 5≠length(str1\n:stop\nFor(Z,1,5\n:B+1(sub(str1,Z,1)=2^(Z-1\nend\n\n[[/code]]\nshould work :)"
attachment: null

name: ''
content: "Sooo…\nReverse binary?"
attachment: null

name: ''
content: "I know I'm a little late, as I have been seen lurking around the forum for a month or so, but I would like to introduce myself. AriMB is my actual name. I am 14. I am fairly decent at programming, but am terrible at optimizing. I currently know a little of Java, C++, Objective C, and a fair amount of TI BASIC. I'm not sure what else to say, so I'm gonna stop here.\n\n\nOh wait, I almost forgot…\n…hi!"
attachment: null

name: ''
content: "Wikidot community,\nI have an idea to make a program that takes a string of 1's and 0's in sets of five and translates them into letters so that A is 11111, B is 11110, C is 11101, D is 11100, all the way to Z. Then output this string of letters as a string. Please paste the text as a reply.\n\nGoodluck!"
attachment: null

name: 'Boba Foxx'
content: "I forgot about the [[/code]] >.>\nIT doesn't auto-paste in anymore, I forgot."
attachment: null

name: 'Boba Foxx'
content: "[[code]]\n:Input \"Prob? (0-100) \",X\n:Clrhome:Output(1,1,\"Working\n:For(θ,1,100\n:solve((X-(θ-A)/2),A,{-200,200}\n:Ans→A\n:If abs(A>100\n:100(A>0)→A\n:A→L₁(θ\n:Output(2,1,θ\n:End\n:100→dim(L₁\n:sum(L₁\n:Clrhome:Output(1,1,Ans\n:Output(2,1,\"/10000\n[[/code]]"
attachment: null

name: 'Boba Foxx'
content: "Hmm.. I'm tempted to just brute-force it since I'm too lazy to write an actual algortih…\nI'll see what I can do during precal."
attachment: null

name: ''
content: 'Yes. If Fire Emblem says that the chance of hitting, \$p\$, is 70%, what is the real chance of hitting? That''s determined by rolling two one-hundred sided dice, taking their average, and checking if that average value is less than or equal to \$p\$.'
attachment: null

name: 'Boba Foxx'
content: "To make sure I don't go do the wrong thing, I'd like to make sure I understand correctly first.\nBasically, we're to find the probability that we get a hit (which is defined as the the average of two d100 must be less than P) when we're given a chance P of hitting?"
attachment: null

name: ''
content: "In Fire Emblem, when you attempt to attack an enemy, a list of percentages are given indicating things such as hit chance. If the statistics say that you have a 50% chance of hitting, though, you actually have a 49.5% chance of hitting. Why is that?\n\nNormally, you would think that the game would roll a d100 die, and any roll that is less than or equal to the displayed percentage would be a hit; any roll above would be a miss. Fire Emblem games beyond FE5, however, utilize a different system which gives the player a statistical advantage. When a player rolls, two d100 dice are rolled, and the average of the rolls is compared to the percentage instead. Oddly enough, this actually affects the real probability significantly. When FE says you have an 85% chance of a hit, you actually have a 95.4% chance of a hit, which is significantly greater, and therefore you have an advantage, making the game easier and more playable.\n\nHere's the challenge: what is the real theoretical probability \$p_r\$ of a hit given the displayed hit percentage, \$p\$? Specify if you take \$p\$ on the interval [0, 1] or [0, 100]."
attachment: null

.