The CP Window is used to examine and control the CP. It has 3 sections. The top section is a FileWindow used to record a running commentary of various interesting things. The log file is CP.log$. The second section is a FormSW. Most of it is commands, but there are a few typein slots and a slot to show the current state of the CP. The rest of the window is the CP Panel.
Built-in symbols
The CP symbol manipulaton routines contain a large collection of built-in symbols.
.CR n is location n of Real Control Store. .CV n is location n of Virtual Control Store. (The nth instruction in the microcode listing.) Pass 2 of Mass determines the mapping between CR and CV.
.MR n is location n of Main Real memory. .MV n is location n of Main Virtual memory.
.MAP n is the nth word of the map.
.RH n, .R n, .U n, .TPC n, .LINK n, Q, and L0 through L7 are the obvious things. So are .IB, .PC16, .STACKP, .IBPTR, .MINT, .EKERR.
A number is normally interpreted as a location in main memory.
If an expression for an R register in the left side of a tile in the CP Panel is prefixed with a $, the RH/R pair will be displayed as a 24 bit number.
CP Commands
Boot! goes through various steps to initialize the CP and the CP Panel so you can start debugging. It forgets all the current CP symbols and break points. It then does a low level boot on the CP. On the DLion, this will automatically boot the IOP unless it is already talking to Burdock. Then the CP Kernel is loaded into Contol Store, and the CP Kernel task is started up running the Kernel. Dicentras don't have tasking, but the innards of Burdock save and restore the CP's PC to fake the kernel and emulator tasks. After the CP Kernel is loaded, Burdock looks around for extra banks of Control Store, and if it finds any, it loads a copy of the Kernel into each extra bank. Finally, Burdock reinitializes the CP Panel.
All of the various Load commands use the current selection to specify a filename. For loading microcode, the default extension is .fb. For loading symbols, the extension is .st.
Load! is used to load microcode into Control Store. First it resets the CP symbols, CP breakpoints, and CP Panel. Then it loads the microcode. Then the CP Panel is reset.
LoadMore! loads microcode and symbols without resetting anything. This is useful if you have more than one bank of Control Store. (The symbol tables probably get confused if you load two hunks of microcode into the same bank, even if they don't smash each other. This could be fixed.)
Start! evaluates the current expression as a CP symbol. The answer contains a task number, a cycle number, and a control store address. If the cycle number is c1, then the TPC for the specified task is set to the control store address. Then the CP is Continue!ed.
Continue! just lets the CP start running again. On a DLion, the IOP will be continued too if that makes sense.
Stop! stops the CP. The CP Panel will be automatically refreshed.
Run! runs a Burdock command file. The filname is in the File: slot. If that is empty, the current selection is used. The default extension is .burdock.
LoadRaw! is a hack for loading a diagnostic or scope loop when the CP is too sick to run Burdock's Kernel. It resets everything, loads the microcode and symbols, and then starts running the CP's Kernel task. Thus your microcode should specify a StartAddress for task 7.
LoadNoSyms! is like Load! except that loading the symbols is skipped. This saves time if you don't need them.
LoadSymbols! is used to load symbols when you change your mind after using LoadNoSyms.
LoadGerm! is used to load a germ into memory. It assumes that the initial microcode has already initialized the map. The default extension is .germ.
LoadReal! is leftover from the old Alto days before LoadGerm and LoadBoot existed. The default extension is .cpr. It loads a file into CP main memory. This was also used to dump fancy pictures into DLion display memory.
Using LoadReal to load a germ is a krock. Unfortunately, nobody has taken the time to cleanup the mess in this corner of the DLion world. Most of the space in the germRM files is taken up by blank map entrys, and thus most of the time spent loading the germ is wasted. On top of that, you need a separate file for each size machine.
LoadBoot! loads a boot file. Like LoadGerm, it assumes that the initial microcode has already set up the map. The default file extension is .boot.
Refresh! refreshes the CP Panel. This involves reading all of the specified locations and updating the display. A * will appear next to each slot that changes. The display is automatically refreshed each time the CP is stopped or hits a breakpoint. Manual refresh can be used to see if the hardware has changed it's mind, or to catch the sneaky case when you have two slots pointing at the same register and you changed one of them since the display was last refreshed.
What! evaluates the current selection as a CP symbol and prints the answer out in hex, decimal, and octal. If the selection is just a number, this can be used to convert from one base to another.
ListBreaks! lists the current CP breakpoints.
ClearAllBreaks! forgets all of the current CP breakpoints.
UnBreak! evaluates the current selection as a CP symbol, and if there is a breakpoint at that location, it is cleared.
Break! evaluates the current selection as a CP symbol, and sets a CP breakpoint there.
Compare! uses the current selection to read a microcode file. Each word is compared with the contents of Control Store. If they are different, an error message is printed. (On a Dicentra, this can be used to check Control Store PROMs. See the Dicentra documentation.)
CrossJump! is a hack to help microcoders locate instructions that might be easy to bum out.
Remember, it's a hack. Thus the user interface is a bit crude. First Boot the CP and Load your microcode. Then, without changing the selection, poke CrossJump. Each line of prinout contains a list of addresses. The instructions at those locations are all identical.
The trick is to look at (all) the previous instructions of each candidate to see if any of them can be changed to jump to one of the alternates. Lots of times you can't do it because of addressing constraints. If the constraint is loading a link register, you can sometimes move it back an instruction or two.
When I scanned the microcode I'm using in the Dicentra, the printout was 2.5 pages long. I easily found a dozen instructions to merge, and there were another dozen (or so) in parts of the Emulator that I have not changed from the DLion.