MS-DOS Source Code Released
computerhistory.org
computerhistory.org
One interesting comment in DIR.ASM:
; DS:SI Points to asciz string of path (no leading '/').
and in SYSCALL.txt's documentation, everything uses forward-slashes as directory separators. EDLIN.ASM and FORMAT.ASM on the other hand make clear that the directory separator is backslash on PC; mov ax,(char_oper shl 8) ;get switch character
int 21h
cmp dl,"/"
jnz slashok ;if not / , then not PC
mov [dirchar],"\" ;in PC, dir separator = \
mov [userdir],"\"
mov [optchar],"/" ;in PC, option char =
Looks like early DOS supported both?Yes, according to http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432... which says:
> they coded the OS to accept either "/" or "\" character as the path character (this continues today, btw - try typing "notepad c:/boot.ini" on an XP machine (if you're an admin)). And they went one step further. They added an undocumented system call to change the switch character. And updated the utilities to respect this flag.
> And then they went and finished out the scenario: They added a config.sys option, SWITCHAR= that would let you set the switch character to "-".
> Which flipped MS-DOS into a *nix style system where command lines used "-switch", and paths were / delimited.
v20source/exec.asm, line 95:
exec_signature DW ? ; must contain 4D5A (yay zibo!)
There are a couple of other references, too.