6

The impression I get is that CP/M relied on the BIOS, provided in ROM with the computer, for all the hardware-specific functions. So if you bought CP/M, you didn't have to specify what computer you had; the same discs would run on any computer with a suitable BIOS...

... almost; unlike MS-DOS, CP/M supported multiple CPU architectures including 8080, Z80 and later 68000. So you would have to be sure to get a version suitable for your CPU.

Is this correct, or was it more complicated than that?

1
  • 1
    CP/M never explicitly supported Z80. The official distribution was 8080 only (with which the Z80 was compatible) Commented Dec 8, 2020 at 1:56

2 Answers 2

7

The impression I get is that CP/M relied on the BIOS, provided in ROM with the computer, for all the hardware-specific functions.

No. Usually only a Bootloader is present in ROM. The BIOS is the hardware dependent part of CP/M (*1), loaded from the boot disk. It was the PC who established the rule to have BIOS in ROM by default (*2).

So if you bought CP/M, you didn't have to specify what computer you had; the same discs would run on any computer with a suitable BIOS...

Of course you had. Well, you didn't when buying an already adapted one from your machine's manufacturer. But when buying a genuine CP/M from DR, you received a BIOS example file and had to tweak that to include whatever hardware your machine had.

... almost; unlike MS-DOS, CP/M supported multiple CPU architectures

So did MS-DOS, including 8086, V20, 80186 and so on.

including 8080, Z80 and later 68000. So you would have to be sure to get a version suitable for your CPU.

No, well, yes in case of 68k, but Z80 (*3) just used the 8080 code. Keep in mind, CP/M-80 (*4) is restricted to only use 8080 code. That way it can boot on any 8080 compatible machines (*5). Machine vendors could (and sometimes did) use instructions specific for their CPU (like Z80) within the BIOS, or applications, but BDOS and CCP was always strict 8080 code (*6).

Is this correct, or was it more complicated than that?

Incorrect and, as shown, way more simple :))


*1 - CP/M consists of BIOS (hardware dependant OS - today this might be called drivers), BDOS (hardware independent OS) and CCP (command line processor).

*2 - Or more correct, even PC-DOS kept that structure. When booting IBMBIO.COM (IO.SYS for MS-DOS, DRBIOS.SYS for DR-DOS) was loaded first providing a wrapper around ROM BIOS. This layer was rather thin in the beginning and mostly intended to allow for future extensions - which happened a lot after DOS 2.0, as IBMBIO.COM now contained all basic device drivers. After that, IBMDOS.COM (MSDOS.SYS for MS-DOS, DRBDOS.SYS for DR-DOS) as OS Core was loaded, followed by COMMAND.COM.

Some MS-DOS machines, like the SIEMENS PC-D, had also only a bootloader in ROM and IO.SYS contained the whole BIOS code.

So bottom line: PC-DOS works exactly like CP/M, except that in the beginning most of the BIOS code was already in ROM, so no RAM had to be wasted for this.

*3 - And other 8080 compatible CPUs.

*4 - As it later was called when other CPU architectures where supported.

*5 - Given a sufficient BIOS is on disk.

*6 - One reason why ZCPR is so hyped - it is Z80 optimized :))

2
  • zcpr was really nice. Commented Jan 10, 2019 at 22:10
  • @ThorbjørnRavnAndersen Well, yes, to be fair, ZCPR was more than just a few Z80 instructions. Much more and quite useful.
    – Raffzahn
    Commented Jan 10, 2019 at 22:14
6

It was more complicated. CP/M disks were generally specific to a particular model of computer.

During the CP/M era a great number of incompatible 8" and 5.25" floppy disk formats were in use by CP/M machines. There was no guarantee that two Z80 CP/M machines from different manufacturers could read each others' disks.

Even if a machine could read another machine's disk format, it likely wouldn't be able to boot CP/M from that disk if the CP/M BIOS was not compatible with that specific machine. The BIOS is technically part of CP/M, and is different to the BIOS built into the IBM PC and other boot ROMs. In CP/M parlance, the BIOS was the device driver layer that supported the floppy drive and terminal for a specific machine. Other than this CP/M was largely platform agnostic and, in principle, you only rewrote the BIOS to support a new platform.

Because of these factors, users would usually get an appropriate version of CP/M directly from the manufacturer and seller of their particular computer. Apple II Z80 cards came with Apple CP/M for Disk II disks. Kaypro machines came with Kaypro CP/M for Kaypro disks. And so on.

1
  • 5
    I recall there was a CP/M program - Uniform - which purpose in life was to read and write a myriad of various CP/M-disks format (given the drive could do them). The shareware MS-DOS program 22dsk could do the same. Commented Jan 10, 2019 at 22:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .