TI-83 Pi

From Place

TI-83 Pi, Version 1.3

A sample program that outputs a string that can be moved with the arrow keys. This program was originally called "pi" because the string consisted of a single letter pi, but the string is customizable.

This version supports multicharacter strings (the original did not). Future versions may support multiple strings to give an appearance of height as well as length.

Further revised to make the string cross over to the other side when it exits a boundary; the original version simply had it stop at boundaries.

Source

Note: Lines beginning in a semicolon are comments and are to be ignored when typing into calculator.

PROGRAM:PI
; starting coords
1->X
1->Y

"[p]"->Str1
16-(length(Str1)-1)->R ; 16 is the width of the 83's screen, this is adjusted to fit the string's length

Lbl F

getKey->K

; begin key mappings
If K=25
X-1->X

If K=26
Y+1->Y

If K=34
X+1->X

If K=24
Y-1->Y

; this code controls boundary collisions
; 8 is the height of the screen
If X<1
8->X

If Y<1
R->Y

If Y>R
1->Y

If X>8
1->X

ClrHome

Output(X,Y,Str1)

Goto F

Todo

  • add multiple-string support for appearance of height
  • obstacles? collectables?
Personal tools