I just finished Clawsemble!

I just recently finished Clawsemble!

For all of you who don't know what Clawsemble or Claw in general is, here's a quick explanation:

The Claw Development System (or simply Claw) is a set of compilers, standards and virtual machines that are compatible with a variety of embedded devices and desktop computers. All these systems are able to run and build the same, binary-compatible bytecode without having the programmer or even user deal with incompatible libraries, different processor architectures, operating systems, hardware, screen sizes and other problems. The assembler and compiler can easily deal with that and produce bytecode that runs unmodified on a lot of platforms, even without recompiling the code. Claw also allows overcoming hardware limitations as it has a very low memory footprint. It is modular and allows libraries to be loaded on the fly. Hardware abstraction is done using cleverly crafted hardware modules that can be switched in and extend the instruction set of Claw. One of the greatest features is, being able to run code right off an SD card. Programs can be up to 60 KB (on 16-bit systems), 4 GB (on 32-bit systems) or basically endless on 64-bit systems. By enabling software compatibility for 32-bit on 16-bit CPUs, all 32-bit features can be used, albeit with noticeable slowdown. On Harvard architectures such as AVR, Claw allows for the execution of arbitrary code from RAM or SD card, making systems with interchangeable software possible (e.g. game consoles or modular hardware).

Clawsemble is simply the so-called assembler that can turn your human-readable instructions and directives into bytecode that Claw can read and execute. This part of the projects took me over two months (working on it almost every day). It is really quite feature packed and does a lot of work and error checking for you.

On the left side of the image, you have the input file that is processed by Clawsemble (which you can see on the right).


If you have a look at the output executable that Clawsemble created, you can see, it's just binary data. Also, it is a lot smaller that the input (source) file.


Now that Clawsemble is finished, I will be focusing on the VM part again. There are a few things with Clawsemble that I will be revisiting in the future but they are nowhere critical.

I would be really glad if you could test Clawsemble. Simply download the latest executable and the sample file from here. It works fine on Windows, Linux and Mac albeit being an EXE, however it requires Mono or .NET Framework on all platforms.

This article is my 5th oldest. It is 431 words long, and it’s got 0 comments for now.