While I had monitors on my mind, I also decided to take a look at Micromon 64, which Bill Yee converted to the C64 from the VIC-20. It was available as a type-in program in Compute's First Book of Commodore. I contacted him and asked him if he had any sources for it, and his answer was "no, because there were none." Apparently it was edited in place in a monitor from the original VIC-20 binary.
Micromon for VIC derives from Micromon for the PET which appeared in the January 1982 issue of Compute Magazine, in an article written by R Arthur Cochrane:
https://archive.org/details/1982-01-compute-magazine. That article states that Micromon is based on Extramon by Bill Seiler, which in turn was an extension to TIM, which was the original monitor on the first kit that MOS sold for the 6502, which included just a RRIOT chip pre-burned with the monitor and an instruction manual. The user had to provide the 6502 and all the passive components.
TIM was modified for keypad and 7-segment displays and became KIM on the computer by the same name. Later TIM was adapted for use on the PET, and eventually incorporated into the upgrade ROM provided by Commodore. It was at that point that Bill Seiler built Extramon on top of TIM, which apparently is when the code from the Apple II assembler/disassembler was introduced. So far I have been able to find neither binaries nor sources for Extramon. From that point, the lineage of the monitors split into two taxa: Micromon and Supermon, both for the PET. Both had offspring for the VIC-20 and then the C64. Supermon64 was enhanced with features from the Commodore 128 monitor to create Supermon+64 in 1985, which is the version that I have commented in my github repository. And from Micromon, Commodore created the MADS Monitor, and HES derived Hesmon.
Now, with the Book of Genesis out of the way, here are the sources I have been working on for Micromon 64:
https://gist.github.com/jblang/2cab2d04 ... 05d6222c8c. I disassembled Micromon using regenerator 1.7 by Nostalgia:
http://csdb.dk/release/?id=149429. From there, found the strings in the binary and figured out where the command table was. With that knowledge, I found the command vector table and from there the address of all the major functions.
After identifying the major subroutines, I set about deciphering the various I/O routines, which are a special kind of spaghetti code. I have never seen so many JSRs. The assembler and disassembler code are basically the same as Supermon 64, which is to be expected since they both derived from Extramon. Code for many of the top-level functions (Hunt, Compare, Transfer, Memory and Register Display and Modify) are pretty similar between the two. The major difference between the two is that the input routines on Supermon+64 are much saner and more understandable, as well as more flexible, not requiring a set number of digits and allowing inputs in any base.
The most interesting parts of Micromon are the single-step debugging functions: Break [b], Walk [w] and Quick Trace [q], since those don't exist in Supermon+64. I have started tackling those but still have quite a way to go. They make use of interrupts and some pretty convoluted logic that is going to take me a while to unravel.