MOONROCK COMPILER AND DEVELOPMENT LANGUAGE
NEW: Simple Little Compiler (new compiler) - Latest release November 2000. Not directly MoonRock related but it shows some of the techniques used in writing a compiler. 3 different programs in MoonRock source and compiled form included.
NEW: THE FINAL RELEASE - MoonRock v0.50 (20th November 1998) moon050.zip
NEW: THE EARLY DAYS - MoonRock v0.06 (17th January 1995) moon006.zip ...for nostalgic value (and some clues at alternative syntax I played with earlier)...
A lot of you only ever pick up MoonRock related pages from this site. Want to find out a bit more about me? Go to my home page.
What is MoonRock?
MoonRock is a BASIC-like language with several extensions. Produces small and tight executables (MS-DOS). 8086, 80186+ or 80386+ code. DOS real mode or DPMI protected mode.
Archive includes compiler, ArrowSoft assembler, documentation and sample programs.
Some more detail on MoonRock
MoonRock was begun as a pet project in late 1994, as I did not like the size of the executables that MicroSoft's DOS BASIC compilers, such as QuickBASIC, spat out. Due to the way that the libraries are organised, a lot of dead code (that is never used) is included in your executable at link time. (Let's not go into how bloated a VB/Win application ends up....)
Initial versions of MoonRock were very primitive, and limited. Dynamic (variable length) strings were non existent. There were few optimisations. A86 (a shareware assembler) was the only assembler supported. Later versions had better optimisation, and some speed sacrifices to reduce size. The memory manager was sufficient, but slowed down considerably when trying to handle more than a couple of hundred objects. The current version of MoonRock has dynamic strings with a much improved memory manager, written from scratch. The output is in "generic MASM" format, and should be able to be assembled by any compatible assembler, such as A86, TASM, ArrowSoft assembler (which is supplied with MoonRock), and of course MASM.
The current version of the compiler is written with MicroSoft's QuickBASIC and Visual BASIC for DOS. A new version of MoonRock is being rewritten from scratch, coded entirely in MoonRock. It is far more powerful than the current released version (which is severely limited with evaluating more than simple expressions). I hope to eventually have it produce either ASM, OBJ, COM or EXE files directly; the internal format used to store intermediate compiled code makes this relatively simple. A _very_ early beta (totally unsupported) is available along with the MoonRock compiler source: mrsrc017.zip. This demonstrates the greatly enhanced parsing abilities of the new compiler, but don't expect it to work too well otherwise. :-)
Sites to download MoonRock from (moon050.zip, 270k)