# http://www.ex-parrot.com/~tom/calcs/calcs/encyc/progs/src/ant.ctf # ======================================================================== # Program name: Ant/String # # Version: 1.0 # Author: Tom Lynn # Date: 1995 # Models: 7000, 7700, 9700, 9800, 9750, 9850, 9950, 7400 # # # Description: # # Random walk 'screensaver'. Draws either an ant crawling around the # screen, or a growing piece of string (ant-trails). Stops if ant gets # to top-right corner. For any other edge, ant teleports to opposite # edge. String program only stops when [AC] is pressed. # @@ Program "~ANT" Range 1,127,0,1,63,0 ; Non-widescreen calcs: Range 1,95,0,1,63,0 "1. ANT" ; (Range is ViewWindow on 9750, 9850 and 9950s.) "2. STRING" ?->O 62O->A 30O->B (-)1->C~D Lbl 1 C->G D->H D=0=>Int 3Ran#-1->H D=0=>Goto 2 C=0=>Int 3Ran#-1->G C=0=>Goto 2 Ran#<=.5=>0->G Ran#<=.5=>0->H Lbl 2 G=H=>G=0=>Goto 1 G->C H->D Abs G+Abs H<>1=>Goto 3 2G->G 2H->H Lbl 3 A+G<=3=>125->A ; Non-widescreen calcs: Change 125 to 93 B+H<=3=>62->B A+G>=125=>3->A ; Non-widescreen calcs: Change 125 to 93 B+H>=62=>3->B O=2=>Goto 7 Cls Lbl 7 2->M Goto B Lbl A A+G->A B+H->B Lbl B Plot A,B Plot A+1,B Plot X,B+1 Plot A,Y Dsz M Goto A O<>2=>A>=123=>B>=60=>Goto 8 ; Non-widescreen calcs: Change 123 to 91 Goto 1 Lbl 8 Plot 0,0 # ======================================================================== # CTF compliant. See http://www.york.ac.uk/~tw104/casio/ for details. # # More programs and information at: # http://www.ex-parrot.com/~tom/calcs/calcs/encyc/ # # This file last compiled: Friday, 30 April, 1999 # ========================================================================