Technical Support Information - Monitor ROM
If you purchased the 2K 2716 Monitor Rom when you bought this kit, you likely received the same instruction sheets that I did. The command set for this monitor is as follows:
|
Since there doesn't seem to be any schematics or boards available for the PROM Burner, in my versions of the monitor, I have removed the code from $0400-$07FF and used it to support a Disassemble command:
|
Notes:
These are the notes that accompanied the monitor rom when I purchased it:
|
SINGLE BOARD HEX MONITOR The Single Board Hex Monitor allows you to exam(ine) or modify the contents of the Z-80's registers, memory, and I/O ports from an ASCII terminal without building any complicated switches, address counters, or buffers. Also included is a very simple memory test program, a program to move memory from one location to another, a program to compare (or verify) two memory blocks, and a routine to load memory from Intel hex tape. BREAKPOINTS The most powerful feature of the monitor is the program breakpoint function. By executing a RST 7 (RST 38H [$FF]), a call 0038H, or hitting the NMI switch on the processor, the contents of the Z80's registers are saved and the Monitor resumes control. You can then exam(ine) the contents of memory or registers, modify them if desired, and resume execution of the program by typing G. Please note that the SIO is only initialized on on Power-Up, or by executing the "A" command. The monitor will use whatever params, speed, etc. that you might have changed, so be careful. HEX ENTRY: All input and output to the Monitor is Hexadecimal Notation, also known as Base 16 arithmetic, or Hex for short. The digits are 0-9,A-F. When entering a hex field, leading zeroes are not necessary, unless you make an error. The Monitor does no error checking of digits, and there is no delete character. However the Monitor always uses on the last two (2) digits if a [port,chan,value], or the last four (4) digits if an [addr]. So if you make a mistake, just retype (including leading zeroes) the value or address. Of course, you can abort the command by typing CONTROL-C. Each [addr] or [value] field must be terminated by a [CR], [LF], [comma], or [space] character. REPEATED FUNCTIONS: The Exam(ine)/Modify register command, and the Substitute/Modify memory command allows you to step thru multiple locations. To terminate the command just end the line with [CR]. ABORT FUNCTION: If you are in the "middle" of a command line, CONTROL-C will ABORT the command. Typing CONTROL-C after you have terminated G command will not abort the command because control has already been passed from the Monitor to the program. |
Here are a few of the monitor's more often used system call locations for you to use. These are very convenient for calling from your own programs, thereby shortening your own coding.
System Calls
| $0008 RST 08H | Transmits a character in A out RS232 port A. |
| $0010 RST 10H | Receives a character into A over RS232 port A. |
| $0018 RST 18H | Checks the status of the RS232 Port A, RX char ready=CY flag set, TX buffer empty=Z flag set. |
| $004C SPC | Transmits a space out the RS232 Port A. |
| $0068 CPHLDE | Performs a compare of HL-DE, sets Z flag if equal. |
| $0072 MON | Normal Entry point for monitor. |
| $0273 HLOUT | Converts contents of HL to ASCII characters and outputs to TTYA. |
| $0294 PRINT | Loads byte at (HL) into counter, prints character string from (HL+1) until counter is decremented to zero. |
| $029B TXCRLF | Transmits a "New Line", CR ($0D) and LF ($0A) characters. |
| $029E BCOUT | Transmits ASCII chars contained in B and C registers. |
| $02BC GETXYZ | Gets characters from user as XXXX,YYYY,ZZZZ; Puts XXXX in HL, ZZZZ in DE, Subtracts YYYY-ZZZZ+1 into BC forming a byte counter. |
| $02DE GETX | Gets the last 4 hex characters the user types as a value into HL. You may type 02343123F3A9B332ABCD, the value in HL would be $ABCD. This works in lieu of tracking an input buffer of text and handling backspace, cursor controls, etc. Backspace does not function, but you will get used to using this feature, young Jedi. |
| $0306 GETXY | Gets the first hex value into DE, separated by a comma, and the second into HL. Useful for setting up a starting and ending address. |
| $030D BCTOA | Converts the ASCII hex characters in BC into an actual byte value in A |
| $0326 ATOBC | Converts the byte in A into ASCII hex characters in BC |
Download
Shortly after I figured out by guessing that RST 08 would print the character in A to the RS232 terminal, I was able to modify and upload a variant of the J. Kerr 1K disassembler into ram [see Software Downloads for this completed program]. I used this, running on the Z80 to get a source listing of its own 2K monitor rom by capturing the text that the Z80 sent across to HyperTerminal as it executed. I saved that into a text document and took up the long task of figuring out what the code was doing, documenting areas as I went. This document also contains the old code that was used to operate the attached EPROM burner pcb. Unfortunately, can't find this hardware anymore. Also, there is an interesting "Easter Egg" section of code at the top of the Rom concerning the 8279 keyboard/display controller.
Download this document in Word format: MONITOR.DOC
I modified this code to remove all the old prom burner code from $0400-$07FF, and to add in the disassembler as well as my LCD driver calls and some other source code as well that I needed routinely. This file included for your convenience. The "N" command in the original 2K rom accessed the prom burner PCB (that I could not get for this CPU, nor schematics). I hijacked this key to vector it to the disassembler command. The command works as Nxxxx,yyyy in which xxxx is the starting address to disassemble and yyyy is the address to disassemble through.
If your computer uses the original configuration, you should probably stick with this release.
Download this version: MONITOR.ASM
Note: I noticed during my first modifications to the monitor rom, that after the user program terminates in a RET, the original monitor appears to come back to the system prompt ">", but in fact it is completely resetting each time. I did not figure this out until I placed a "sign-on message" in the bootup sequence right after the hardware init routines. Every time my user program would terminate, the screen would clear off and give the Sign on message. I have tried to carefully examine the stack operations to see where this might be going awry without success. Much of the problem appears to center around the storage and retrieval of the registers when a "GO" command is initiated, or the user program is RETurned from. On one release, I tried to force the SP into position during the GO and RET sequence, and to place it when Editing the registers, however this caused conflicts and would crash the computer.
I fully intend to change this function so the register info is stored separate from the working stack on my next release.
Modifications and Upgrades
I have modified my Monitor Rom several times, from the original version V4 which I purchased, I am now up to V9.0 (July 2006).
The latest monitor has the following upgrades:
Has improved outputs for the commands:


