Back to Projects

TRC Interpreter for JVM

This is a placeholder page. I intend to rewrite this whole page.

Introduction to True BASIC

In the early '90s I read an American magazine called PC Magazine from my dad. The issue had an article called "Not so BASIC anymore" and covered and reviewed many DOS and Windows (version 3, if I recall correctly) based BASIC compilers, from the most popular dialects to really obscure ones (ZBasic). It introdued me to a commercial company called True BASIC, Inc., that offered their True BASIC programming language, at the time for MS-DOS, but before that it was available on many popular home computers of the '80s, like Atari ST and the Commodore Amiga.

True BASIC for MS-DOS screenshot

True BASIC was originally designed by Thomas E. Kurtz and the late John K. Kemeny. The original developers of the BASIC programming language. They had created the BASIC language and apparently were both upset with the changes that other companies made to their creation (Microsoft, especially). They thought they could beat Microsoft by making a new commercial version, based on their existing Darthmouth BASIC product.

While never becoming really popular, it was used on many American schools and used there to teach students programming.

True BASIC was at one point available to many home computers. To ease porting, they wrote a huge chunk of the package in True BASIC itself. This resulted in tools and libraries that were slower than the competition (computers were seriously slow back then...), so that was a common complaint.

Fast forward to today. The True BASIC, Inc's company name and assets changed owners several times. The newer 32-bit Windows version is still sold today, by an individual that bought the assets. Unfortunately, it is not being actively developed anymore, as all recent previous owners did not find the means to compile the (quite old by now) C (or maybe C++?) source-code. Sadly, the existing interpreter has a lot of issues and bugs on modern machines. The fact that the sold version is based on a beta version, that was never completed, does not help much.

True BASIC GOLD 6 for Windows screenshot

I found a full set of documentation for an early MS-DOS version on eBay and could not resist buying the set.

True BASIC reference and user manual

My TRC Interpreter for JVM attempt

If you want to find a modern, good paid job as a programmer (software developer, software engineer...), my advice would be to NOT touch any version of BASIC and try learning Python instead. BASIC is (quite) dead in this age. It's only offered by very small companies, with questionable prospects for the future. Unless you count Visual Basic .NET from Microsoft as a BASIC dialect, but I believe that also lost steam and you'd be better off with learning C#.NET right away.

If you don't fancy a professional, modern job in programming and you're just looking for a new hobby to dabble in, then BASIC could be an interesting choice. It can also be a nice way to spend time, especially if you used BASIC in the past and want to get back into programming in your spare time.

Although I have not been a user of BASIC for many years, True BASIC always kept fascinating me. You can tell it was designed by people that really cared about the language and put a lot of thought into the design alone. Even without market value, it really is a nice language for learning programming in my humble opinion. It's much simpler to learn than something like Python. And still pretty powerful, especially for Windows desktop applications. Also, it is documented really well, which was typical for commercial products in the '80s and '90s.

True BASIC can be used to write clean, fully structured code, in the right hands. An example of the forward thinking of the designers: It offered modules, that can hide implementation details, like private functions, from consumers of the module. It did this in the late '80s (eat that, Python!). There's not much to unlearn, as the techniques promoted by True BASIC are still worthwile to know today.

I was also intruiged by the compiler. It compiles BASIC source code to very small binary, tokenized TRC files. An interpreter, provided by True BASIC, runs the code and executes it. Even when compiling to stand-alone EXE files, it simply embeds the interpreter and the binary tokenized code in a single executable file.

Long story short, I am attempting to create an interpreter, written in Java, that runs binary TRC files.

I don't have access to the original interpreter source code, instead I simply write BASIC code, compile it with a True BASIC compiler and analyze the generated TRC file in a binary editor and try to figure out how the compiler encoded the program.

I made more progress than I thought I would, but I'm really only in the early stages. It can run some very basic (pun intended!) True BASIC scripts, that are compiled to TRC file.

To be continued...