![]() |
||
| For all your Retro Computing needs | ||
| Back | ||
CP/MCP/M has been much maligned both in the past and the present day with no regard for it's technical achievements and it's place in the history of the microcomputer. Now I'm not suggesting that we should stop using are bright shiny new PC's with their go faster chips and flashy graphical interfaces and go back to using CP/M. But CP/M has much to teach us about efficient programming, memory conservation and useability. It does in a few bytes what DOS takes 64k to achieve and a bit more besides. It should not be written off as useless simply because the command line interface is unfashionable. If CP/M is a victim of fashion then we are all of us victims of megabyte guzzling personal computers. A CP/M wordprocessor operating in less than 64k is just as capable when it comes to writing a letter as an 8 megabyte guzzler is. There is much to learn. The creator of CP/M was Gary Kildall who is sadly no longer alive and whose early death commanded barely a few lines of media prose. He produced an operating system capable of driving the then new (mid 1970's) 8 inch floppy drives (yes 8 inch) with a computer containing only 16k of RAM and still leaving enough room to run useful programs.It should be remembered that the PC BIOS alone takes up 16k of ROM. The equivalent CP/M software takes up barely 5k. Command.Com on the PC is a bloated 50k whereas the CP/M version is barely 2k. Quite a difference. Of course it could be argued that DOS has greater functionality. True but CP/M shows that it does not have to reside in memory. Memory is for running programs not the operating system. Much of CP/M's functionality is performed by outside utilities residing on disk that can be called up when required. This is at the heart of the strategy for producing something so small capable of so much. Alright let's get done to specific questions of functionality. I'll present this in the from of a question and answer session. Q: CP/M can't drive hard disks. Q: CP/M is mono only and can't support graphics. Q: CP/M can't support 3.5 inch disks. Q: CP/M is restricted to 64k. Q: CP/M is restricted to the Z80 chip. Q: CP/M is slow. Q: CP/M cannot drive a network. This has I hope given you just some idea of how inappropriate some critism can be. But there is more. Here are just a few other things CP/M can teach DOS. The CP/M SETDEF command can set the system to use the RAMdisk as a temporary store. This is not just an environment variable. It wasn't until MSDOS 3.3 that the CALL command became available to call other BATch files. CP/M has always been able to nest command files in this way using the SUBMIT command. CP/M can set passwords to protect files, programs or whole disks. This is something MSDOS still cannot do (and this is progress?). CP/M can use Archive bits and can set files to read or read/write only. This didn't appear in DOS until version 3.1 with the introduction of ATTRIB. The CP/M command PIP can do everything that COPY and XCOPY put together can do and more. The DOS DIR command has only very recently (DOS 5.0 onwards) acquired extensive switches. The CP/M DIR command has always been able to display a multitude of information using a variety of options including the [exclude] option which DOS still lacks. The DOS command TYPE still cannot display information a page at a time. The user is still expected to press CTRL S or use MORE to display files in a form a human can read. The CP/M TYPE command has always defaulted to display a page at a time. Ever used MSDOS on floppy? Well whenever you quit an application you must place a disk in the drive with COMMAND.COM on it else the system grinds to a halt. Not a problem for CP/M as the equivalent program is held in memory and paged back in when required. Try doing that with a 50k Command.com program. MSDOS has a set way it searches for programs. It'll search for an EXE first then a .COM and finally a .BATch file. This means that a BATch file has to have a different name to the program it runs else DOS won't be able to find it. CP/M can be set to search in whatever order you like so that it is possible to run a program called PROG.COM using a batch file called PROG.SUB which makes life a lot easier. MSDOS is actually based on CP/M and it has numerous vestiges of CP/M within it. The ERASE command has been included in MSDOS even though DEL does the same thing because CP/M has an ERASE command. The .COM extension supports the CP/M format for programs less than 64k in size. The whole problem of SEGMENTS was created to maintain compatibility with older 8 bit machines. MSDOS still supports the CP/M file handling using File Control Blocks (FCB's) even though it has been superceded by handles. I hope from all this you can appreciate that CP/M is technically brilliant and although a little dated is still capable of springing a few surprises. |
||
| If you have any queries or would like help and advice on all aspects of retro computing then please email: nickjc@nickjc.co.uk | ||
| Back | ||