Here is the most current version I have developed.
Monitor 9.0 ASM

You are welcome to download and use this Monitor program, it requires a 4K 2732 EProm in the socket for booting up.
BUT...
Your board must have the following hardware modifications in place in order to function correctly with this version of the Monitor program:
High Ram, as it locates the stack at $FFD0|
Technical Note: As I develop new monitor releases, I realize they are no longer compatible with the original "Kit Supplied" configuration, and may not be compatible with the modifications you may have installed on your own board. I must proceed with the hardware that I have installed on my board, and I sincerely hope you understand this. I am posting my latest release ("research") in hopes it will be something you can use. I have also posted an earlier, previous version which has the Disassembler command included, but works with the original hardware configuration. If your configuration does not follow mine, you probably should stick to that version. If you have modified your own monitor rom, I would be very interested in seeing what you have done, so Email me! At any rate, Good Luck and Happy Hobbying! |
All information contained herein that is generated by J.Owens (c) 2004, 2005.
Other information credited to its sources.
This Site is not affiliated with Space-Time Productions, Mr. M.Simon, or Mr. Ron Weiss, however I extend a grateful Thanks to those parties.
This site has a sole purpose to provide technical information, and is not intended to infringe any prior
copyrights nor to derive funds that would otherwise be the property of Microsoft, Space-Time Productions
or it affiliates, either past or present.
May the Force be with you.