stoned TI-82 Source Code - Skip Header

stoned TI-82 Source Code

This is intended to be the human readable version of the source code for Stoned. This version is intended to work only on the TI-82 Texas Instruments graphic calculator. Also available: Documentation about "Stoned" and versions of the program for other calculators and in other formats.

Any line that begins with a backslash is a comment and should not be entered into the calculator. (Comments have been colored green) For an authoritative copy of this program's source code that can be imported to the calculator via a computer, consult the text version of Stoned source code for the TI-82, along with the character reference. The special character reference also gives an overview of all non-ASCII characters for the calculator, and shows the menus in which they can be found.

\START82\
\COMMENT=Program file dated 04/10/96, 18:39
\NAME=STONED
:ClrHome
:FnOff 
:ClrDraw
:AxesOff
:ZoomSto
:ZStandard
:ZInteger
:27→Ymax
:-35→Ymin
:Menu("FLEA","CAGED",1,"INFINITE",2,"ESCAPING",3)
:Lbl 1
:1→A
:Goto 4
:Lbl 2
:2→A
:Goto 4
:Lbl 3
:3→A
:Lbl 4
:Menu("STONE","CRUSHING",5,"DISABLED",6)
:Lbl 5
:1→B
:Goto 7
:Lbl 6
:2→B
:Lbl 7
:getKey
:0→C
:0→D
:0→I
:DispGraph
:Horizontal -28
:Text(57,15,"PRESS ENTER TO END")
:Lbl A
:E→I
:28→J
:Lbl B
:getKey→L
:If L=105
:Goto Θ
:iPart rand3-1→G
:iPart rand3-1→H
:C+G→E
:D+H→F
:If abs E=48
:Then
:If A=1
:E-E/48→E
:If A=2
:-E+E/48→E
:If A=3
:Goto Y
:End
:If abs F=28
:Then
:If A=1
:F-F/28→F
:If A=2
:-F+F/28→F
:If A=3
:Goto Y
:End
:Pt-On(E,F)
:Pt-Off(C,D)
:E→C
:F→D
:If B=1
:Then
:J-1→K
:Pt-On(I,K)
:Pt-Off(I,J)
:If I=E and K=F
:Goto Z
:If K=-28
:Goto A
:K→J
:End
:Goto B
:Lbl Y
:Disp "THE FLEA HAS","ESCAPED!","YOU LOSE!"
:Pause 
:Goto Θ
:Lbl Z
:Disp "STONED!","YOU LOSE!"
:Pause 
:Lbl Θ
:ZoomRcl
:AxesOn
:ClrDraw
:ClrHome
:Stop
:COPYRIGHT STEPHEN OSTERMILLER 1996
\STOP82\