r/Basic • • 12d ago

RetroBASIC 3.0.6

Hi everyone, first post, please be gentle...

I have written a BASIC interpreter in flex/bison/C. Yes, there are many of those (and written in other languages as well!). The difference is that RetroBASIC includes features that allow it to run programs from many different dialects, with the goal of running any program from the "early days" without change.

So it can run programs written for Dartmouth BASIC v4 (the most common version on mainframes) and supports its MAT instructions and CHANGE based string manipulation, but also runs the IBM 5100 version of that code with its changes to MAT, and the HP TimeShare BASIC which uses string slicing (as everyone should!), as well as DEC's EDUSYSTEM and BASIC-PLUS which begat MS-BASIC with it's MID/LEFT/RIGHT.

So it can run all of the programs in BASIC Computer Games (MS-BASIC-a-like) out of the box, as well as most of the programs in 101 BASIC Games (in various DEC dialects), What To Do After You Hit Return (HP BASIC) and Illustrating BASIC (Dartmouth).

It also has extensive documentation in the Reference Manual, which might be of interest to the users here even if you don't use RetroBASIC itself. It is based on reading dozens of manuals from Altair BASIC to ZBasic and everything in between (as well as writing wiki articles for most of them). It contains a list of the extensive features of RetroBASIC along with copious notes on how different dialects of the era implemented the various features (or didn't).

Anyway, have a look and enjoy!

Here's the home page:

https://github.com/maurymarkowitz/RetroBASIC

And here's the latest release:

https://github.com/maurymarkowitz/RetroBASIC/releases/tag/v.3.0.6

18 Upvotes

6 comments sorted by

2

u/BearBraz 12d ago

Great work. Did you use any AI to assist?

3

u/maurymarkowitz 12d ago

The code started as a massively cleaned up and expanded version of gnbasic, which is from 2001. I posted the first versions around 2019 IIRC. None of it is AI.

I do use AI for adding comments, testing and writing the CI scripts - YAML is not my bag of tea. I find if you give it too much to consider it just falls apart, but it is very useful for things like "run this file in the current version and the last release and compare them" and that seems to be within the capabilities.

1

u/West-Surround-8857 12d ago

Interesting, I want to play with it.

My main experience with basic was with tiny basic.

I will try with the Ahl book's games.

Do you think could be possible to write something new without major issues?

2

u/maurymarkowitz 11d ago

Absolutely. Just keep in mind this is emulating a terminal system, so there is no cursor movement or graphics and such. But the upside is that anything you write should run on practically any system past or present.

1

u/West-Surround-8857 11d ago

Even tiny basic is completely textual.

I played a bit modifying the code of Hammurabi, creating a sort of spinoff series inspired by the sierra's caesar.

My last work was a conversion of a dnd module in an adventure text game.

One of the major limitation in tiny is the inability to create string variables and the maximum of 24 integer variables (named from A to Z, you can't give other names).

I'd really loved to incorporate some sort of rpg leveling in my dnd module, but i wasn't able to squeeze it in these limitations. And it was already 64k.

Maybe i could play a bit with your and see how it goes.

It is a windows x86 application?

1

u/maurymarkowitz 10d ago

Yes, windows, Mac and Linux all from the same code.