7 ms·
CP/NC – a CP/M-compatible operating system
- tombert 7y agoI've never had a chance to use CP/M; can someone here tell me how it compares to something like Commodore Basic or MS-DOS?
- reaperducer 7y agoMS-DOS is descended from CP/M.
- jandrese 7y agoMS-DOS was basically the store brand CP/M.
- tombert 7y agoI know that, but I was more curious to some notable differences, from someone who knows enough about both to explain.
- nils-m-holm 7y agoIf you have used a very early version of MSDOS, its is not very different. File names are 8+3 characters long with a dot in between, upper and lower case is not distinguished. There are only 5 "built-in" commands: DIR, ERA (erase files), REN (rename, but the syntax is REN NEW=OLD), SAVE, and TYPE. There are no directories, but "user areas" numbered from 0 to 15, so different users can have different files on the same disk. User areas are selected with the USER command. However, most people used user areas as poor-man's directories. There is no COPY command. Copying files (and much more) is done with a program named PIP (peripheral interchange program). For instance, PIP B:=A:*.COM[E] would copy all files of the type COM from drive A: to drive B: and echo the file names. What was great about CP/M was that it allowed programs to run on different computers, as long as they were 8080- or Z80-based. It was a thin, but very effective abstraction layer between the hardware and a program. MSDOS, which was originally based on CP/M, was a step back, really, because everybody tried to program the hardware directly instead of going through the proper interfaces.
- skissane 7y ago> MSDOS, which was originally based on CP/M, was a step back, really, because everybody tried to program the hardware directly instead of going through the proper interfaces. That wasn't anything to do with the technical characteristics of MS-DOS versus CP/M. It was about the market conditions – for MS-DOS, the vast majority of users were running it on the IBM PC (and later compatible clones), so developers coded to the IBM PC BIOS and direct hardware access. With CP/M, hardware was far more diverse so developers had an incentive not to do that sort of thing.
- kjs3 7y agoIt was also about speed. For example, going through BIOS for video was slooooow, so most everyone went straight to the hardware, which buggered up anything that wasn't an MDA/CGA/EGA/VGA video adapter or near identical (like those with a NEC 7220...there were one or two). It meant things like the Wyse 700 (high-res mono video adapter) had to have application specific drivers.
- skissane 7y agoIn theory, they should have written to MS-DOS API, and then if BIOS video is slow, Microsoft (or OEMs) could have changed the MS-DOS console device driver to use direct hardware access. The problem was, everyone just went straight to the hardware so there was little impetus on anyone to write a faster console device driver for MS-DOS.
- abecedarius 7y agoIirc the bios interface was inherently slow: output was a character at a time, one bios call each. It’s been a long time, though.
- flyinghamster 7y agoNot only that, but CP/M itself has a rather DEC-ish flavor to it. PIP was found on RT-11 and RSTS/E (maybe RSX-11 as well?), and the drive identifier with a colon is also a nod to DEC.
- skissane 7y agoCP/M was rather similar to MS-DOS / PC-DOS 1.0 – no subdirectories, only a root directory per a disk. Later versions of CP/M did add one approximation to directories, each disk contained 16 numbered user areas (0-15), you could switch between them by "USER n" command. But, all files existed in the same physical directory, the user area was just a nibble in the directory entry. Files not in the current user area were hidden. Some versions of CP/M supported password-protecting individual files (and entire disks). If you set a password on a file/disk, the OS would prompt you for the password before allowing you to read/write it. However, there was no encryption, and the passwords were stored using trivial reversible encryption (XOR with a single byte key), so tools existed to retrieve the password. CP/M file system did not store exact size of files, only how many 128 byte records they contained. Text files used ^Z character as end of file marker. That is why many DOS programs treated ^Z as an end of file marker, even though unlike CP/M it supported storing file sizes to the byte. Unlike DOS, earlier versions of CP/M did not store file modification times. Later versions added this. CP/M only supports 7-bit ASCII in file names since high bit of each file name byte is used to store file attributes (read-only, system, etc). The FAT filesystem stores file attributes in a separate byte, enabling use of 8-bit extended ASCII in filenames (diacritics for European languages, etc) DOS tended to have friendlier commands. COPY vs PIP (Peripheral Interchange Program) DOS copied a number of features from CP/M - 8.3 file name format, drive letters, similar system calls – Int 21h started out as a subset of CP/M system calls, but later added many more calls which were not CP/M compatible – .COM as an executable file extension, IO.SYS/MSDOS.SYS split (in CP/M called BIOS vs BDOS – the BIOS of IO.SYS is not the same thing as the system firmware BIOS.) DOS added .EXE file format and FAT filesystem. Starting in DOS 2.0, DOS gained subdirectories and a new Unix-inspired file API. CP/M most commonly was used on 8080/Z80 systems with maximum 64KB address space, with more memory sometimes accessible through bank switching. MS-DOS ran on 8086 which is much more generous with memory. (However, there were versions of CP/M for other CPUs, including 8086 and 68000, although use of those versions was not very common.)
- atrn 7y ago> Text files used ^Z character as end of file marker. But only if the file size wasn't a multiple of the 128-byte block size. Fun!
- mhd 7y agoThe lineage is pretty clear, especially if you're looking at the early DOS versions and the computers it ran on. DOS basically added a few things, and the hardware progressed a lot. But in the Turbo Pascal 3 era, the differences weren't that high. "Big" things were: - no sub-directories - no relocatable executables (ie. only .COM, no .EXE) - no common, advanced graphic standard So if you're running WordStar or TP3 in black-and-white text mode, you might not be able to tell the difference. If you're thinking of color text modes (TP 5.5, QBASIC, Word 5) or VGA/EGA games when "DOS" is mentioned, then that's the era beyond that.
- laumars 7y agoCommodore BASIC was also a Microsoft product. BASIC and CP/M have basically (no pun intended) nothing in common. Others have covered the DOS and CP/M comparison.
- jhallenworld 7y agoYou can try it easily from a Linux terminal window if you are interested: https://github.com/jhallen/cpm https://github.com/jhallen/cpm
- kv85s 7y agoMS-DOS user experience was extremely similar CP/M. In fact, one could safely say MS-DOS/PC-DOS only existed in the first place as a "quick and dirty" approximation of CP/M. (because IBM and Digital Research could not agree to licensing terms to bring CP/M to the IBM PC) https://en.wikipedia.org/wiki/Digital_Research#CP/M-86_and_DOS https://en.wikipedia.org/wiki/Digital_Research#CP/M-86_and_D...
- zabzonk 7y agoThis is true for MS-DOS 1.0, but 2.0 introduced tree-structured directories, which 8-bit CP/M didn't have.
- p_l 7y ago2.0 was also the "breakout" version of MS-DOS that made it win over CP/M. It did it by introducing features inspired by another Microsoft OS, the Unix for 8080 known as Xenix: - tree structured directories - pipes - output redirection - DEV directory (mostly hidden as it didn't catch on, afaik)
- smacktoward 7y agoSo similar, in fact, that it led to years of allegations that MS-DOS was a ripoff of Digital Research's intellectual property (see https://en.wikipedia.org/wiki/86-DOS#Intellectual_property_dispute https://en.wikipedia.org/wiki/86-DOS#Intellectual_property_d...). > one could safely say MS-DOS/PC-DOS only existed in the first place as a "quick and dirty" approximation of CP/M One could indeed, especially seeing how the original name of the product Microsoft acquired and turned into MS-DOS 1.0 was QDOS, which stood for "Quick and Dirty Operating System" (see https://en.wikipedia.org/wiki/86-DOS https://en.wikipedia.org/wiki/86-DOS) :-D
- laumars 7y agoThe story is weirder than not just agreeing to licensing terms. Gary Kildall (of Digital Research) and IBM have wildly conflicting versions of how their meeting went. To the point that I don't think the exact circumstances will ever be clear.
- ggm 7y agoCP/M felt like it had its roots in the same tree Tops-10 sprung from. PIP, Peripheral Interchange Program existed in Digital Equipment, PDP series. It was how you glued IO into the card deck and the line printer or tape printer. MS-DOS might well have been the category-killer 'avoid paying the IPR tax' OS, but they also said "our customers have never seen a Digital equipment PDP minicomputer, or mainframe. Lets do some things differently"
- tangue 7y agoAfter all these years I've just realized that my old Amstrad CPC was running on CP/M