Hello, Martin!
Post by Martin SkolesCould anyone let me know please how much ROM and RAM
are required and recommended for CP/M on Z80 processor.
I thought maybe CP/M can be a good choice for an embedded
OS for a device I have in mind. I don't know so I pose
the question to you experts.
Ok. I am a programmer, not an electronician.
(I was a COBOL programmer on IBM Mainframes. But I wanted to have my own computer, so arrived logically (at the time: I have white hair, now) to CP/M.)
So, I know only the barest things on the hardware, but have 30 years of experience with CP/M.
First, CP/M is a *FAMILY* of Operating Systems.
Version 1 (up to 1.4) was designed around the characteristics of the IBM 3740 8-inch floppy disk.
Version 2 introduced the BIOS, and was provided with ASM and DDT, so that "system implementers" could write their own BIOS and use the huge "CP/M Software Library" available then. (Recently, we had a discussion about the only book ever written on the subject of writing a BIOS: "The Programmer's CP/M Handbook". If you are serious about CP/M, don't miss this essential reference.)
Version 3 was intended to be introduced with the Zilog Z-800 CPU, and to provide multi-tasking like its parent OS, MP/M, but Zilog failed to deliver the Z-800 in time (it appeared many, many years later, under the name "Z-280". The German Electronics Engineer Tilmann Reh then made a "CPU-280" using this chip, running CP/M 3 (known as "CP/M Plus" in Europe). The "CPU-280" is the fastest 8-bit CP/M Plus computer ever made (less than 50 were sold). It uses the ECB bus -- don't ask me the technical details!). As a result of Zilog's failure, the 8086 version of CP/M Plus has multi-tasking, but not the Z-80 version! (Yet, both run at the same speed...) If Zilog had released the Z-800 in time, the multi-tasking version of CP/M Plus would have competed against the "IBM Clown", a clone of CP/M 2.2! The less that can be said is that History would not have been the same...
There are also multi-tasking, multi-user versions of CP/M. At the moment, the commonest hardware upon which MP/M runs is something named "P112". For the details, have a look to:
http://p112.sourceforge.net/
Then, you have the 8086, 68000, and Z-8000 versions of CP/M, but let us go back to your initial question(s).
Post by Martin SkolesCould anyone let me know please how much ROM and RAM
are required and recommended for CP/M on Z80 processor.
Ok. At the origin, CP/M 1.4 was distributed on a 8-inch floppy disk, so as to run on a microcomputer fitted with 16KB of RAM. After that, it was up to the "system implementer" to do what he wanted. So, he could have his own version of CP/M running under different sizes of RAM.
With CP/M 2, the concept of a BIOS was introduced, with the MOVCPM utility, which simplified the production of the resulting SYS file.
With CP/M 3, a program named GENCPM is used. It is a kind of specialized linker liking all the modules (provided by the "system implementor" in Microsoft REL file format).
MP/M introduced the concept of "banked memory": several times the 64KB limit of the Z-80 CPU. The idea was to provide each user of MP/M with his own "TPA" (another concept of CP/M, the Transient Program Area. Most programs need only their space to run in RAM, then enough to access a "DMA Buffer" but, lazy programmers demanded more and more RAM until, at the end, each one wanted to have his own 64KB space... Hence the concept of "banks", providing a 64KB TPA to each user, via "bank-switching".)
So, my personal conclusion (remember: I am a programmer) would be: It depends on the size of your program.
I imagine that, if you build an "embedded system", it is to run a program?
Then, you only need enough RAM in the TPA to run your program.
Else, 99.999% of the CP/M 2.2 computers had 64KB of RAM.
(The size of the ROM varied greatly. Some, like the Amstrad PCW did not even had a Boot ROM! (The trick was to use the printer's controller, which could contain a few hundred bytes of boot code...) Else, 99.999% of the CP/M 2.2 computers had 2KB of ROM.
Post by Martin SkolesI thought maybe CP/M can be a good choice for an embedded
OS for a device I have in mind.
I can tell you a secret: many, many "data loggers", out there, are using, in fact, CP/M internally. The customers do not know: they only see the data collected by those "data loggers".
The beauty of the Zilog Z-80 CPU is is "family" of support chips. This fact was used several times to build simple and cheap (notice that I did not write: fast and efficient) CP/M computers. But if your "embedded system" is just a "data logger", then, as long as it is fast enough to log correctly its data, speed is not a problem.
Technically, CP/M 2 could manage files up to 8MB. CP/M 3 = 32MB.
If a floppy size is not enough, you can of course use a hard disk. You can even use a CF card: it seems popular among electronicians.
Rather than physically move the disks, you can use the network version of CP/M, CP/NET, to connect via a network to your "data logger", then do whatever you want with your remote CP/M "node". (Apparently, there are several electronicians, out there, playing with CP/M networks... We even have one, Dr. James Moxham of Adelaide, Australia, using a Radio network! (He is a fan of XMODEM for his file transfer protocol.))
The big advantage of CP/M is that it is an Operating System, was the standard 8-bit operating system, so there are thousands of programs that have been debugged out there, and most of the things that you can do with a computer have already been made with CP/M.
Post by Martin SkolesShould I remind you that you can do only 6 things
1) word processing
2) programming
3) spread-sheet
4) database
5) communications
6) graphics
As long as those 6 needs are satisfied, the computer is a
useful tool. And there are/were standards for those 6 needs
under CP/M: WordStar is obviously the standard for word
processors; BASIC is obviously the standard for programming,
MultiPlan is obviously the standard for spread-sheet, dBase II
is obviously the standard for database; XMODEM is obviously
the (lowest common denominator) standard for communications;
and finally GSX is obviously the standard graphics system for CP/M.
(Another is: Do *NOT* re-invent the wheel!)
Yours Sincerely,
Mr. Emmanuel Roche, France