I had to read this a couple of times, but in the end it seems that unit testing wasn't in the cards and through some hard thinking he arrived at the bug fix he needed.
if your assembler has an include mechanism or at least conditional compilation I could see how you could do unit testing. Like we did in the good old days before we saw the pattern of JUnit and and frameworks
[1] https://mos.datatra.sh/guide/unit-testing.html
[2] Some thoughts on the assembler running unit tests: https://boston.conman.org/2023/11/29.2