User Tools

Site Tools


history

This is an old revision of the document!


Back in '09 I was moving between jobs and decided I would start on making a better version of 9LC.  I started by creating a simple language that resembles the existing 9LC one, but was not as terse as 9LC.  Keywords and statements would tend to be longer than their 9LC counterparts.

I wanted support for constants and better support for the ability to rename registers, better symbol handling so that programs, labels and registers could be referred to using human-friendly identifiers and not have the limitations of requiring or prohibiting the use of hex identifiers in certain places.

After deciding on what I wanted it to do, I had to decide on how.  The Irony toolkit had recently been released and seemed like an interesting thing.  Better than YACC and LEX (or Bison and Flex for you younger folk) anyway.

Life got in the way eventually, and development stalled for a while.  But each time I turned on the 9010A to work on something, I thought about the project.  Over time and a few updates to Irony and Visual Studio, I started making headway on my little project.  Eventually, I want to create a package that can be incorporated into the Visual Studio shell (e.g. VS Code) so that users can get the full IDE experience including things like syntax coloring, passive error indications, folding, suggestions, autocomplete, etc.

I ended up adding a few features like a few intrinsic commands for things like a Delay, Fill or RampFill, selective debug stepping, and code optimizations.

I had a few bumpy starts, like problems generating the correct 9010A binary code, or dealing with incorrect documentation that caused me to generate code that I thought was valid was really was not:

Img1 and img2

But I got the compiler working and the executable has support for decompiling, serial transmit and receive to make it easy to load the 9010A, and can also generate 9010A checksum values. 

I call the new language 10LC, just because I could not think of anything better.  It supports const and alias which make it easier to manage registers and program-specific values.  It will optimize out redundant assignments and optimize if expressions that are known to always be true (which are optimized to the goto expression) or false (which are removed).

Programs and labels can be referred to by symbolic name, and you have the option to force a program number without screwing-up the automatic numbering of programs.

You can also write tests that use less-than and less-than-or-equal expressions, and the compiler flips the ordering and comparison for you and numeric values can be entered in decimal or hex and can be freely mixed within a statement.

If you are used to the existing 9LC's keywords and behavior, you should be able to work with 10LC without too much trouble.  Here is an example that does the same thing using both languages;

Example 1

Next, if I can successfully decompile the 9010A's ROM, maybe I could write in additional features that can only be accessed via the binary (program loader) interface.  Maybe implement my intrinsic commands on the 9010A itself one day?

history.1581531809.txt.gz · Last modified: 2020/02/12 12:23 by adminz