Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: Myrddin; Mannaggia l'America
> The precursor of MSDOS... Letwin incorporated the tree structured filesystem of UNIX into MSDOS, but bastardized the slash/backslash orientation to pretend it was "different".

Ummm, nope. Microsoft adopted backslash for the directory separator because the UNIX forward slash directory separator was already in use as a switch character in CP/M (and every DEC OS: RT-11, RSX-11, VMS) and to retain command-line compatibility with CP/M it was necessary to retain the forward slash for switches -- for the user, anyway (the OS itself wouldn't care, of course).

The obvious and correct choice for switch character would be the dash (hyphen) used in UNIX, right? And the UNIX forward slash for directory separator, right? Well, guess what...

1. The ONLY place where the backslash is required for directories -- to this day in Windows -- is in the user interface. All places in the BIOS and operating system calls (e.g. INT 21), either forward slash or backslash are valid as directory separator.

2. In versions of DOS prior to 5.0, you could set an environment variable called "SWITCHAR" which would be interpreted as the switch character. That is, if you

set SWITCHAR=-
you could use UNIX '-' for the switch character on all COMMAND.COM commands. DOS function 3700 allowed a program to query the SWITCHAR to interpret the passed commandline.

Unfortunately, SWITCHAR didn't gain wide acceptance except among (us) UNIX programmers who were forced to deal with MS-DOS, and it was eventually dropped. But it was there.

Anyway, the backslash wasn't chosen "to pretend it was different", it was because they HAD to be different, if they were to retain CP/M compatibility on the command-line.

And with regard to "bastardized" -- you are exactly right!

99 posted on 05/13/2007 11:09:35 PM PDT by dayglored (Listen, strange women lying in ponds distributing swords is no basis for a system of government!)
[ Post Reply | Private Reply | To 91 | View Replies ]


To: dayglored
In versions of DOS prior to 5.0, you could set an environment variable called "SWITCHAR" which would be interpreted as the switch character.

Yep, I remember that - I was a Unix guy at the time DOS became popular. One of the reasons it never really "worked" is that not many third party DOS apps/utilties respected SWITCHAR, so it was inconsistent as to whether it worked or not.

105 posted on 05/14/2007 5:45:51 AM PDT by Mannaggia l'America
[ Post Reply | Private Reply | To 99 | View Replies ]

To: dayglored
I used the SWITCHAR feature for a long time. I was working in CP/M and HDOS on my H-8 at home (1980) and UNIX on the 3B20 at work (Pacific Telephone). I didn't touch a Microsoft product until 1985. The "PC" was way out of my budget when it first arrived in 1981.
135 posted on 05/14/2007 9:37:06 AM PDT by Myrddin
[ Post Reply | Private Reply | To 99 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson