About asmj

Asmj is a macro assembler for a handful of 8-bit processors that were popular in the first years of microcomputing. It supports all of the common stuff that I recall from doing assembler work way back when: conditional compilation, macros, compile-time evaluation of constant expressions, etc., etc.. It currently supports six processors, though that is counting the 8085 as being distinct from the 8080, so I would be more comfortable saying five: 8008, 8080/8085, 6800, 6809, 6502. For my own purposes, only the 6800 and 6809 mattered, so the others were barely tested at all.

Asmj came about because the old Windoze(ick!) PC that I had been using for CoCo development work got trashed by a fire. My newer Linux box(yay!) is a much nicer platform, but I was shocked to find no 6809 assembler currently available for it on SourceForge. So, I said (famous last words) "how hard could it be?", and got coding.

Suprisingly, the hardest part so far has been the parsing of numeric expressions - almost half of the generic part of the assembler went into that.

Also surprisingly, parsing the entire instruction set was not so hard. Inheritance does most of the work here, since I chose to implement each insruction as a class. (But then, to save typing, I wrote a little generator to spit out those class definitions from a table of instruction data. And later I decided to make those things each an instance of a common base class, rather than each being a class.)

Since the goal was just to be able to assemble little 6809 programs, the result is not efficient, rich in features, or even very clean. With time, the later two may improve, but because of some early design choices it is not ever likely to be very efficient. On the plus side, of course, it already exists and works, while I might have never built up enough enthusiasm to implement a "better" design.

Last revised: 28-Dec-2010