[Coco] Unit tests on an 8 bit machine
Sean Conner
sean at conman.org
Fri Dec 1 21:43:10 EST 2023
It was thus said that the Great Joel Rees via Coco once stated:
> Sean, not to second guess writing your own assembler (I do things like
> that, too.), but lwtools code looks fairly hackable to me. Was it just too
> much functionality to wade through? That was my reasoning at one point,
> but I didn't have time to write the assembler, so I ended up just using
> lwtools as it was and it works pretty well for me.
I used to use A09 by L. C. Benschop, but that was pretty minimalistic (and
the code quality could be better). I only recently heard of LWTools, and it
does seem nice, but it uses Mercurial for source control, and I don't. So
there's that. Also, I don't need support for all the other CPUs it
supports. And I have a few quibbles with the code, like hiding function
declarations behind a macro (makes it harder for tools like tags to properly
index the code). And ... it's a SEVEN pass assembler?
So why write my own? It's something I've wanted to do since college (when
I just missed the class on writing your own), and now is as good a time as
any. It's already usable (the version on Github [1]) supports both binary
and Coco-specific output, and SREC output is done but not yet public).
And because I wrote it, it's easier for me to work on the unit test
support. As I write this, I just finished up a "proof-of-concept" where I
can actually run a test case from the assembler, in 6809 assembly code
(using an MC6809 emulator library [2] I wrote several years ago).
-spc
[1] https://github.com/spc476/a09
[2] https://github.com/spc476/mc6809
More information about the Coco
mailing list