On 12/25/2010 01:25 PM, Tony Duell wrote:
I suspect
that the reason for this may have been that the original
CP/M was done on computers with 0 based RAM and methods to
load code at 0 on boot.
I beleive the historay can be traced back to the MCS8i
system. This,
AFAIK, never had disks, and never ran CP/M. But it's 8080-based and
amazingly it has a CPM-like IOBYTE at location 3.
This machine has RAM at location 0 by default. The thing is that the 8080
starts executing at location 0, so by puittign RAM there you could enter
a program (or at least a jJMP instruction) at location 0, hit reset, and
run it. That's what you did on the MCS8i. Since a jump is 3 bytes long,
it occupied locations 0.1.2, so location 3 was the first 'free' location,
hence used for IOBYTE. To run the ROM monitor on the MSC8i, you toggled
C3 00 38 (jump to 0x3800) into the first 3 locations, reset, and let it run.
The MDS800, for all it didn't have a front panel, kept the same sort of
memory map (for good reasons IMHO).
FWIW, I have both machines with manuals...
Adding hardware to do the ROM/RAM transfer on
boot is relatively
easy with the addition of a 7474. Most machines decode a I/O
I've seen it done
in all sorts of ways. Including a little state machine
that picks up the first 3 read cycles after a reset, disables data
buffers, etc, so they never go outside the CPU board, and forces a jump
instruciton onto the processor data lines. Or, as you say, having a
This is the common non rom approach for most Z80 S100 cpus.
Another is to invert A15, 14, 13, 12 on reset and hold it with a
D-flop, then
the first bytes of Rom do a jump to F003 where the rom address decode
clear the FF with the PC holding F003 where the actual start of the
monitor is.
My favorite for 8085 and Z80 systems I build is to put EProm/flash/EEROM at
0000 and use a port with a latch to map a ram into 0000 space after loading
from rom to high ram. this works very nicely with 32K
Rom/Eprom and Ram
devices commonly around. it also allows the rom to be large as
32K (or
32K pages)
to allow things like rom disk and other address space stretching tricks.
There are many more ways to skin the problem of ram at zero and reset
starting the
PC at 0000.
Allison