Live data from Hacker News

Why is the DOS path character "\"? (2005)

web.archive.org

1–10 of 166 posts

Re: Why is the DOS path character "\"? (2005)

#2
In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.

Re: Why is the DOS path character "\"? (2005)

#5
In 2007 I joined a company that sold a derivatives trading platform and ran VMS on the core component, the order routing engine that dispatched trading instructions to the respective exchange.

It was really weird working on it at first after having used both Unix systems and DOS for so long. I was very familiar with DOS and even used CP/M way back in the day when I was a teenager (I'm that old), VMS was a weird amalgam of a pretty advanced OS with a very capable command line environment like unix, but with a lot of conventions that felt familiar from DOS. I was a ware of some of the history of VMS influence on DOS so it was fascinating to work on and I quite enjoyed it even though it was clearly a dead end at that point.

Re: Why is the DOS path character "\"? (2005)

#6
Thanks to Microsoft's recent release of the MS-DOS 2.0 source code, we can now peek under the hood and confirm that Microsoft specifically intended for the DOS 2.0 file APIs to be compatible with Unix. From XENIX.ASM [1], the code that implements the new API:

    ;
    ; xenix file calls for MSDOS
    ;
    
    TITLE   XENIX - IO system to mimic UNIX
And the CONFIG.DOC [2] file discusses the 'AVAILDEV' option which lets the system mimic Unix even more:

    AVAILDEV = 
        The  default  is  TRUE which means both /dev/ and
         will reference the device .   If  FALSE  is
        selected,  only  /dev/  refers  to  device ,
         by itself means a file in the current  directory
        with the same name as one of the devices.
Finally, an example CONFIG.SYS file from the same document:

    A typical configuration file might look like this:
    
    BUFFERS = 10
    FILES = 10
    DEVICE = /bin/network.sys
    BREAK = ON
    SWITCHAR = -
    SHELL = a:/bin/command.com a:/bin -p
I think it's pretty clear how Microsoft intended for MS-DOS to be configured, but alas IBM had other ideas...

[1] https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/...

[2] https://github.com/microsoft/MS-DOS/blob/master/v2.0/bin/CON...

Re: Why is the DOS path character "\"? (2005)

#7
post #3

One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.

I have a feeling that the "-" character for an option is a unix (multics) only thing.

It is also worth looking at https://retrocomputing.stackexchange.com/questions/4695/slas... where there is some discussion of the history.

Along with https://retrocomputing.stackexchange.com/questions/7030/why-...

and

https://retrocomputing.stackexchange.com/questions/4686/wher...

Re: Why is the DOS path character "\"? (2005)

#8
post #6

Thanks to Microsoft's recent release of the MS-DOS 2.0 source code, we can now peek under the hood and confirm that Microsoft specifically intended for the DOS 2.0 file APIs to be compatible with Unix. From XENIX.ASM [1], the code that implements the new API: ; ; xenix file calls for MSDOS ; TITLE XENIX - IO system to mimic UNIX And the CONFIG.DOC [2] file discusses the 'AVAILDEV' option which lets the system mimic U…

I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.

Re: Why is the DOS path character "\"? (2005)

#9
post #6

Thanks to Microsoft's recent release of the MS-DOS 2.0 source code, we can now peek under the hood and confirm that Microsoft specifically intended for the DOS 2.0 file APIs to be compatible with Unix. From XENIX.ASM [1], the code that implements the new API: ; ; xenix file calls for MSDOS ; TITLE XENIX - IO system to mimic UNIX And the CONFIG.DOC [2] file discusses the 'AVAILDEV' option which lets the system mimic U…

I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.

Win2k and WinXP source code are leaked if I am not mistaken

Re: Why is the DOS path character "\"? (2005)

#10
post #9

Earlier quoted context omitted.

I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.

Win2k and WinXP source code are leaked if I am not mistaken

Release != leak
Post reply on HN