Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.13 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.13 KB

TinyBasic

Interpreters for Tiny Basic.

gw.bas is an interpreter for Tiny Basic written in GWBasic.

It supports:

  • bye/quit, clear, cls, end/stop, help, list, load, new, run, tron, troff
  • for = to ... next
  • gosub ... return
  • goto
  • if then
  • input [prompt,]
  • [let] =
  • print <expr|string>[,<expr|string>][;]
  • rem or '
  • Operators: + - * / < <= > >= <> =
  • Integer variables a..z, and single integer array: @(expr)
  • Functions: abs(expr), asc(ch), rnd(expr), sgn(expr)
  • ":" to have multiple statements per line.
  • Line numbers are required for programs, but has an interactive mode too.

Has enough features that it can run a Tiny Basic version of Star Trek. Tested in DosBox, running GWBASIC version 3.23.

tests/strek-tb.bas is a version of the Star Trek game, that gw can run.

This was tested via DoxBox, running GW-Basic version 3.23.

Tiny Basic

If you just enter a statement without a line number, it is run interactively:

image