Monthly Archives: June, 2015

Cosmac 1802 Assembler in Python

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: https://github.com/donmeyer/cosmac-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.

1802 Membership Card Loader

So I built Lee Hart’s slick little 1802 Membership Card and its Front Panel card. Next I wanted to load some programs onto it! There was that nice DB-25 connector all ready to connect to my PC’s parallel port. However… I’ve got a Mac, and haven’t seen a computer parallel port in perhaps a decade.

My solution to this problem was to create my own interface hardware based on an Arduino. I considered using a Spark Core to allow doing things wirelessly via WiFi, but decided that for this purpose the Arduino was something more people were likely to have, and it was just a somewhat simpler solution.

The final design uses an Arduino, a 16-line I2C port expander chip, and some software. The software consists of the Arduino program and a Python program that runs on my Mac. Since it’s Python, it should also run on a Windows system, a Linux box, etc.
You can also forego the Python side of things and directly control the Arduino loader from a terminal, or from your own software if you prefer.

Why go to all this trouble? Just a fun little project!

It’s been a good mental exercise and a nice trip down memory lane.

Here is the Git repository with the source code and documentation:  https://github.com/donmeyer/membership-card

 

1802 Loader Documentation

Coming up next – an 1802 Emulator

Unification Day!

Today I merged my blogs. Yes, I’m at that advanced level where I can ignore and fail to update not one but two blogs!

One was more technology related, and hosted on my company site (Stormgate Software), and one was this one, a more personal blog.

The theory was that I’d post things related to the company, or software and hardware technology in general on the “business” blog, and post personal stuff here. That way I could point potential employers etc. at my tech blog, and not at my more personal stuff.

The reality is that even my personal blog contained a fair amount of technology posts, and really nothing that I’d feel uncomfortable about having as part of my online digital extended “resume”.

If there is anything truly personal, it tends to go on my Facebook page. And even there I try and avoid anything too polarizing or private. I’m linked on FB with both current and former co-workers, so even there I keep in mind the potential variety of my audience. And if someone want to not hire me because I support, say, women in technology, would I want to work for them anyway?

I’m hoping that by careful categorization and tagging the mix of tech and “other” will co-exist nicely.

My goal is to post more blog articles as well. We’ll see how that goes!