Day 9: The search for a working Assembler

My patience is running thin, but thanks to some folks on the RC2014 for pointing me in a few possible directions.

First of all.  Xmodem. Somehow my terminal settings got changed, and I couldn’t get files transferred.  You need RTS/CTS on, DTR/DSR on, and XON/XOFF off.  It’s still a miserable way to move files, but better than nothing.  There’s a way to do it with the CF card, but it’s… a lot of steps, and maybe needs a linux machine?

Second of all, there are like 3 or 4 different packages called “Z80ASM”.  Fortunately someone posted the manual for one, and I was able to find it. It’s Z80ASM by SLR Systems, which I found here.

I tried to run the wrong version of Z80ASM (which may very well have been intended for another platform), and I got the message BAD LOAD.  This means that you attempted to load a binary that’s larger than the Transient Program Area.  Shouldn’t have been surprised, as the binary was like 80k (Eeeuge in the realm of 8 bit micros).

Z80ASM is installed, and is at least throwing a copywright message (1983 – 1986) and an error, so I’m going to assume it’s ‘working’.  Now to understand what it wants.  There’s a host of options, presumably a fraction of which I should learn.  The most important thing to remember with this and a lot of other programs I’ve come across in the CP/M world is that it expects the file to have a specific suffix, and you need to tell it what drive(s) to use.  In order to compile the file TEST.Z80, you type ‘Z80ASM TEST.C’, telling it that the file named TEST.Z80 is on drive C (even if that’s your current drive).  This is a hold over from when everything was on floppies which were 180k – 360k in size.  There may have been a good chance that you wouldn’t have room for the compiler, the source, and the object file on the same disk.

Speaking of object files, this compiler spits out COM files directly, so you don’t need to run the LOAD command on HEX files.  Yay.

I took the worlds simplest example from the CP/M assembly book, and translated the few opcodes for Z80.

Code language: JavaScript (javascript)

Sweet baby jebus, I finally have a working Z80 compiler.

(also, how useless is the code box in WordPress if it doesn’t accept TAB?!?)

This entry was posted in Blinking Lights. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *