User:Schol-r-lea/Early CLIs

From OSDev Wiki
Jump to: navigation, search

N.B.: This is one of a group of forum posts extracted so that the information in them can be re-worked into a less confrontational, more informational set of wiki pages. They are here only temporarily.


The similarities they have are very superficial (much like the systems themselves), even in terms of user experience, and are shared by nearly every command interpreter of the time which wasn't just a BASIC or Forth interpreter. You might as well say that Tenex and VMS were the same as ITS - not that I expect anyone here who isn't a history buff to know any of them, but still. They are similar because that was the way nearly every command interpreter worked, going back nearly a decade before Unix existed. The style goes all the way back to systems like CTSS, with some things appearing even earlier.


The directory structure was copied whole cloth from Unix (which copied Multics, which copied CTSS going way back to 1963), that's true... in MS-DOS 2.2, more than three years after MS-DOS was introduced (it didn't have directories before then at all, and CP/M never had them, at least not as part of the file system proper). The commands were similar in that they were text... but so were the command systems for ITS, Tenex, VM/CMS, Apple II ProDOS (AppleDOS, and several others like Commodore 64 and the Atari 8-bit systems, didn't have a separate command interpreter, instead dropping you right into the BASIC interpreter instead) and a dozen other OSes which had no connection to speak of to either Unix nor CP/M.

And it ignores a lot of things that are very, very different, such as the fact that MS-DOS works directly with every disk by disk letter, an arrangement typical of microcomputers of the time, whereas disks in minicomputer and mainframe OSes like Unix always mounted the disks as sub-directories of a root directory. Or the fact that Unix required hardware memory protection to run at all after some early version (definitely by v6, which was the version used in the Lions book). Or that it was designed for timesharing, meaning that most users weren't even in the same building as the computer itself (as I said, it was a timesharing system), and you might have up to 32 people trying to use the same computer at the same time.

In contrast, the 8088 had no CPU memory protection (segmentation existed, but it wasn't protection - its purpose was to allow 16-bit addressing on a 20-bit machine) and the PC didn't add any on top of it that MS-DOS could have used. MS-DOS didn't really run at all except when at the command.com prompt - once a program started, it had control of the entire system, and MS-DOS wouldn't even stay completely resident if a program needed the memory it was using, but would have to have the stub left in memory load the rest of itself back in once the program exited.

Things like interrupt handlers were set up by MS-DOS, true, but there was nothing to stop a program from replacing those hooks with it's own - which is in fact how early Terminate-and-Stay-Resident (TSR) utilities like Sidekick worked. No OS running on something the size of a PDP-11 or a VAX would ever be so sloppy (mind you, Unix was and still is pretty sloppy, compared to many of the OSes of the time, but not nearly that sloppy). MS-DOS wasn't a full OS by most standards, more of a program launcher with a built-in library for handling a few of the hardware operations, and had nothing anyone could call a kernel or nucleus (the accepted term for the main part of an OS before Unix mangled all the terminology). It is more than a monitor (a type of system loader used in the 1950s that predated operating systems, and came back into use briefly in the 1970s as microcomputers came along), but only barely.

---

Despite the impression that the home computer revolution might have given (and I know that the former WP countries came late to the party on that, so you probably only knew the C64 at first), systems that used a BASIC interpreter for their main user interface were in the minority even in their heyday. The first such system was at Dartmouth in 1968, and Dartmouth Timeshared BASIC was the original BASIC implementation, which was designed as a way for ordinary students to use the computers, something no one else had managed to accomplish at that point.

This was something that few other system designers in the 1960s even considered a good idea at all; while Multics and TYMSHARE were intended for wider use, they were still focused on business and civil service use, so making things easy for the users wasn't even on the radar. Most other systems of the time assumed that no one who wasn't a trained system operator - not even a programmer, because most batch-processing systems didn't let programmers do anything other than enter code into a line editor, the assumption being that you wrote it out by hand first - would ever even see the console (probably a teletype with a roll of paper, not even a glass terminal) that was running the command interpreter.

BASIC only caught on in the microcomputer world because Paul and Billy-Boy saw a ground-floor opportunity in a system which shipped with 256 bytes of RAM (note the lack of any sort of prefix, and no that's not a joke - absurd, yes, but not a joke), had toggle switches as its sole interface, and had to be mocked up in the magazine article announcing it because the only working prototype was lost in the mail. They chose BASIC because they already knew how to write an interpreter for it, and Gates himself later admitted that it probably wasn't the best choice in retrospect (Ted Nelson claims he'd met Allen a year earlier, when he and Gates were trying to flog BASIC for the PDP-8 or some such before the whole Altair thing came around, and tried to talk him into backing Forth instead, which might have made for an interesting turn of events had it gone that way). Even then, one needed a 4 kilobyte add-on board to run the interpreter, and another add-on board to connect to a teletype, a terminal, or a television, in order to use it, and yet another add-on board to connect to the paper tape reader to read the interpreter in in the first place (in this video, the TTY had the tape reader built into it, but that wasn't universal).

No matter what you think of Gates today, or even about his arrogance at the time (what with the infamous "Open Letter to Hobbyists" debacle), the fact is they were the first ones to have even an assembler for the damn thing, and the fact that they then licensed their BASIC dialect to all and sundry afterwards meant that BASIC was on every microcomputer and small business computer for the next decade. Even the 'Open Letter' spread it, as it spurred the development of the various 'Tiny BASIC' interpreters (and launched Dr. Dobb's Journal, which started as a means of publishing them), and led to companies like Apple, Tandy, and Commodore to bundle the interpreter in the ROMs of the '1.5'-th generation micros such as the Apple II and the Commodore PET.

Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox