I will describe what I did although the "why" is very much part of it all. This project grew in ways I didn't anticipate or plan.
Using MS Access and VBA:
I wrote a functioning Intel 8080 CPU. This was meant to remind me of the Altair and IMSAI hobbyist computers of the 1970's and allow me to do some programming experiments leftover from my early computer days that began in 1978. Therefore I have a "front panel" that displays register contents and allows the [software] CPU to be run or single-stepped as it executes binary op-codes. An assembler using Intel mnemonics followed as I quickly tired of looking up the binary and typing it in. To prove that the CPU was properly executing instructions I went looking for something serious to run on it. In an archive website I found source code (an assembly listing) for a release of Altair BASIC dated 1978. It wasn't machine readable so I typed it all in. (Yes, it actually runs.) This broke and then matured my assembler. It also proved the CPU and helped me find execution mistakes in a couple of the 8080 instructions. BASIC needs a serial terminal for I/O and I wrote one simulating a Lear-Siegler ADM-3A. (BASIC can now be run/used interactively.)
I would like to make this available as I have some fanciful idea that perhaps someone would get value from it. It would be free and with nothing hidden nor withheld. I plan to provide extensive documentation. (Plus comments and a bit of prose about this project's genesis.)
Brevity isn't my strong suit so I will stop here and provide clarification if asked.
...so can you explain with a specific example?
How do you "write" a cpu?
..and why would you?
...and what might this cpu illustrate?
Again, I may be misunderstanding what you have here, ...but again, I am intrigued...