I started a while back writing an assembler for 6809 and 6309 CPUs. While there are lots of decent assemblers for those CPUs available, none of them behave quite the way I want them to. The ones that handle forward references in a useful manner don’t support macros. The ones that support macros and forward references target a specific operating system. Many suffer phasing errors when forward references are present which is, to say the least, annoying. The one I had been using seems to handle most of the situations well enough but it doesn’t have macros and it is not open source so I can’t add them.
The upshot of all of that is that I decided to write my own assembler that will support the features I want. Today, I have it assembling a real source file from one of my projects almost correctly, with only two bytes wrong (on indexed instructions) which will, of course, require debugging. But the rest of the code is completely correct.
There’s still a long way to go to get it to be truly useful, including adding a LOADM file format for the output and implementing all the pseudo operations correctly. But, hey, it produces semi-pretty program listings.