13 ms·
A gentle introduction to CP/M
- jmclnx 1y agoVery 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.
- Eldodi 1y agoIs this an ancestor of MCP?
- EvanAnderson 1y agoIt'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.
- macintux 1y agoInteresting look at the controversy surrounding Microsoft, IBM, and CP/M. https://spectrum.ieee.org/did-bill-gates-steal-the-heart-of-dos https://spectrum.ieee.org/did-bill-gates-steal-the-heart-of-...
- jandrese 1y agoMS-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.
- DonaldFisk 1y agoNo, MCP was a much older operating system (https://en.wikipedia.org/wiki/Burroughs_MCP https://en.wikipedia.org/wiki/Burroughs_MCP).
- homarp 1y agoand also in Tron https://tron.fandom.com/wiki/Master_Control_Program https://tron.fandom.com/wiki/Master_Control_Program
- rickcarlino 1y agoIt is great to see good HN content getting mirrored on Gemini://.
- MarkusWandel 1y agoTwo 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.
- SirFatty 1y agoI don't have memories of Wordstar being fun.
- MarkusWandel 1y agoMost first-rate tools aren't meant to be fun. WS was very effective once you memorized the more common keybindings.
- _ea1k 1y agoIt was fun in much the same way that vim is fun.
- MarkusWandel 1y agoWhose (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.
- JdeBP 1y ago
- deleted 1y ago[deleted]
- PilotJeff 1y agoThis 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 1y agoNEC 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.
- whartung 1y agoCP/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.
- russellbeattie 1y agoThe 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.
- ptek 1y agoYou are correct with fast followers: Google to Alta vista, Apple to Nokia.
- TheOtherHobbes 1y agoIt's not true that early versions relied on printing because most people didn't have monitors. A teletype wasn't all that much cheaper than a keyboard + display interface, and monitors were standard on the S-100 and adjacent systems that were around in the late 70s and early 80s. CP/M was a super stripped-down clone of the basics of DEC's TOPS-10 mainframe OS, and many of the commands are directly comparable. If MS-DOS hadn't happened, and if Gary Kildall had been a smarter businessman the world would have run on CP/M, and especially the PC compatible CP/M 86. DRI's products soon sprouted concurrency and multitasking while MS was still trying to work out how to manage memory, so Kildall's failure may well have set the entire industry back by between five and ten years. DRI also had the GEM windowing OS - as seen on the Atari ST - which could have given PCs a graphical OS, possibly with multitasking features, long before Windows became a serious thing.
- shrubble 1y agoKildall got sued over GEM by Apple but Gates was not sued by Apple due to some kind of legal concession that Microsoft had. Gates was I think a lot savvier in terms of lawyering up than his competitors…
- euroderf 1y agoBack in those days monitors came in two colors of phosphors, green or amber, and you could score one for eighty bucks. Pretty affordable even "way back" then.
- anonymousiam 1y agoInteresting to see this published in 2025. I was a CP/M guru in the 1980s, but I haven't touched it since 1992 (when I switched to Linux). 1990 was the year that a 20MHz 386/sx could emulate a Z-80 faster than any bare metal Z-80 chip could run. I held on to my CP/M stuff until I ditched most of it in 1993. CP/M has a certain nostalgia, but it's so slow and limited that it's just not practical for any application today. I've never regretted giving/throwing away the majority of my CP/M hardware & software. To me, it just wasn't worth the space that it consumed.
- rbanffy 1y agoHello. Any chance you can help us here? https://retrocomputing.stackexchange.com/questions/32046/mp-m-on-simh-emulation-with-16-terminals https://retrocomputing.stackexchange.com/questions/32046/mp-...
- anonymousiam 1y agoInteresting problem. I did a lot of CP/M BIOS stuff, and implemented I/O redirection in systems that never had it. Of the four CP/M systems I had (two of which were S-100), I never had more than two serial ports, and I never ran MP/M. I did a hardware hack to my IMSAI so it could run at 4MHz, but the front panel would still work, because when halted, it would change the system clock to 1MHz. I also did a hardware hack to my CompuPro Interfacer serial card where I swapped the control interface for baud rate and serial bits and parity settings, so the baud rate was now software programmable and the (formerly software controlled) start/stop/number of bits, and parity were moved to the dip switches that previously controlled the baud rate. This was nice in the era of mixed 300 and 1200 baud BBSs. On-topic answer: The CompuPro Interfacer III had 8 serial ports, so I would approach the problem by writing an emulator for it, and enumerating two of them, and modifying the MP/M XBIOS to support all the ports. Maybe start with the MITS 2SIO emulator as a baseline for the CompuPro emulator.
- rbanffy 1y agoIt seems like the current emulation has 2 2SIO boards and the telnet port maps to them in sequence. The user id seems to come from the emulated physical port the user connects to. Being S-100, nothing really prohibits having 8 2SIO boards for up to 16 connections (provided their emulation allows us to set different IO addresses). It looks like the Interfacer 3 and 4 used a register to assign more than one user to a single UART IO address, allowing (on the 4) up to 32 terminals on 4 UART addresses.