Hacker News new | ask | show | jobs
by Gordonjcp 1229 days ago
You're not comparing like with like.

BASIC was a very slow and limited programming language.

CP/M was a disk operating system.

If you wrote programs in BASIC you could only save them painfully slowly on cassette tape, and maybe if you were lucky you could get them to load back in again. You couldn't really write useful programs in it because it had no concept of functions and a very vague idea of subroutines, and there wasn't really an editor or debugger. You couldn't load or save data files except as raw binary copies of what was in memory. Latterly some home computers like the Commodore 64 got crude disk drives, which were only a little faster and about as reliable as tape, and still couldn't really work the way we use files now.

By comparison, CP/M was more like MS-DOS in that it was a thin command interpreter that would load and run programs in memory, which could then be used to do useful stuff. In the Olden Days I used a CP/M machine to write firmware for Z80-based machine controller boards. On one floppy I had the editor, assembler, debugger, and a few other tools, and on the other floppy I had the assembly source code and object code output. Although the computer with its whopping 64kB of RAM and 256kB per floppy disk could only run one program at a time, it only took a few seconds to load the editor and the working file, and run a SUBMIT job (similar to an MS-DOS batch file) to assemble and link the code.

Pretty much all serious development was done in assembler then although there were some daft old gits who still held onto PL/I, and you could get Turbo Pascal for CP/M. There was even talk of buying a C compiler, like that C stuff they use on big Unix systems, and using a thumping great Tandon 386 with Xenix on it as a shared development machine, with 2MB of RAM and a 40MB hard disk! I left the company before they brought this in though.

BASIC is an interesting enough language, but it was inherently too limited to evolve into much without an underlying OS. CP/M required the machine running it to have a BIOS ROM with a boot loader and the machine-specific code in it to handle the hardware, which would be about half the work of the BASIC ROM.

If you want to see an interesting contrast in 80s home computers see what you can find about the Jupiter Ace, which was a Z80-based computer that ran Forth instead of BASIC. Forth would have been a far better starting point for a general-purpose OS, being essentially compiled into bytecode (really just a list of addresses of words) and run by a very simple "interpreter" that loops over the bytecode. Later on Sun would use Forth as part of OpenBoot, where it made its way into PowerPC-based Apple machines.