A gentle introduction to CP/M

56 naves 26 9/2/2025, 6:39:28 PM eerielinux.wordpress.com ↗

Comments (26)

MarkusWandel · 3h ago
Two things that might still be fun with CP/M to this day, though neither is in that image and would have to be obtained separately.

1. MBASIC. A nice time capsule of BASIC programming in that era, more serious and less quirky than Microsoft BASIC on other old emulated computers such as C64.

2. Wordstar. That has a bit of a learning curve, but it's frankly more bang for the (compute) buck than absolutely anything since. I came late to the CP/M party with an inexpensive (for the day) surplus Intertec Superbrain in 1984 or so, but I ended up using Wordstar for quite a while for document preparation. Of course getting it to output to a modern printer would need going deep under the hood. Most CP/M systems came with source code for the BIOS for a reason. I hacked mine to turn an obsolete LAN type interface on it (a Compustar M30) into a Centronics-compatible parallel printer port and wrote my own BIOS glue to drive it.

garyrob · 21m ago
The editor, JOE, has a WordStar mode that you bring up with jstar. I programmed in WordStar in the 80's, and it's fun to bring it back to life that way!
cout · 55m ago
All I know about wordstar is 1) my dad used it on his kaypro luggable, and 2) I know the wordstar key commands from using Turbo C. How does wordstar compare to wordperfect 4.2 (which was my first hands-on experience with a word processor)?
HankStallone · 2h ago
My high school got its first computers in 1986, a dozen or so Sanyo CP/M systems. Our teacher, who was as new to computers as we were, was overwhelmed with teaching everyone how to get a directory listing and use Wordstar, so he handed me some books when he saw I was bored. So my first programming experience was in Z-80 assembly.

The first computer I owned was a Commodore 128, about a year later. It came with a Z-80 and CP/M on disk. Unfortunately, I never really found anything useful to do with it that was better than what was available for the native 64 and 128 modes.

pacman128 · 3h ago
Fun fact, George RR Martin still uses the MS-DOS version of Wordstar for his writing.
cyberax · 3h ago
Given his (non-)performance, perhaps he should switch to something else?
znpy · 2h ago
the hardware/software combination is probably not the root cause
SirFatty · 3h ago
I don't have memories of Wordstar being fun.
MarkusWandel · 1h ago
Actually realizing you're referring to my "might still be fun", the fun is in discovering how things used to be. Not using the old tools for production use. Unless, I suppose, you have a daisywheel type printer that's sitting idle.
MarkusWandel · 3h ago
Most first-rate tools aren't meant to be fun. WS was very effective once you memorized the more common keybindings.
jsight · 3h ago
It was fun in much the same way that vim is fun.
MarkusWandel · 3h ago
Whose (vi) keybindings I learned in 1987 on a SunOS system where it was simply the best editor available stock (about 1/2 of the user population in those days used emacs instead but you had to install that). And I can still use them to this day! Whereas I've forgotten the WS ones.
OhMeadhbh · 2h ago
I was about to yell in indignation "BUT WHAT ABOUT EMACS!" and then I finished reading the first sentence. Alas, it is true, emacs was not installed by default. I learned just enough vi to modify basic files in /etc on old school unices (Ultrix, SunOS, Solaris, HP/UX, IRIX, etc.)

And the weird thing is... to this day... when I edit something in /etc, I always use vi instead of emacs. It just seems sick and wrong to edit config files with anything else.

