Contains the assembler for the Gol-16 Assembly Language (G-ASM).
To view the specifications for G-ASM, please view the spec file listed in the main project directory.
This lexer is heavily inspired by the C lexer featured on The Vimagean channel. I have never built a lexer before, so I used this as a starting point. The full source code can be found here.
The assembler comes with its own test harness, which includes a suite of test programs and a test runner executable
which reports primitive statistics. The test harness uses the assembler to compile a list of test programs from source,
and then compares the generated byte code to the hand assembled/verified byte code I've written. Any difference results
in error. You can run the test harness with make test
.
The Makefile for the G-ASM assembler uses gcc and the header files that come with it in MinGW64. It has only been
tested on a Windows 64b machine. In order to run the make clean
rule, you will need to be in a bash shell. I have been
using Git bash on Windows for this purpose.
The assembler currently implements every directive in the specifications except EQU (and DIVS/custom macros). This will be added once I figure out the best way of doing so.