• Please review our updated Terms and Rules here

The UNIX way

Ole Juul

Veteran Member
Joined
Aug 15, 2008
Messages
3,982
Location
Coalmont, BC, Canada
I'm posting here specifically because it is listed under Genres and the Vintage Computer Software section is under Technical Support, which is not what I'm looking for. However, this is about DOS.

In recent years I've taken more of a liking to UNIX and gotten a bit of a grip. I notice that UNIX people often refer to "the UNIX way", when talking about command line usage and not using pre-made graphical solutions such as Windows (MS or otherwise). This seems in total keeping with "the DOS way", which is basically similar in that it eschews graphical overlays and prefers personal control. In fact I think that DOS fits under the UNIX heading just fine. The utilities seem to be copied from UNIX and the syntax seems to be a simplified user friendly version, watered down for public use. So, this post is just a note about that and why I feel that DOS discussions should happen here. :)

A secondary reason for this post should probably go elsewhere, but relates to the first. Many times I've gotten fooled when replying to posts in the Vintage Computer Software section (and elsewhere) when the subject has the word DOS in it. What happens is that, although the subject actually turns out to be Windows, the original poster has used the word DOS in the title. To my way of thinking, and personal experience, Windows is not "the DOS way". The DOS way is like the UNIX way. :)
 
DOS 1.x is almost (from a programmer's standpoint) a knockoff of CP/M in terms of philosophy. Simple .COM executables, FCB file access, small set of system requests. When DOS 2.0 came along, it was a major change. I still have a paper copy of the Microsoft README that accompanied 2.0 when it was issued to OEMs. (If you were an OEM with a non-IBM compatible, you wrote your own IO.SYS). It states very clearly on the first page or so that it was Microsoft's intention to bring DOS and XENIX to eventually become one product. Well, that and OS/2... Remember, at the same time MIcrosoft was shipping DOS, it was also shipping XENIX to the likes of Tandy (for the Model 16).

So pipes were just "emulated" in DOS by means of temporary files. The biggest three things in DOS 2.0 were .EXE (multi-segment) files, subdirectories and installable device drivers. File handles was another move toward the *nix world.

I sometimes wonder what would have happened had Microsoft decided to market a reduced XENIX instead of later versions of DOS.
 
DOS 1.x is almost (from a programmer's standpoint) a knockoff of CP/M in terms of philosophy.

We had some discussion about this here lately that came out of some news about a guy making crazy allegations. But as you say:

When DOS 2.0 came along, it was a major change.
The fact that it has a hierarchical file system and similar syntax gave it the same feel as UNIX from then on.

I still have a paper copy of the Microsoft README that accompanied 2.0 when it was issued to OEMs. (If you were an OEM with a non-IBM compatible, you wrote your own IO.SYS). It states very clearly on the first page or so that it was Microsoft's intention to bring DOS and XENIX to eventually become one product. Well, that and OS/2... Remember, at the same time MIcrosoft was shipping DOS, it was also shipping XENIX to the likes of Tandy (for the Model 16).

So pipes were just "emulated" in DOS by means of temporary files. The biggest three things in DOS 2.0 were .EXE (multi-segment) files, subdirectories and installable device drivers. File handles was another move toward the *nix world.

I sometimes wonder what would have happened had Microsoft decided to market a reduced XENIX instead of later versions of DOS.

That's my contentions here, that DOS works and feels like a popular market version of the more complete and professional UNIXes. I bet the Microsoft guys working on DOS were friends with the guys working on XENIX and what in fact happened is we essentially did get a reduced version of XENIX. I don't have the same depth of experience as you and haven't fooled with XENIX, but I have been using older and newer versions of BSD and find that my "DOS comforts" are right there for me. Linux on the command line has the same "DOS feel". It's as if what they did with DOS and XENIX was considered "intuitive" at the time.

To continue on my other point. I would say that DOS and the UNIXes have a similarity of usage style in the same way as Windows 98 and XP are similar. And that Win3.1 is as different from DOS as it is from XENIX. Despite the fact that Win3.1 runs on DOS, it's usage style and feel are radically different. In fact the whole Windows line of development has been to hide or obfuscate many of the older ideas such as a hierarchical file system - the idea of an image of office furniture being substituted.
 
And yet it took until 2006 for Microsoft to release a decent shell, one that is decidedly un-UNIXy.
 
I'll bite. What "shell' is that?

I liked dos. I like that in my experience when new to computers, it "just worked". You could configure things if you needed. It came with a book explaining all the commands alphabetically and all the arguments the commands had (great! I was able to learn it as a kid because of that). There's no real argument I don't think that DOS was designed to be an easier/better (or more friendly) version of CP/M hence the compatibility with .com files. The arguments otherwise were whether source code was stolen, etc .. bleh .. that's whatever but yes it was designed to be a good disk operating system. I certainly do things via command line when I can and usually they're faster even today than waiting for a graphical interface to load and click my way through the same command. It's pretty interesting a lot of the stuff you can still do in Windows (server and OS .. well 7 and 200x, I don't know about Windows 8) from command prompt. Pretty much all things are doable still. They even offer a "console" only install of their 2008 server product (it still runs on the GUI which is stupid) but it at least shows that administration should be doable from a prompt. The information isn't quite as openly available these days other than the internet and searching though.

There's a whole hiarchy of OS generations though. One even has to remember Unix (Unics) and the pun of the term itself is a dumbed down Multics and I think Multics was based on another OS lineage as well (I wasn't around during those years) to remember right now what it was. There are timelines out there. I'd like to see one that branched into unics though unless it was really developed independently. I recall MIT or someone having a popular OS that I thought it was sort of based on.
 
