Friday, April 13, 2007

matrix for the TI-82

Here's the source of my matrix script for the TI-82.
This is the first thing I really code for the TI-82 so don't expect anything but newbie code.
note: -> means is the assign thingy u get from the STO button
ClrDraw

Text(30,28,"THE MATRIX"

0->D:18->F
12->I:30->K
24->N:42->P
36->S:0->U
48->X:12->Z
randInt(0,22)*4->E:E->G
randInt(0,22)*4->J:J->L
randInt(0,22)*4->O:O->Q
randInt(0,22)*4->T:T->V
randInt(0,22)*4->Y:Y->H

Pause
While 1
"IF
If D>54:Then
0->D
randInt(0,22)*4->E
End
If I>54:Then
0->I
randInt(0,22)*4->J
End
If N>54:Then
0->N
randInt(0,22)*4->O
End
If S>54:Then
0->S
randInt(0,22)*4->T
End
If X>54:Then
0->X
randInt(0,22)*4->Y
End
If F>54:Then
E->G
0->F
End
If K>54:Then
J->L
0->K
End
If P>54:Then
O->Q
0->P
End
If U>54:Then
T->V
0->U
End
If Z>54:Then
Y->H
0->Z
End
"CLEAR
Text(F,G," "
Text(K,L," "
Text(P,Q," "
Text(U,V," "
Text(Z,H," "
"PRINT
randInt(0,9)->W
Text(D,E,W
Text(I,J,W
Text(N,O,W
Text(S,T,W
Text(X,Y,W
"INCREASE
D+6->D
I+6->I
N+6->N
S+6->S
X+6->X
F+6->F
K+6->K
P+6->P
U+6->U
Z+6->Z
End

If anyone actually happens to read this blog and actually is interested in coding for the TI-82 please comment and tell me what you think of my script.
Also please comment if you find any bugs and things that should be changed.

No comments: