Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Microsoft Operating Systems Software

Microsoft Posts Source Code For MS-DOS and Word For Windows 224

An anonymous reader writes "Microsoft, along with the Computer History Museum, has posted the source code for MS-DOS 1.1 and 2.0, and Word for Windows 1.1a. It's been a long time coming — DOS 2.0 was released for IBM PCs in 1983, and Word for Windows 1.1a came out in 1990. The museum, with Microsoft's consent, has made the code available for non-commercial use. They've also explained some of the history of this software's development: '[In August, 1980], IBM had already contracted with Microsoft to provide a BASIC interpreter for the PC, so they asked them to investigate also providing the operating system. Microsoft proposed licensing "86-DOS", which had been written by Tim Paterson at Seattle Computer Products (SCP) for their 8086-based computer kit because the 16-bit version of CP/M was late. When SCP signed the licensing deal [7] with Microsoft, they didn't know for sure who the computer manufacturer was. Paterson said "We all had our suspicions that it was IBM that Microsoft was dealing with, but we didn't know for sure." [1] He left SCP to work for Microsoft in 1981. "The first day on the job I walk through the door and 'Hey! It's IBM.'" Microsoft originally licensed 86-DOS in December 1980 for a flat fee of $25,000. By the next summer they recognized the importance of owning it and being able to license it to other companies making IBM-PC clones, so they purchased all rights for an additional $50,000.'"
This discussion has been archived. No new comments can be posted.

Microsoft Posts Source Code For MS-DOS and Word For Windows