JdeBP · 2h ago
I suspect that I just have to say Control+K Control+D to awaken some memories. (-:
rickcarlino · 4h ago
It is great to see good HN content getting mirrored on Gemini://.
PilotJeff · 3h ago
This brings me back to the code I wrote in Paradox (an early 80s database, I used the version Borland put out just after buying the company that wrote it) for our family music shop rental billing.

For some reason my 16 year old brain thought the Dec Rainbow was a cool machine so we bought one despite the awful shopping experience that DEC provided for non large enterprises.

It was a cool machine in that it could run both CP/M (what Paradox would run on) and MS-DOS because it had a z80 as well as some early x86 variant. The drives could also read both formats too.

ndiddy · 2h ago
NEC made an enhanced clone of the 8086 called the V30 that had built-in 8080 support. It could be switched in and out of 8080 mode on the fly. This made it fairly simple to write a program that allowed CP/M programs to run natively on an MS-DOS PC with a V30. The MS-DOS API was mostly a copy of the CP/M API, so all you had to do when you got a CP/M system call was switch the CPU into 16-bit mode, do the equivalent MS-DOS system call, and switch the CPU back to 8-bit mode.
russellbeattie · 2h ago
The development of CP/M is pretty fun:

In 1972 Gary Kildall was working as a professor at the Naval Postgraduate School in Monterey, California, when he received funds to create a new computer lab. He soon used a contact at Intel to get a series of Intellec development model microcomputers for the lab by successfully pitching them on creating a new high level programming language for their CPUs.

Working as a consultant, Kildall created the "Programming Language for Microcomputers" - PL/M - based on an ancestor of IBM's PL/I language for their mainframes. (The I in PL/I is actually the Roman numeral "one"). Initially Intel's chips weren't powerful enough to self host a real language, so he ended up writing PL/M on a PDP/10 using an emulator, then compiling programs which he'd transfer to the microcomputers via paper tape.

Within a year or so, Intel had upgraded his computer to an Intellec 8/80 based on the 8080 CPU, which was finally capable of compiling and running PL/M programs on the machine itself. The problem was the 8/80's RAM was extremely limited and he didn't have any useful storage system in which to keep the code as he was writing it.

So Kildall talked a local floppy drive startup into giving him one of their older test drives for his lab. But Gary was a software guy! After several failed attempts at creating a controller board for the drive, it sat on a shelf for a year and he kept using the PDP/10 to write and compile programs for the new CPU. He finally asked for help getting the controller to work from a friend of his in Seattle, who came down to lend his hardware expertise. After a few months, they finally got the drive and the computer working together.

In 1974, after adding basic drive commands to PL/M, Gary used the language to create a simple disk "operating system" so he could load and run programs straight from disk. And thus, "Control Program Monitor" - CP/M - was born.

He originally offered it to Intel since they already licensed PL/M, but they turned it down. One thing lead to another and in 1975 he put an ad in a magazine offering the OS for use with the new wave of Altair style microcomputers being sold to the public and it took off.

The rest is well known history. Within five years, CP/M was the main operating system used for microcomputers, and in 10 it was an also-ran to DOS.

It goes to show how having early access to new technology has always been an important part of the industry, and how "fast followers" can often come along and upset the innovator so they become a footnote to history.

jmclnx · 4h ago
Very nice, I will try it out!

Back then I was an operator (now called admin) and at the time I thought these micros were "toys" since I was on a "real" computer.

Little did I know these little systems would kill the systems I worked with and end up pretty much running the world. I think the only place mainframes rule now are in very high Financial Transaction Systems.

FWIW, very glad to see the article published in Gemini, I have moved my site to Gemini a year ago.

whartung · 2h ago
CP/Ms true claim to fame is being an evolutionary stepping stone in the fast moving microcomputer market.

In the early 90's we were in the midst of the Unix wars, where every Tom, Dick, and Harry was pumping out a random mini-computer running mostly kinda sorta portable Unix hoping something would stick, or at least provide service revenue.

CP/M filled that role, however briefly, in the late 70's, early 80's. While obviously not as portable across machine architectures as Unix was, the baseline 8080/Z80 machine was simple enough for folks to sketch out motherboards on a dining room table, and assemble machines from more and more available OEM parts. Anything to get a dart on the board and hopefully build a successful business model.

The robustness of this nascent machine market, empowered by the portability affordances of CP/M, enabled a generic software market that was hardware (though not necessarily architecture) agnostic. The world was moving so fast, it was important to have this kind of capability to help power through the chicken/egg problem of computers needing software needing computers.

However, at the same time, CP/M was too early. That's not quite fair, everything was early in that microcomputer space. But, like others, CP/M was a victim of its time, making early design decisions based on early computing where CPUs were glacially slow, and memory was staggeringly expensive.

This resulted in CP/M having to "hard code" a lot of fundamentals in its system. There simply wasn't the bandwidth or memory to do much abstraction. Flexibility breeds complexity and costs performance and memory, none of which the platforms of the time could really afford.

This made CP/M not just hard to use, but hard to evolve. As the machine world accelerated forward, it was not practical for CP/M to keep up.

Casually, at 10,000 feet, MS-DOS looks very similar to CP/M, both cosmetically at the command line, and internally. But both its file system and driver architecture was able to learn on the shortfalls of CP/M, and be more flexible and powerful, but at the same time, MS-DOS wasn't under the memory or disk space pressures of CP/M.

Then, the deathknell came with the PC showed up, and reset the baseline of what "every computer" would look and be spec'd like. That clobbered a lot of the early hardware vendors.

Oh, to be sure, for a short time, the x86 world was shaping up like the CP/M Z80 world. Different makers, with different hardware offerings, using MS-DOS much like CP/M was used.

But the PC platform as a de jour standard washed that away, and "PC Compatible" became the mantra, and those builders either had to jump on the "it runs Flight Simulator" bandwagon, or move aside.

CP/M, truly, today, has little charm. It's kind of awful. Launching CP/M on a 50Mhz Z80 connected to MBs of flash drives is not a good experience. Mainstream CP/M does not cope well with large volumes. It's really designed to work on a system with floppy disks and capacities in the 100s kilobytes, that are readily swapped out, not enormous spinning hard drives. And it doesn't even work well there. Don't forget to log in those new disks when you swap them out (^C as the command shell), or you will have disappointing results.

It's a artifact of its time. Decision made weren't bad decisions, they were just of the "how long should we make this buggy whip, and what kind of leather" decisions. Without CP/M, who knows where we'd be, what MS-DOS would have looked like, or anything. The PC and MS-DOS consolidating the PC architecture help revolutionize and propel the entire market. Rather than having a disparate array of incompatible hardware, operating systems, and software, the happenstance settling on the PC and MS-DOS as a lowest common denominator let the software and service folks innovate in that space without having to worry about, taking the time, or spending the money on what OS and platform to support.

Rising tide lifted all the boats, to the point of letting others in on the fringes.

Eldodi · 4h ago
Is this an ancestor of MCP?
EvanAnderson · 4h ago
It's an operating system used on 8-bit microcomputers (8080 and Z80-based). It's (sort of) an ancestor (API inspiration, really) to MS-DOS.
jandrese · 3h ago
MS-DOS was more of a clone of CP/M. The sort of thing that was mostly possible because CP/M is so minimal that one person can rewrite/port it in a just a few weeks. MS-DOS also cleaned up some of the rough edges of CP/M, like soft locking the system if you tried to access an non-existent drive.
macintux · 4h ago
Interesting look at the controversy surrounding Microsoft, IBM, and CP/M.

https://spectrum.ieee.org/did-bill-gates-steal-the-heart-of-...

DonaldFisk · 3h ago
No, MCP was a much older operating system (https://en.wikipedia.org/wiki/Burroughs_MCP).
homarp · 2h ago