r/homebrewcomputer • u/ceharris414 • 10h ago
ca69: new assembler tool chain for 6809/6309
I'm happy to announce ca69, an open-source assembler toolchain for the Motorola 6809 and Hitachi 6309. In my work with the cc65 toolchain for the 6502, I have really come to appreciate its clean syntax, powerful directives, and its incredibly flexible linker that makes it really easy to create system images for virtually any hardware configuration. Imitation being the most sincere form of flattery, ca69 uses ca65's source syntax and ld65-style linker configurations, extended to cover the full 6809 and 6309 instruction sets. The toolchain includes the ca69 assembler and the ld69 linker, which can output binary images, S-records or Intel HEX, along with map, label and debug files. It also includes utliities for creating object libraries, dumping object files, etc.
For older code, tr69 converts sources written for as9, a09, or FLEX's ASMB into ca69 source that you can subsequently modify and maintain in a modern form. Starting with the CoCo ROM sources it produces byte-for-byte identical binary objects to what is produced by the a09 assembler. ca69 can also assemble those older dialects directly with --dialect, without saving the translated result.
In the interest of full disclosure, I want to note that generative AI has been used extensively in producing this work. If this bothers you, please just disregard this post and the product. In more than four and half decades in this field, I've written many interpreters, compilers, and assemblers, for many different languages. I could write an assembler and linker for this machine architecture myself, without AI assistance. But at my age, I don't want to spend my time writing cross-development tooling for my beloved old hardware. I want to spend my time writing code for that beloved old hardware itself.
ca69 is written in C11, builds with CMake, and runs on macOS, Linux and Windows (via WSL2). It comes with a full user manual (online and as a PDF) and a VS Code extension, also on Open VSX, that adds syntax highlighting, completions and builds. The code is MIT-licensed at https://github.com/ceharris/ca69. Feedback, bug reports and contributions are welcome!

