Assembler fully working
The new LLVM-based assembler is fully working, and 100% of the regression tests have been moved over to it as of this afternoon. It took close to 9 months to get done, but it’s all working now and gives us much more flexibility than the old seasm assembler did, since it was always intended to be a stopgap solution.
After finishing that I spent some time shuffling instructions around. Instructions that encode a register need space with matching low 6 bits in 4 different areas of low microcode space, and there was a lot of things left in the low space that should be moved to high. I moved a bunch of the “bottom half” of multi-part instructions into high microcode space, and shuffled a lot of tiny instructions around to free up contiguous blocks of space in the low area so we can start implementing the boolean operations next. I also added some functionality to the microcode compiler to allow including other instructions but modifying the last next_addr to point elsewhere, which was used to split up call. Since call is by far the longest instruction there is currently, it really makes sense to split it up, which this new functionality allows.
Having looked at the microcode compiler for the first time in awhile, I’m thinking rewriting it soon might be a good use of time. It was originally a small tool and has grown over time to be quite large, and the code is a mess at this point. I mostly just avoid touching it and try to work around things in microcode where I can, but I’d like to rewrite it to be more modular and extensible instead of just never touching it. There’s a lot of microcode still to write, and having a more flexible tool would be nice.