6 ms·
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
by kiwidrew 6y ago
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 = <TRUE or FALSE>
The default is TRUE which means both /dev/<dev> and
<dev> will reference the device <dev>. If FALSE is
selected, only /dev/<dev> refers to device <dev>,
<dev> 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/XENIX.ASM https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/...
[2] https://github.com/microsoft/MS-DOS/blob/master/v2.0/bin/CONFIG.DOC#L60 https://github.com/microsoft/MS-DOS/blob/master/v2.0/bin/CON...
- emptyparadise 6y agoI 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.
- est 6y agoWin2k and WinXP source code are leaked if I am not mistaken
- ganafagol 6y agoRelease != leak
- minxomat 6y agoEven the leaks contain enough of Microsoft's spirit in their comments: https://gist.github.com/turbo/75f0905275c29a3049f983cfe273eae2 https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea... ;)
- emptyparadise 6y agoBut sadly a lot of interesting fun and research that could be done with this code won't ever see the light of day because lawyers are scary.
- john4532452 6y agoWhat special about NT kernel that's not in linux kernel ?
- dijit 6y agoIOCP! https://en.wikipedia.org/wiki/Input/output_completion_port https://en.wikipedia.org/wiki/Input/output_completion_port
- bitcharmer 6y agoYou mean like epoll on Linux?
- tobias3 6y agoNo, like io_uring which Linux got in 2019 and still doesn't cover everything yet (e.g. currently mkdirat() is being added). It also often falls back to a kernel-level thread pool, since many e.g. file systems don't implement async IO.
- scaladev 6y ago>since many e.g. file systems don't implement async IO If we're picking on Linux here we should also mention that this issue cannot exist on Windows because it doesn't support anything else besides NTFS and a couple of options dating back to the 18th century or so. Oh, and WinFS, of course, F being short for future which is like the horizon, or the communism, always out there just a month or two away.
- tinus_hn 6y agoYou can actually for example get drivers for APFS for Windows from third party vendors.
- scaladev 6y agoSure, and there are third party drivers for ext* and btrfs and god knows what else… but we're talking about official support here, I think. You can find all sorts of craziness in out-of-tree patches for the Linux kernel.
- pram 6y agoIsn't that what SFU was?
- sophistc 6y agoNT originally had a Unix subsystem: https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem
- emptyparadise 6y agoYeah, and WSL1 was something similar, but I was suggesting just Unix here, no Win32. Imagine GNU/NT!
- wruza 6y agoApart from fork() and custom async io (epoll, iocp) aren’t they pretty compatible even without cygwin? GNU relies on POSIX (afair), so wouldn’t NT features be unused extra?
- HeckFeck 6y agoIf someone wanted to attempt this absolute bastardisation of God's will, you could try porting the GNU userland to run atop the ReactOS kernel. We'd finally have the GPL-licenced microkernel OS of Stallman's dreams.
- pjmlp 6y agoWell, there is this different timeline in the universe where Microsoft decides to keep selling Xenix instead of focusing on MS-DOS.