Comments Filter:
  • FreeDOS (Score:1, Informative)

    by ArcadeMan ( 2766669 ) on Tuesday March 25, 2014 @03:30PM (#46576743)

    Stop asking Microsoft for the source code to MS-DOS when there's already a compatible DOS available for free [freedos.org].

  • by SJHillman ( 1966756 ) on Tuesday March 25, 2014 @03:39PM (#46576843)

    To the best of my knowledge, the last version of Windows to actually be based on DOS was Windows ME. 2000, XP and later followed the NT base.

  • GitHub Source (Score:5, Informative)

    by Anonymous Coward on Tuesday March 25, 2014 @03:42PM (#46576879)

    Someone posted a mirror to GitHub: https://github.com/Incognito/msdos

  • Re:Tainting (Score:5, Informative)

    by ledow ( 319597 ) on Tuesday March 25, 2014 @04:04PM (#46577089) Homepage

    Are you intending to write an antique DOS system in assembler that uses some really, really primitive version of FAT - by the looks of it? Then probably best not to look.

    The other 99.99999% of the planet, however, might find it interesting.

    Personally, I find anything still written in assembler to be totally worthless. If you wanted that, you could have run it through a disassembler at the time of it's release and it's not-much-more work to get to something just as readable.

    Like the original Prince of Persia code dump - only useful for historical reference and to find out how data and data structures were processed in terms of file compatibility etc. (so, long-dead OS and filesystems are pretty worthless, especially when we know almost everything about them already).

    And honestly, from a first glance, it's SUCH basic code that if you were to program any kind of DOS, and needed to be MS-compatible, the only obvious way to do so would be a basically word-for-word re-writing of what they have. There's almost zero room for "invention" or "interpretation" here, so it's mostly uncopyrightable except as a collection of code. Most functions are literally a handful of lines of assembler on well-known data structures that do one quite obvious thing and the necessary - and prescribed by the way the OS works - register / stack shuffling to make it happen.

    If I were on the FreeDOS team, yeah, I wouldn't want to read it. But honestly, the chances are I wouldn't bother - I'd have a much nicer, more modern, easier-to-read, collaboratively-written project that does an awful lot more than these antique DOS's could ever do sitting right in front of me, already written. There's nothing "useful" here, but it buys MS some "open-source" lip-service.

  • by RightSaidFred99 ( 874576 ) on Tuesday March 25, 2014 @04:17PM (#46577247)

    Windows, including the most up to date one, still have a 16 bit personality able to run DOS programs. This means there is something there that is able to catch int 21 and process it, as well as allow programs to direct interrupts.

    Modern computing fail. I can run ARM Android binaries on my Windows box, doesn't mean that Windows has Android vulnerabilities or that Android is part of Windows.

  • by tlhIngan ( 30335 ) <slashdot.worf@net> on Tuesday March 25, 2014 @04:33PM (#46577389)

    Windows, including the most up to date one, still have a 16 bit personality able to run DOS programs. This means there is something there that is able to catch int 21 and process it, as well as allow programs to direct interrupts.

    While it is true that cmd.exe (as well as the black screen dumb terminal that it usually runs in) are not DOS, DOS is certainly still in there, somewhere.

    Nope, 64-bit versions of Windows do not have the 16 bit personality anymore because the CPU cannot run 16-bit code in 64-bit mode. Virtualization programs typically run 16-bit code in a software emulator as it's comparatively very little code before the OS jumps into 32 bit mode or 64 bit mode.

    cmdhost.exe, the command prompt host, is just a program that generates the GUI-less environment for a command line program to operate in (since the concept of stuff like "stdin" and "stdout" aren't applicable). It's not DOS at all, just a program that emulates what used to be called a DOS box by providing various services like clipboard to stdin/stdout, scroll back buffers, mapping text draw commands and cursor control commands, etc.

    Other than that, cmd.exe is a regular 32-bit program making regular Win32 API calls as needed.

  • by 93 Escort Wagon ( 326346 ) on Tuesday March 25, 2014 @05:21PM (#46577851)

    Maybe that's it, maybe Gates was a great coder, ...

    Andy Hertzfeld, over at folklore.org, has made some comments regarding how poor Gates' coding skills appeared to be. [folklore.org]

  • by westlake ( 615356 ) on Tuesday March 25, 2014 @05:32PM (#46577971)

    This short history summary shows that Microsoft's roots are in marketing, not programming.

    In 1975 there is BASIC for the Altair. In 1976 Microsoft was selling BASIC to Fortune 500 clients. In 1977 it is branching out into FORTRAN, COBOL. and Assembler. In 1978, Microsoft releases Applesoft BASIC.

    [In 1979] Microsoft 8080 BASIC is the first microprocessor product to win the ICP Million Dollar Award. Traditionally dominated by software for mainframe computers, this recognition is indicative of the growth and acceptance of the PC industry.
    June 18, Microsoft announces Microsoft BASIC for the 8086 16-bit microprocessor. This first release of a resident high-level language for use on 16-bit machines marks the beginning of widespread use of these processors.
    [in 1980] Microsoft introduces the Pascal language, develops XENIX (enhanced version of the UNIX operating system), and begins to explore spreadsheet applications. It also releases its first hardware product, the Microsoft SoftCard, which allows Apple II users to run CP/M-80. Microsoft will provide BASIC, FORTRAN, and COBOL languages for the Z-80 SoftCard.

    Microsoft Time Line [thocp.net]

    In 1980 Microsoft had a solid track record in development tools for the microcomputer and was well positioned to become a major player in operating systems and applications software in both the business and consumer markets.

  • by mcl630 ( 1839996 ) on Tuesday March 25, 2014 @06:23PM (#46578511)

    Dosbox allows you to slow down the emulated DOS environment to make old games run fine.

  • by mcl630 ( 1839996 ) on Wednesday March 26, 2014 @12:16AM (#46581353)

    Nothing in the your quote contradicts what I said. I've used DOSBox to play old games. There is a setting to adjust the speed of the emulator.

    In fact I just took a look at one of the config files, the setting is called "cycles" and it is in the "cpu" section of the config.

  • by Hal_Porter ( 817932 ) on Wednesday March 26, 2014 @12:50AM (#46581475)

    In Undocumented Dos they explained that the version of Dos was a "a hacked version of MSDOS ... mostly removing the file system". NTVDM runs real mode Dos programs in V86 mode. So what happens is that when when you make an int 21h call to open a file in a Dos program? You real mode code hits a BOP. A BOP is an illegal opcode. At that point the processor traps (or software emulator on a Risc machine calls out) and you end up running fairly standard user mode protected mode code which handles the file open.

    You can see it here in Reactos

    http://old.reactos.org/wiki/DO... [reactos.org]

    In order to implement the DOS "API" (int 21, etc.) we need a way to call Win32 and kernel procedures from the VM thread. This is accomplished in Microsoft's NTVDM by writing a stub 16-bit kernel (ntdos.sys, ntio.sys, ...) that hooks the same interrupts as a 16-bit DOS kernel would, but instead of actually handling these, it executes a special undefined opcode (C4 C4 followed by some more bytes indicating the desired operation) in order to trap back into kernel mode/protected mode (meaning execution will pass through KiTrap6, "INT 06: Invalid Opcode Code (#UD)"). The request is dispatched to the proper VDM and handled in protected mode, and then an iret takes execution back to the instruction after the invalid opcode sequence.

  • by Guy Harris ( 3803 ) <guy@alum.mit.edu> on Wednesday March 26, 2014 @02:47PM (#46586505)

    Do you have a piece of source code to support your claims?

    No. Do you have a piece of source code to prove that NT-family versions of Windows are DOS-based? The "Inside Windows NT" books say that the NT kernel-mode code has a very much non-DOS structure.

    Because unless proven otherwise, Windows is still a crap patchwork.

    An OS can be a "crap patchwork" without being based on DOS.

"More software projects have gone awry for lack of calendar time than for all other causes combined." -- Fred Brooks, Jr., _The Mythical Man Month_

Working...