Archive for November, 2022

Demon – A Debugger for the 16 bit 6809 CPU

Sunday, November 13th, 2022

Just a quick post. Way back in time I did development work using the Z80 CPU from Zilog. It was good but I always wanted to play with the Hot New Hardware of then time: the Motorola 6809 processor. Flash forward about 40 years (yikes!) and I found Grant’s Six Chip Computer, the 6809 edition. A quick $40 or so order to AliExpress and I had all 6 parts I needed to build one, which I did.

Assembled G6CC 6809 Computer

(Before you ask, yes there are actually only 5 chips. To avoid mucking with RS232 level adapters I removed the RS232 level converter and instead used an FTDI adapter that talks TTL levels to the 6850 serial chip.)

After playing with BASIC for a few minutes of course the next step was to write my own standalone debugger. Using one I wrote for the Z80 as a base I ported it to the G6CC hardware. Wanting to learn the 6809 instruction set I decided to add an instant assembler, disassembler and tracer that could trace into EPROM. The result was Demon (DEbug MONitor) 1.7 for the 6809 the source for which you can download here:

Source code for Demon 1.7 Debugger

Future plans are to port a dialect of FORTH I wrote long ago to the 6809. When that’s done I’ll post it one this site as well.

Why did I do this? No idea, other than it was fun to be doing bare-metal assembly language programming again.