Re: TI-M: Faster Basic


[Prev][Next][Index][Thread]

Re: TI-M: Faster Basic




In a message dated 5/23/2000 12:21:49 PM Eastern Daylight Time, 
tfobrien@mindspring.com writes:

> ClrHome
>  1->R
>  1->C
>  Lbl A
>  Output(R,C," ")
>  getKey->K
>  If K=24
>  C-1->C
>  If K=26
>  C+1->C
>  If K=25
>  R-1->R
>  If K=34
>  R+1->R
>  If R=0
>  1->R
>  If R=9
>  8->R
>  If C=0
>  1->C
>  If C=17
>  16->C
>  Output(R,C,"X")
>  Goto A

ClrHome
1 -> R
1 -> C
Repeat 1=2         ;this will set up an infinite loop, so long as 1 does not 
equal 2
Output(R,C," "
getKey -> K
(K=26)-(K=24)+C -> C
(K=34)-(K=25)+R -> R
(R=0)+R(R~=0) -> R
8(R=9)+R(R~=9) -> R
(C=0)+C(C~=0) -> C
8(C=17)+C(C~=17) -> C
Output(R,C," "
End

That should do the trick, and I think that's just about as optimized as it 
can get.

Eric Tollefson
Cmdr ERT01@aol.com



Follow-Ups: