3 ms·
I loved coding assembly on for the 6809 for the TRS-80 Color Computer: there was the cartridge editor/assembler, a disk assembler, and eventually an assembler
by PaulHoule 3y ago
I loved coding assembly on for the 6809 for the TRS-80 Color Computer: there was the cartridge editor/assembler, a disk assembler, and eventually an assembler for OS-9 that worked together with C, Pascal, and other compilers. (e.g. if your assembly function or a wrapper around it follows the calling conventions, you could write your tests in an HLL)
The 6809 team saw themselves as revolutionaries of system software for microcomputers in that the 6809 supported PIC (Position Independent Code) which could be used to implement shared libraries, even in ROM.
So it is totally in character to have your function in one file and have another file with a test harness and another with the actual test that when linked together form a program.
So far as the verbosity of the tests you could solve that with a good macro assembler although I don't remember ever using one for the 6809. The Coco3 could support 512kb of RAM so it could have supported a full phat assembler in OS-9. Macro assembly for the IBM 360 was particularly powerful because you could specify a register in an argument, I am wondering today if you could get away in 6809 with adding an "LD[parameter]" instruction which could assemble to LDA, LDB, LDX or such depending on the value of parameter.
The tests don't have to be as comprehensive as he says they should be, though some fundamental algorithms really can use a comprehensive test.