MS-DOS - Windows Command-line Interface

Windows Command-line Interface

All versions of Microsoft Windows have had an MS-DOS like command-line interface (CLI). This could run many DOS and variously Win32, OS/2 1.x and Posix command line utilities in the same command-line session, allowing piping between commands. The user interface, and the icon up to Windows 2000, followed the native MS-DOS interface.

The 16-bit versions of Windows (up to 3.11) ran as a Graphical User Interface (GUI) on top of MS-DOS. With Windows 95, 98, and ME the MS-DOS part was integrated, treating both operating systems as a complete package. The command line accessed the DOS command line (usually command.com), through a Windows module (winoldap.mod).

A new line of Windows, (Windows NT), boot through a kernel whose sole purpose is to load Windows. One can not run Win32 applications in the loader system in the manner that OS/2, UNIX or Consumer Windows can launch character mode sessions.

The command session permits running of various supported command line utilities from Win32, MS-DOS, OS/2 1.x and POSIX. The emulators for MS-DOS, OS/2 and POSIX use the host's window in the same way that Win16 applications use the Win32 explorer. Using the host's window allows one to pipe output between emulations.

The MS-DOS emulation is done through the NTVDM (NT Virtual DOS Machine). This is a modified SoftPC (a former product similar to VirtualPC), running a modified MS-DOS 5 (ntio.sys and ntdos.sys). The output is handled by the console DLLs, so that the program at the prompt (cmd.exe, 4nt.exe, tcc.exe), can see the output. Command.com passes most of its commands down to the underlying processor (cmd.exe, 4nt.exe, ...), but is generally not used. If you need commands that rely on TSR programs, you must launch these from command.com. 64-bit Windows does not have either the DOS emulation, or the DOS commands (edit, debug, edlin, kbd16), that come with 32-bit Windows.

The DOS version returns 5.00 or 5.50, depending on which interrupt is used to determine it. Utilities from MS-DOS 5.00 run in this emulation without modification. The very early beta programs of NT show MS-DOS 30.00, but programs running in MS-DOS 30.00 would assume that OS/2 was in control.

The OS/2 emulation is handled through OS2SS.EXE and OS2.EXE, and DOSCALLS.DLL. OS2.EXE is a version of the OS/2 shell (cmd.exe), which passes commands down to the OS2SS.EXE, and input-output to the Windows NT shell. Windows 2000 was the last version of NT to support OS/2. The emulation is OS/2 1.30.

POSIX is emulated through the POSIX shell, but no emulated shell: the commands are handled directly in CMD.EXE.

The Command Prompt is often called the MS-DOS prompt. In part, this was the official name for it in Windows 9x and early versions of Windows NT (NT 3.5 and earlier), and in part because the SoftPC emulation of DOS redirects output into it. Some purists object to this name, because the underlying binaries are Win32 console applications, rather than DOS programs. This confusion does not exist under OS/2 because there are separate DOS and OS/2 prompts, and running a DOS program under OS/2 will launch a separate DOS window to run the application.

All versions of Windows for x86-64 and Itanium architectures no longer include the NTVDM and can therefore no longer natively run MS-DOS or 16-bit Windows applications. There are alternatives in the form of Virtual machine emulators such as Microsoft's own Virtual PC, as well as VMware, DOSBox, and others.

Read more about this topic:  MS-DOS

Famous quotes containing the word windows:

    —and then it was
    There interposed a Fly—

    With Blue—uncertain stumbling Buzz—
    Between the light—and me—
    And then the Windows failed—and then
    I could not see to see—
    Emily Dickinson (1830–1886)