So back in the day, one of my Cosmac 1802 projects was getting FIG-Forth up and running on the 1802.
I laboriously converted the printed listings to a digital assembler source file. This file was then assembled with a cross-assembler that was written in BASIC.
As part of that effort I also modified the Forth system to run from EPROM.
Since I wanted to get Forth running on the 1802 Membership Card (see earlier blog post), I needed the ability to assemble that source, and do some updates etc.
In the same way it’s been a long time since I’ve had a computer with a parallel port, it’s been a long time since I’ve had a computer with a BASIC interpreter installed.
The obvious next step was to write an assembler in a more modern language. Again Python was my tool of choice.
This is a fairly simple assembler, just sufficient to assemble my ancient FIG-Forth listings. It is not a macro-assembler and I’m sure has other limitations relative to a “real” 1802 assembler.
The source is available here: Cosmac 1802 Assembler
This plays nicely with my 1802 Membership Card Loader. The loader can invoke the assembler automatically when given a source file, allowing you to give one single simple command line that assembles the source and downloads it to the Membership Card.