Powershell. Scripting with command.com batch files is awful compared to bash. Powershell is a lot better, feels like a real scripting language. It's overly verbose, but at least it's featureful. Passing objects through pipes is a neat feature. OTOH, it's glob processing is still weird. Overall I prefer using bash in cygwin.
 
Well even before powershell you had vbs (cscript/wscript) and that's ironically pretty damn full featured coding for windows internals natively from NT to Windows 2008. But besides that I was talking about the gobs of cli commands windows still has natively as well. Between sc (service control), netsh (configure networking/firewall), reg (add/del/query registry entries), and some other advanced commands like wmic (wmi console) and net for most user administration and things become quite quick to do natively. Pretty nice for an OS noted mostly for it's graphics these days. One funny one that not many folks probably know or use is popd/pushd (both nix and windows) just like pop/push in assembly pushd changes a directory and popd puts you back where you were before that. Never honestly understood the purpose however I did find it handy in combination with the runas command (runas /user:whomever or domain\whomever cmd) then pushd to a network resource that the account has access to that the user doesn't.

Anyway, always amazing how deep these OSes go. I've always wondered how much fluff there is in software and hardware just for copyright/patent claims like if there are fake components on the motherboard that someone else might copy not realizing, etc. The dictionary I think still does it with a word or two that they made up to see if anyone infringes.
 
Last edited:
Be reasonable. The number of users who write batch shells in DOS has been miniscule all along--there's been simply no demand for it. I'm constantly surprised how few programmers know about the NT extensions to the command line shell--I use them quite often.

And there have been some remarkable replacement and add-on shells, such as 4DOS. (It still exists for NT as "TakeCommand"). I've used CENVI/CENWIN--another much-ignored package--on and off for years, even though it hasn't been offered for a very long time. I'm sure other examples abound, such as REXX for DOS.
 
When I posted the thread starter, I was just giving my opinion about what things feel like to me. Now, I just came across some interesting material. Here is a quote from Microsoft co-founder Paul Allen, made in 1982:

It's important to realize that MS-DOS is part of a family of operating systems....Providing the user with a family of operating system capabilities means a clear migration path from MS-DOS to XENIX. That means compatibility for both the terminal end user and the systems programmer.

A standard library for XENIX-86 C will allow compilation of a program on XENIX system and then execution on MS-DOS.

Here is the site that came from. (Broken English alert!)

I realize the historical truth in previous statements about CP/M roots, but my thoughts about look and feel are certainly corroborated by Allen's statement.
 
A tidbit is that Microsoft didn't do the Xenix porting to the 80286 by themselves. Intel detailed a couple of people off to do the kernel work--this was about 1982 and the delays were endless as Intel was working with pre-release silicon and it was very buggy. Apparently Microsoft didn't want to fool with that.

I think it's interesting that while Microsoft had the C compiler for Xenix, what it sold to the DOS community was the Lattice compiler.

Somewhere, I've got the MS-DOS 2.0 OEM README on the tie-in between DOS and XENIX--I'll have to locate it and post it.
 
That'd interesting Chuck.

Allens quote looks more like marketing blurb more than anything else anyway. Of course MS went on to back OS/2 later on leaving XENIX orphaned and giving it to SCO for around 25% ownership. SCO had already ported it the the 386 platform. Seems they used it internally though for email and other functions.

A condensed version on Xenix history http://en.wikipedia.org/wiki/Xenix
 
Last edited:
Back
Top