Subject: Re: Hand-rolling a CP/M machine
From: "Chuck Guzis" <cclist at sydex.com>
Date: Tue, 24 Apr 2007 09:35:02 -0700
To: "General Discussion: On-Topic and Off-Topic Posts" <cctalk at
classiccmp.org>
On 24 Apr 2007 at 12:01, Ethan Dicks wrote:
Right. That much I get... so once CP/M is
running, it's ordinary not
to refer to the boot ROMs? There's typically not a requirement to
keep some low-level BIOSy stuff in ROM?
Nope. CP/M installations are typically self-contained, though there
are a few systems that keep ROM around for I/O servicing. Since
you'll be writing your own boot code, you can do ROM mapping however
you'd like. A simple way is to keep your boot code and monitor at
0000 and have the boot routine from diskette simply unmap the ROM.
Note that the CBIOS code (which not only provides I/O, but also loads
the rest of the operating system is located in high memory and
doesn't require anything in low memory to get going.
True, most (traditional) CP/M system load the whole show in high ram
and rom is either in the way or turned off.
Non-traditional CP/M approach: rom (and ram) if paged in and out can be a
way to park code for the BIOS to keep it out of main ram area. Also
non-traditional is putting the entire CP/M+ bios image in Eprom rather
than on Disk or floppy system tracks.
One caution here. If you need interrupt service (say,
if you're
interfacing a PC keyboard), do not give in to the temptation to use
the Z80 NMI line. NMI vectors to 0066H, which happens to be right in
the middle of FCB2. There are some very messy workarounds for this
for some systems, but the best thing to do is to avoid it. Use a
"regular" interrupt if you need one.
I've seen more than a few get bitten by that beastie. My favorite is
use mode 2 (Z80 vectord) by adding a LS244 to the bus that is activated
by MI/*IRQ/ (interupt ack) to push in a fixed vector or just 00h. In
that mode the IV (interrupt vector) register supplies the high byte
making it easy to put interrupt routines at the beginning of any
256byte page in ram.
I think that the old Tarbell disk controller used a
82S23 bipolar ROM
to read one sector from disk. That's only 32 bytes, but it was
enough.
Just enough!
Allison