1. Home
  2. Computing & Technology
  3. C / C++ / C#

Star Trek Game Conversion Project

By David Bolton, About.com

2 of 8

Learn About Tiny Basic and Converting it to C

About Tinytrek

Most Basic commands are abbreviated as shown below.
A.=ABS F.=FOR GOS.=GOSUB G.=GOTO
IF=IF I.=INP IN.=INPUT L.=LIST
LO.=LOAD N.=NEW N.=NEXT O.=OUTPUT
P.=PEEK P.=POKE PR.=PRINT REM=REMARK
R.=RETURN R.=RND R.=RUN S.=SAVE
S.=SIZE S.=STEP S.=STOP TO=TO
U.=USR W.=WAIT
Remember that Tiny Basic was an interpreter so that programs could be stopped, edited and then restarted. The direct commands like Run, Save, Stop, and Next are not needed.

Star Trek uses a subset of the commands A. F. GOS. G. N. REM, R., R.(), IN,, P. and IF. Note the possible confusion between return which is R. and random which is R.(). When doing cut and paste, look for R.( first and convert to Random( then find the remaining R. and change those to return.

The language only has 26 variables A-Z and these are 16 bit ints. I've used a normal int throughout.

On the next page Converting by Cut and Paste

Explore C / C++ / C#
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. Projects
  5. Star Trek Conversion
  6. Learn About Tiny Basic and Converting it to C

©2009 About.com, a part of The New York Times Company.

All rights reserved.