MS Dos

73
MS-DOS MS-DOS An example of MS-DOS's command-line interface, this one showing that the current directory is the root of drive C. Company / developer Microsoft Corporation OS family DOS Working state Discontinued/ Historic Source model Closed source Initial release 1981 Latest stable release 8.0 / September 14, 2000; 9 years ago Available language (s) Multilanguage Available programming C , Pascal , QBasic , Batch ,

Transcript of MS Dos

Page 2: MS Dos

Default user interface

Command-line interface, Text user interface

License Proprietary

MS-DOS (pronounced / ̩ ɛ m ɛ sˈd ɒ s/ , em-es-dos; short for MicroSoft Disk Operating System) is an operating system for x86-based personal computers, which was purchased by Microsoft. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for personal computers during the 1980s up to mid 1990s. It was preceded by M-DOS (also called MIDAS), designed and copyrighted by Microsoft in 1979. MSDOS was written for the Intel 8086 family of microprocessors, particularly the IBM PC and compatibles. It was gradually replaced on consumer desktop computers by operating systems offering a graphical user interface (GUI), in particular by various generations of the Microsoft Windows operating system. MS-DOS developed out of QDOS (Quick and Dirty Operating System), also known as 86-DOS.[1]

MS-DOS development originally started in 1981,[2] and was first released in 1982 as MS-DOS 1.0.[2] Several versions were released under different names for different hardware.[3] MS-DOS had eight major versions released before Microsoft stopped development in 2000. It was the key product in Microsoft's growth from a programming languages company to a diverse software development firm, providing the company with essential revenue and marketing resources. It was also the underlying basic operating system on which early versions of Windows ran as a GUI.

History

Main article: DOS

MS-DOS was a renamed form of 86-DOS — informally known as the Quick-and-dirty Operating System or Q-DOS [2] — owned by Seattle Computer Products, written by Tim Paterson [2] . Microsoft needed an operating system for the then-new Intel 8086 but it had none available, so it licensed 86-DOS and released a version of it as MS-DOS 1.0[2]. Development started in 1981, and MS-DOS 1.0 was released with the IBM PC in 1982[2]. (86-DOS, in turn, was written as an interim replacement for the delayed CP/M-86, when Seattle Computer Products' needed an operating system to sell with their 8086 processor card for the S-100 bus, which at

Page 3: MS Dos

the time was a leading edge product.) Tim Paterson is considered the original author of DOS and he is called "The Father of DOS"[2][n 1].

Worried by possible legal problems, in June 1981 Microsoft made an offer to Rod Brock, the owner of Seattle Computer, to buy the rights for 86-DOS. An agreement to release all rights to the software was signed in June 1981. The total cost was $75,000.[3][n 2]

Originally MS-DOS was designed to be an operating system that could run on any 8086-family computer. Each computer would have its own distinct hardware and its own version of MS-DOS, similar to the situation that existed for CP/M, and with MS-DOS emulating the same solution as CP/M to adapt for different hardware platforms. To this end, MS-DOS was designed with a modular structure with internal device drivers, minimally for primary disk drives and the console, integrated with the kernel and loaded by the boot loader, and installable device drivers for other devices loaded and integrated at boot time. The OEM would use a development kit provided by Microsoft to build a version of MS-DOS with their basic I/O drivers and a standard Microsoft kernel, which they would typically supply on disk to end users along with the hardware. Thus, there were many different versions of "MS-DOS" for different hardware, and there is a major distinction between an IBM-compatible (or ISA) machine and an MS-DOS [compatible] machine. Some machines, like the Tandy 2000, were MS-DOS compatible but not IBM-compatible, so they could only run software written exclusively for MS-DOS without dependence on the peripheral hardware of the IBM PC architecture.

This design would have worked well for compatibility, if application programs had only used MS-DOS services to perform device I/O, and indeed the same design philosophy is embodied in Windows NT (see Hardware Abstraction Layer). However, in MS-DOS's early days, the greater speed attainable by programs through direct control of hardware was of particular importance, especially for games, which often pushed the limits of their contemporary hardware. Very soon an IBM-compatible architecture became the goal, and before long all 8086-family computers closely emulated IBM's hardware, and only a single version of MS-DOS for a fixed hardware platform was needed for the market. This version is the version of MS-DOS that is discussed here, as the dozens of other OEM versions of "MS-DOS" were only relevant to the systems they were designed for, and in any case were very similar in function and capability to the same-numbered standard version for the IBM PC, with a few notable exceptions.

Page 4: MS Dos

While MS-DOS appeared on PC clones, true IBM computers used PC DOS, a rebranded form of MS-DOS. Ironically, the dependence on IBM-compatible hardware caused major problems for the computer industry when the original design had to be changed. For example, the original design could support no more than 640 kilobytes of memory (the 640 kB barrier), because IBM's hardware design reserved the address space above this limit for peripheral devices and ROM. Manufacturers had to develop complicated schemes (EMS and XMS, and other minor proprietary ones) to access additional memory. This limitation would not have been a problem if the original idea of interfacing with hardware through MS-DOS had endured. (However, MS-DOS was also a real-mode operating system, and the Intel x86 architecture only supports up to 1 MB of memory address space in Real Mode, even on Pentium 4 and later x86 CPUs, so for simple access to megabytes of memory, MS-DOS would have had to be rewritten to run in 80286 or 80386 Protected Mode.) Also, it should be noted that Microsoft originally described MS-DOS as "an operating system for Intel 8086-based microcomputers", and the 8086 CPU (and its cousin the 8088) itself has only 1 MiB of total memory address space.

Versions

Main article: Comparison of x86 DOS operating systems

Microsoft licensed or released versions of MS-DOS under different names like SB-DOS or Z-DOS [3] . Competitors released DOS systems such as DR-DOS and PTS-DOS that could also run DOS applications. The following versions of MS-DOS were released into the public:[4][5]

MS-DOS 1.x o Version 1.0 (Retail)

o Version 1.1 (Retail)

o Version 1.12 (Retail)

o Version 1.25 (Retail)

MS-DOS 2.x              - Support for 10 MB Hard Disk Drives and tree-structure filing system

o Version 2.0 (Retail)

Page 5: MS Dos

o Version 2.1 (Retail)

o Version 2.11 (Retail)

o Version 2.2 (Retail)

o Version 2.21 (Retail)

MS-DOS 3.x

o Version 3.0 (Retail) - Support for larger Hard Disk Drives

o Version 3.1 (Retail) - Support for Microsoft Networks

o Version 3.2 (Retail)

o Version 3.21 (Retail)

o Version 3.25 (Retail)

o Version 3.3 (Retail)

o Version 3.3a (Retail)

o Version 3.3r (Retail)

o Version 3.31 (Retail)

o Version 3.35 (Retail)

MS-DOS 4.x            - includes a graphical/mouse interface.

o Version 4.0 (Retail)

o Version 4.01 (Retail)

MS-DOS 5.x

o Version 5.0 (Beta 1)

o Version 5.0 (Retail) - includes a full-screen editor

o Version 5.0a (Retail)

MS-DOS 6.x

o Version 6.0 (Retail)

o Version 6.1 (Retail)

Page 6: MS Dos

o Version 6.2b (RTM)

o Version 6.2 (Retail)

o Version 6.21 (Retail)

o Version 6.22 (Retail)

MS-DOS 7.x

o Version 7.0 (Beta)

o Version 7.1 (Retail)

Competition

)

The original MS-DOS advertisement in 1981.

On microcomputers based on the Intel 8086 and 8088 processors, including the IBM PC and clones, the initial competition to the PC DOS/MS-DOS line came

Page 7: MS Dos

from Digital Research, whose CP/M operating system had inspired MS-DOS. In fact, there remains controversy as to whether Q-DOS was more or less plagiarised from early versions of CP/M code. Digital Research released CP/M-86 a few months after MS-DOS, and it was offered as an alternative to MS-DOS and Microsoft's licensing requirements, but at a higher price. Executable programs for CP/M-86 and MS-DOS were not interchangeable with each other; much applications software was sold in both MS-DOS and CP/M-86 versions until MS-DOS became preponderant (later Digital Research operating systems could run both MS-DOS and CP/M-86 software). MS-DOS supported the simple .COM and the more advanced relocatable .EXE executable file formats; CP/M-86 a relocatable format using the file extension .CMD.

Most of the machines in the early days of MS-DOS had differing system architectures and there was a certain degree of incompatibility, and subsequently vendor lock-in. Users who began using MS-DOS with their machines were compelled to continue using the version customized for their hardware, or face trying to get all of their proprietary hardware and software to work with the new system.

In the business world the 808x-based machines that MS-DOS was tied to faced competition from the Unix operating system which ran on many different hardware architectures. Microsoft itself sold a version of Unix for the PC called Xenix.

In the emerging world of home users, a variety of other computers based on various other processors were in serious competition with the IBM PC: the Apple II, early Apple Macintosh, the Commodore 64 and others did not use the 808x processor; many 808x machines of different architectures used custom versions of MS-DOS. At first all these machines were in competition. In time the IBM PC hardware configuration became dominant in the 808x market as software written to communicate directly with the PC hardware without using standard operating system calls ran much faster, but on true PC-compatibles only. Non-PC-compatible 808x machines were too small a market to have fast software written for them alone, and the market remained open only for IBM PCs and machines that closely imitated their architecture, all running either a single version of MS-DOS compatible only with PCs, or the equivalent IBM PC DOS. Most clones cost much less than IBM-branded machines of similar performance, and became widely used by home users, while IBM PCs had a large share of the business computer market.

Microsoft and IBM together began what was intended as the follow-on to MS/PC DOS, called OS/2. When OS/2 was released in 1987, Microsoft began an

Page 8: MS Dos

advertising campaign announcing that "DOS is Dead" and stating that version 4 was the last full release. OS/2 was designed for efficient multi-tasking — an IBM speciality derived from deep experience with mainframe operating systems — and offered a number of advanced features that had been designed together with similar look and feel; it was seen as the legitimate heir to the "kludgy" DOS platform.

MS-DOS had grown in spurts, with many significant features being taken or duplicated from Microsoft's other products and operating systems. MS-DOS also grew by incorporating, by direct licensing or feature duplicating, the functionality of tools and utilities developed by independent companies, such as Norton Utilities, PC Tools (Microsoft Anti-Virus), QEMM expanded memory manager, Stacker disk compression, and others.

During the period when Digital Research was competing in the operating system market some computers, like Amstrad PC-1512, were sold with floppy disks for two operating systems (only one of which could be used at a time), MS-DOS and CP/M-86 or a derivative of it. Digital Research produced DOS Plus, which was compatible with MS-DOS 2.11, supported CP/M-86 programs, had additional features including multi-tasking, and could read and write disks in CP/M and MS-DOS format.

While OS/2 was under protracted development, Digital Research released the MS-DOS compatible DR-DOS 5, which included features only available as third-party add-ons for MS-DOS (and still maintained considerable internal CP/M-86 compatibility). Unwilling to lose any portion of the market, Microsoft responded by announcing the "pending" release of MS-DOS 5.0 in May 1990. This effectively killed most DR-DOS sales until the actual release of MS-DOS 5.0 in June 1991. Digital Research brought out DR-DOS 6, which sold well until the "pre-announcement" of MS-DOS 6.0 again stifled the sales of DR-DOS.

Microsoft had been accused of carefully orchestrating leaks about future versions of MS-DOS in an attempt to create what in the industry is called FUD (fear, uncertainty, and doubt) regarding DR-DOS. For example, in October 1990, shortly after the release of DR-DOS 5.0, and long before the eventual June 1991 release of MS-DOS 5.0, stories on feature enhancements in MS-DOS started to appear in InfoWorld and PC Week. Brad Silverberg, Vice President of Systems Software at Microsoft and General Manager of its Windows and MS-DOS Business Unit, wrote a forceful letter to PC Week (November 5, 1990), denying that Microsoft was engaged in FUD tactics ("to serve our customers better, we decided to be more

Page 9: MS Dos

forthcoming about version 5.0") and denying that Microsoft copied features from DR-DOS:

"The feature enhancements of MS-DOS version 5.0 were decided and development was begun long before we heard about DR-DOS 5.0. There will be some similar features. With 50 million MS-DOS users, it shouldn't be surprising that DRI has heard some of the same requests from customers that we have." – (Schulman et al. 1994). [6]

The pact between Microsoft and IBM to promote OS/2 began to fall apart in 1990 when Windows 3.0 became a marketplace success. Much of Microsoft's further contributions to OS/2 also went in to creating a third GUI replacement for DOS, Windows NT.

IBM, which had already been developing the next version of OS/2, carried on development of the platform without Microsoft and sold it as the alternative to DOS and Windows.

Legal issues

As a response to Digital Research's DR-DOS 6.0, which bundled SuperStor disk compression, Microsoft opened negotiations with Stac Electronics, vendor of the most popular DOS disk compression tool, Stacker. In the due diligence process, Stac engineers had shown Microsoft part of the Stacker source code. Stac was unwilling to meet Microsoft's terms for licensing Stacker and withdrew from the negotiations. Microsoft chose to license Vertisoft's DoubleDisk, using it as the core for its DoubleSpace disk compression[7].

MS-DOS 6.0 and 6.20 were released in 1993, both including the Microsoft DoubleSpace disk compression utility program. Stac successfully sued Microsoft for patent infringement regarding the compression algorithm used in DoubleSpace. This resulted in the 1994 release of MS-DOS 6.21, which had disk-compression removed. Shortly afterwards came version 6.22, with a new version of the disk compression system, DriveSpace, which had a different compression algorithm to avoid the infringing code.

Prior to 1995, Microsoft licensed MS-DOS (and Windows) to computer manufacturers under three types of agreement: per-processor (a fee for each system the company sold), per-system (a fee for each system of a particular model), or

Page 10: MS Dos

per-copy (a fee for each copy of MS-DOS installed). The largest manufacturers used the per-processor arrangement, which had the lowest fee. This arrangement made it expensive for the large manufacturers to migrate to any other operating system, such as DR-DOS. In 1991, the U.S. government Federal Trade Commission began investigating Microsoft's licensing procedures, resulting in a 1994 settlement agreement limiting Microsoft to per-copy licensing. Digital Research did not gain by this settlement, and years later its successor in interest, Caldera, sued Microsoft for damages. This lawsuit was settled with a monetary payment of $150 million.

End of MS-DOS

MS-DOS lingers in Windows 7.

Today, MS-DOS is rarely used for desktop computing. Since the release of Windows 95, it was integrated as a full product used for bootstrapping and troubleshooting, and no longer released as a standalone product. It was still available, but became increasingly irrelevant as development shifted to the Windows API.

Windows XP contains a copy of the core MS-DOS 8 files from Windows Me, accessible only by formatting a floppy as an "MS-DOS startup disk". These core files are a stripped down bootstrap only, which does not include CD-ROM support. With Windows Vista the files on the startup disk are dated 18 April 2005 but are otherwise unchanged, including the string "MS-DOS Version 8 (C) Copyright 1981-1999 Microsoft Corp" inside COMMAND.COM.

However the only versions of DOS currently recognized as stand-alone OSs, and supported as such by the Microsoft Corporation are DOS 6.0 and 6.22, both of which remain available for download via their MSDN, volume license, and OEM license partner websites, for customers with valid login credentials.

Today, DOS is still used in embedded x86 systems due to its simple architecture, and minimal memory and processor requirements. The command line interpreter of NT-based versions of Windows, cmd.exe, maintains most of the same commands and some compatibility with DOS batch files.

Microsoft has introduced a new command-line called PowerShell. Powershell offers more functionality than MS-DOS.

Page 11: MS Dos

The Windows command-line interface

All versions of Microsoft Windows have had an MS-DOS like command-line interface (CLI). Versions of Windows (up to 3.11) ran as a Graphical User Interface (GUI) running above MS-DOS. Windows 95, 98, and ME had an MS-DOS prompt which ran command.com, with added facilities for such features as long file names.

The true 32-bit versions of Windows, from Windows NT, are not based on MS-DOS but provide a command-line interface similar to MS-DOS's character-mode interface known as the console. This is provided by a native executable, cmd.exe. Many Windows console applications are incorrectly referred to as MS-DOS applications. However, in reality they are Windows applications, using Windows system calls, using the text console for input and output rather than a graphical interface. Both true MS-DOS programs and Windows console programs can be run from the command line in the same console window.

32-bit Windows can run MS-DOS programs through the use of the NTVDM (NT Virtual DOS Machine), and the 16-bit command.com interpreter which is still included to maintain application compatibility with programs that require it.

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.

Legacy compatibility

From 1983 onwards, various companies have worked on graphical user interfaces (GUIs) capable of running on PC hardware. With DOS being the dominant operating system several companies released alternate shells, e.g. Microsoft Word for DOS, XTree, and the Norton Shell. However, this required duplication of effort and did not provide much consistency in interface design (even between products from the same company).

Later, in 1985, Microsoft Windows was released as Microsoft's first attempt at providing a consistent user interface (for applications). The early versions of Windows ran on top of MS-DOS and its clones. At first Windows met with little success, but this was also true for most other companies' efforts as well, for example GEM. After version 3.0 (1990), Windows gained market acceptance.

Page 12: MS Dos

Later versions (Windows 95, Windows 98 and Windows Me) used the DOS boot process to launch itself into protected mode. Basic features related to the file system, such as long file names, were only available to DOS when running as a subsystem of Windows. Windows NT ran independently of DOS but included a DOS subsystem so applications could run in a virtual machine under the new OS. With the latest Windows releases, even dual-booting MS-DOS is problematic as DOS may not be able to read the basic file system.

Related systems

Single-user

Several similar products were produced by other companies. In the case of PC DOS and DR-DOS, it is common but incorrect to call these "clones". Given that Microsoft manufactured PC DOS for IBM, PC DOS and MS-DOS were (to continue the genetic analogy) "identical twins" that diverged only in adulthood and eventually became quite different products. Although DR-DOS is regarded as a clone of MS-DOS, the DR-DOS versions appeared months and years before Microsoft's products. (For example, MS-DOS 4, released in July 1988, was followed by DR-DOS 5 in May 1990. MS-DOS 5 came in April 1991, with DR-DOS 6 being released the following June. MS-DOS 6 did not arrive until April 1993, with Novell DOS 7, DR-DOS' successor, following the next month.[8]) What made the difference in the end was Microsoft's desire to make MS-DOS a better platform for running Windows. Both IBM (DOS 5.02) and DRI (DOS 6 update) had to release interim releases for new undocumented Windows functionality.

PC DOS , DR-DOS ,

Novell DOS ,

OpenDOS ,

FreeDOS ,

FreeDOS 32 ,

GNU/DOS ,

PTS-DOS , and

PowerShell .

Page 13: MS Dos

These products are collectively referred to as DOS. However, MS-DOS can be a generic reference to DOS on IBM-PC compatible computers.

MS-DOS: A Brief Introduction

MS-DOS (Microsoft Disk Operating System) is a single-user, single-tasking computer operating system that uses a command line interface. In spite of its very small size and relative simplicity, it is one of the most successful operating systems that has been developed to date.

A Quick and Dirty History

When IBM launched its revolutionary personal computer, the IBM PC, in August 1981, it came complete with a 16-bit operating system from Microsoft, MS-DOS 1.0. This was Microsoft's first operating system, and it also became the first widely used operating system for the IBM PC and its clones.

MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty Operating System), which Microsoft bought from a Seattle company, appropriately named Seattle Computer Products, in July 1981. QDOS had been developed as a clone of the CP/M eight-bit operating system in order to provide compatibility with the popular business applications of the day such as WordStar and dBase. CP/M (Control Program for Microcomputers) was written by Gary Kildall of Digital Research several years earlier and had become the first operating system for microcomputers in general use.

QDOS was written by Tim Paterson, a Seattle Computer Products employee, for the new Intel 16-bit 8086 CPU (central processing unit), and the first version was shipped in August, 1980. Although it was completed in a mere six weeks, QDOS was sufficiently different from CP/M to be considered legal. Paterson was later hired by Microsoft.

Microsoft initially kept the IBM deal a secret from Seattle Computer Products. And in what was to become another extremely fortuitous

Page 14: MS Dos

move, Bill Gates, the not uncontroversial co-founder of Microsoft, persuaded IBM to let his company retain marketing rights for the operating system separately from the IBM PC project. Microsoft renamed it PC-DOS (the IBM version) and MS-DOS (the Microsoft version). The two versions were initially nearly identical, but they eventually diverged.

The acronym DOS was not new even then. It had originally been used by IBM in the 1960s in the name of an operating system (i.e., DOS/360) for its System/360 computer. At that time the use of disks for storing the operating system and data was considered cutting edge technology.

Until its acquisition of QDOS, Microsoft had been mainly a vendor of computer programming languages. Gates and co-founder Paul Allen had written Microsoft BASIC and were selling it on disks and tape mostly to PC hobbyists.

MS-DOS soared in popularity with the surge in the PC market. Revenue from its sales fueled Microsoft's phenomenal growth, and MS-DOS was the key to company's rapid emergence as the dominant firm in the software industry. This product continued to be the largest single contributor to Microsoft's income well after it had become more famous for Windows.

Subsequent versions of MS-DOS featured improved performance and additional functions, not a few of which were copied from other operating systems. For example, version 1.25, released in 1982, added support for double-sided disks, thereby eliminating the need to manually turn the disks over to access the reverse side.

Version 2.0, released the next year, added support for directories, for IBM's then huge 10MB hard disk drive (HDD) and for 360KB, 5.25-inch floppy disks. This was followed by version 2.11 later in the same year, which added support for foreign and extended characters.

Version 3.0, launched in 1984, added support for 1.2MB floppy disks and 32MB HDDs. This was soon followed by version 3.1, which added support for networks.

Additions and improvements in subsequent versions included support for

Page 15: MS Dos

multiple HDD partitions, for disk compression and for larger partitions as well as an improved disk-checking utility, enhanced memory management, a disk defragmenter and an improved text editor.

The final major version was 7.0, which was released in 1995 as part of Microsoft Windows 95. It featured close integration with that operating system, including support for long filenames and the removal of numerous utilities, some of which were on the Windows 95 CDROM. It was revised in 1997 with version 7.1, which added support for the FAT32 filesystem on HDDs.

Although many of the features were copied from UNIX, MS-DOS was never able to come anywhere close to UNIX in terms of performance or features. For example, MS-DOS never became a serious multi-user or multitasking operating system (both of which were core features of UNIX right from the start) in spite of attempts to retrofit these capabilities. Multitasking is the ability for a computer to run two or more programs simultaneously.

The Rise of the GUI

The introduction of the Apple Macintosh in 1984 brought about a surge of interest in GUIs (graphical user interfaces), and it soon became apparent that they would eventually replace command line interfaces such as that used by MS-DOS. Although many MS-DOS application programs created their own primitive GUIs, this approach required duplication of programming effort, and the lack of a consistent GUI among programs made it more difficult for users to learn new programs.

It took Microsoft years until it was able to offer a fairly high quality GUI of its own, with the introduction of Windows 95 in 1995 (or arguably with Windows 3.0 in 1990). Microsoft had also begun work on a joint project with IBM called OS/2, which was originally a protected-mode version of MS-DOS with a GUI, but Microsoft soon abandoned the project in order to devote more resources to the development of Windows NT, a completely new operating system that was independent

Page 16: MS Dos

of MS-DOS.

Protected mode and real mode are the two modes of operation supported by the Intel x86 architecture. The former enables 32-bit memory addressing, thereby permitting use of the extended memory that cannot be easily accessed from real mode. This makes it possible to assign separate memory areas to the operating system kernel (i.e., the core of the operating system) and to each process (i.e., program or task), thus resulting in much more stable multitasking than can be attained with real mode.

Early versions of Microsoft Windows ran under MS-DOS, whereas later versions were launched under MS-DOS but were then extended by going into protected mode. Windows NT and its successors, Windows 2000 and XP, do not use MS-DOS; however, they contain an emulation layer on which MS-DOS programs can be operated, mainly for backward compatibility with legacy (i.e., old) software.

DOS Commands

MS-DOS has a relatively small number of commands, and an even smaller number of commonly used ones. Moreover, these commands are generally inflexible because, in contrast to Linux and other Unix-like operating systems, they are designed to accommodate few options or arguments (i.e., values that can be passed to the commands).

Some of the most common commands are as follows (corresponding commands on Unix-like operating systems are shown in parenthesis):

CD - changes the current directory (cd) COPY - copies a file (cp) DEL - deletes a file (rm) DIR - lists directory contents (ls) EDIT - starts an editor to create or edit plain text files (vi, vim, ed, joe) FORMAT - formats a disk to accept DOS files (mformat) HELP - displays information about a command (man, info) MKDIR - creates a new directory (mkdir)

Page 17: MS Dos

RD - removes a directory (rmdir) REN - renames a file (mv) TYPE - displays contents of a file on the screen (more, cat)

Comparison between MS-DOS and Linux

MS-DOS and Linux have much in common, primarily because MS-DOS copied many ideas from UNIX. However, there are some very fundamental differences, including:

(1) Linux is a full-fledged multiuser, multitasking operating system, whereas MS-DOS is a single-user, single-tasking operating system.

(2) MS-DOS does not have built-in security concepts such as file-ownership and permissions, which are fundamental to Linux.

(3) Linux has an inverted tree-like filesystem in which all directories and files branch from a single directory, i.e., the root directory, and its subdirectories. MS-DOS can have multiple, independent root directories, such as A:, C:, D:, etc.

(4) Linux uses forward slashes "/" to separate directories, whereas MS-DOS uses backslashes "\" for the same purpose.

(5) Linux filenames can contain up to 255 characters. MS-DOS filenames are limited to an eight characters plus a three-character extension and have restrictions on allowable characters. Also, filenames are case-sensitive in Linux, whereas they are not in MS-DOS.

(6) Linux has a vastly richer command set than does MS-DOS, with a much greater number of commands and individual commands having greater power, flexibility and ease of use. Commands are case-sensitive in Linux, but they are not in MS-DOS.

(7) Although Linux and MS-DOS both have pipes and input/output redirection, the MS-DOS pipes use a completely different -- and inferior -- implementation.

(8) MS-DOS is not sufficiently flexible and efficient to serve as a base

Page 18: MS Dos

for a high quality, general-purpose GUI (and thus it had to be abandoned by Microsoft). In sharp contrast, Linux is an excellent base for a GUI (and it is used as a base for the X Window System, which is extremely configurable and whose already excellent performance continues to improve).

MS-DOS Clones and Emulators

The great success of MS-DOS led to the development of several similar operating systems, including DR-DOS, FreeDOS, OpenDOS and PC-DOS. The most promising of these clones is FreeDOS, which is claimed to be the only free operating system that is fully compatible with MS-DOS.

Development of FreeDOS was begun in 1994 by Jim Hall, then a physics student at the University of Wisconsin-River Falls. His motivation was Microsoft's announcement that it would stop supporting MS-DOS because of its impending replacement by Windows 95.

Like MS-DOS, FreeDOS is lean and robust, and it can run on old hardware and in embedded systems. A major improvement as compared with MS-DOS is the addition of options to the commands. Moreover, FreeDOS is released under the GPL (although some software in the distribution is covered by other licenses), thus making it ideal for bundling a version of DOS into products without having to pay royalties.

Because Linux was originally developed on PCs and at a time when MS-DOS was the dominant PC operating system, a variety of tools were developed to help developers and users bridge the gap between the two operating systems. Among them is dosemu, a DOS emulator which is included with Red Hat and other distributions and on which it is possible to run DOS programs. Emulators are also available for running DOS on other Unix-like operating systems, even on non-x86 processors.

mtools is a collection of utilities that make it easy to access an MS-DOS floppy disk from Linux by merely inserting it into the floppy disk drive and without having to use any mounting commands (which can be tricky for inexperienced users). Included in mtools are more than 20 commands, all of which are identical to their MS-DOS counterparts

Page 19: MS Dos

except that the letter m is added to the start of each of their names and forward slashes are used instead of backslashes. For example, the MS-DOS command type a:\file1.txt to display the contents of a file named file1.txt that is located on a floppy disk would become mtype a:/file1.txt.

Outlook For the Future

Although it is widely believed that MS-DOS is an antiquated and useless operating system with few features and capabilities, this is far from correct. In fact, although not generally publicized, MS-DOS is still used today by numerous businesses and individuals around the world. A good analogy is the ancient programming language COBOL (introduced in 1960!), which is still in widespread use and, amazingly, accounts for roughly half of all the computer code still in existence. Both MS-DOS and COBOL have survived for so long because they are robust, relatively simple and continue to get the job done with a minimum of maintenance.

In many cases, it was not MS-DOS itself that was the limiting factor in system performance; rather, it was the hardware, including small memories, slow CPUs and slow video cards. The capabilities of MS-DOS have, in fact, continued to increase even after Microsoft Windows became widespread. This is a result of continuing advances in the hardware and the introduction of new or improved utilities and applications. DOS as a whole is also being strengthened by the improvements that are being made to the MS-DOS clones, particularly FreeDOS.

DOS will be around for many years into the future not only because of the continued existence of legacy applications but also because of the development of new applications. The main area of growth will most likely be simple embedded applications, for which DOS is eminently well suited because of its extremely small size, very reliable operation and zero cost (in the case of FreeDOS).

DOS is so tiny, in fact, that it can fit on a single floppy disk and still leave sufficient room on the same disk for an embedded program and data files. Although there are many alternatives for embedded systems,

Page 20: MS Dos

including embedded Linux and Microsoft Windows CE, DOS can be the best choice if space is severely limited. Moreover, in contrast to FreeDOS, Windows CE has the disadvantages of not being free and having various licensing issues with which to contend.

Operating System : /n./ [techspeak] (Often abbreviated `OS') The foundation software of a machine, of course; that which schedules tasks, allocates storage, and presents a default interface to the user between applications. The facilities an operating system provides and its general design philosophy exert an extremely strong influence on programming style and on the technical cultures that grow up around its host machines. - The Jargon Dictionary*

In 1980, IBM first approached Bill Gates and Microsoft, to discuss the state of home computers and Microsoft products. Gates gave IBM a few ideas on what would make a great home computer, among them to have Basic written into the ROM chip. Microsoft had already produced several versions of Basic for different computer system beginning with the Altair, so Gates was more than happy to write a version for IBM.

As for an operating system (OS) for the new computers, since Microsoft had never written an operating system before, Gates had suggested that IBM investigate an OS called CP/M (Control Program for Microcomputers), written by Gary Kildall of Digital Research. Kindall had his Ph.D. in computers and had written the most successful operating system of the time, selling over 600,000 copies of CP/M, his OS set the standard at that time.

IBM tried to contact Kildall for a meeting, executives met with Mrs. Kildall who refused to sign a non-disclosure agreement. IBM soon returned to Bill Gates and gave Microsoft the contract to

Page 21: MS Dos

write the new operating system, one that would eventually wipe Kildall's CP/M out of common use.

The "Microsoft Disk Operating System" or MS-DOS was based on QDOS, the "Quick and Dirty Operating System" written by Tim Paterson of Seattle Computer Products, for their prototype Intel 8086 based computer.

QDOS was based on Gary Kildall's CP/M, Paterson had bought a CP/M manual and used it as the basis to write his operating system in six weeks, QDOS was different enough from CP/M to be considered legal.

Microsoft bought the rights to QDOS for $50,000, keeping the IBM deal a secret from Seattle Computer Products.

Gates then talked IBM into letting Microsoft retain the rights, to market MS DOS separate from the IBM PC project, Gates proceeded to make a fortune from the licensing of MS-DOS.

In 1981, Tim Paterson quit Seattle Computer Products and found employment at Microsoft.

"Life begins with a disk drive." - Tim Paterson

Learning MS-DOS Basics - A Tutorial

This tutorial gives you an opportunity to try basic MS-DOS commands. By following the procedures in this section, you will learn to:

o View the contents of a directory o Change from one directory to another

o Create and delete directories

o Change from one drive to another

Page 22: MS Dos

o Copy files

o Rename files

o Delete files

o Format a floppy disk

The Command Prompt

When you first turn on your computer, you will see some cryptic information flash by. MS-DOS displays this information to let you know how it is configuring your computer. You can ignore it for now. When the information stops scrolling past, you'll see the following:

C:\>

This is called the command prompt or DOS prompt. The flashing underscore next to the command prompt is called the cursor. The cursor shows where the command you type will appear.

If your command prompt looks like the sample command prompt above, skip to the following section, "Typing a Command."

If your command prompt does not look like the example, type the following at the command prompt, and then press ENTER:

cd \

Note that the slash leans backward, not forward. You will learn more about the cd command later in the tutorial. If your command prompt still doesn't look like the example, type the following at the command prompt, and then press ENTER:

prompt $p$g

Your command prompt should now look like the example.

Typing a Command

This section explains how to type a command at the command prompt and demonstrates the "Bad command or file name" message.

Page 23: MS Dos

To type a command at the command prompt

1.Type the following at the command prompt (you can type the command in either uppercase or lowercase letters):

nul

If you make a typing mistake, press the BACKSPACE key to erase the mistake, and then try again.

2. Press ENTER.

You must press ENTER after every command you type.

The following message appears:

Bad command or file name

The "Bad command or file name" message appears when you type something that MS-DOS does not recognize. Because nul is not a valid MS-DOS command, MS-DOS displays the "Bad command or file name" message.

3. Now, type the following command at the command prompt:

ver

The following message appears on your screen:

MS-DOS version 6.22

The ver command displays the version number of MS-DOS.

Continue to the next section, where you will use the dir command to view the contents of a directory.

Viewing the Contents of a Directory

In this section, you will view the contents of a directory by using the dir command. The dir command stands for "directory."

To view the contents of a directory

Page 24: MS Dos

1. Type the following at the command prompt:

dir

A list similar to the following appears:

Volume in drive C is MS-DOS_6.22 Volume Serial Number is lE49-15E2 Directory of C:\

WINDOWS <DIR> 09-08-92 10:27p TEMP <DIR> 05-15-92 12:09p CONFIG SYS 278 09-23-92 10:50a COMMAND COM 53014 09-18-92 6:00a WINA20 386 9349 11-11-91 5:00a DOS <DIR> 09-02-92 4:23p AUTOEXEC BAT 290 09-23-92 10:54a

7 file(s) 62931 bytes 8732672 bytes free

This is called a directory list. A directory list is a list of all the files and subdirectories that a directory contains. In this case, you see all the files and directories in the main or root directory of your drive. All the files and directories on your drive are stored in the root directory.

Changing Directories

Look at the list on your screen. All the names that have <DIR> beside them are directories. You can see a list of the files in another directory by changing to that directory, and then using the dir command again. In this case, you will change to the DOS directory.

Before you begin this section, make sure you have a directory named DOS by carrying out the following procedure.

o To make sure you have a directory named DOS

Page 25: MS Dos

1. Look through the directory list on your screen for a line that looks similar to the following:

DOS <DIR> 09-02-92 4:23p

2. If you see a line like this, you have a directory named DOS. Skip to the next procedure, "To change from the root directory to the DOS directory."

If you do not see a line in the directory list indicating that you have a directory named DOS, type the following at the command prompt:

dir /s memmaker.exe

You will see a message that includes a line such as the following:

Directory of C:\DIRNAME

If the name that appears in place of DIRNAME is DOS, you have a DOS directory. Skip to the next procedure.

If the name that appears in place of DIRNAME is not DOS, substitute the name that appears for DOS throughout this tutorial. For example, if the name that appears in place of DIRNAME is MSDOS, type msdos whenever you are instructed to type dos.

o To change from the root directory to the DOS directory

To change directories, you will use the cd command. The cd command stands for "change directory."

1. Type the following at the command prompt:

cd dos

The command prompt changes. It should now look like the following:

C:\DOS>

Page 26: MS Dos

The command prompt shows which directory you are in. In this case, you know you successfully changed to the DOS directory because the command prompt displays the directory's name. Now the current directory is DOS.

Next, you will use the dir command to view a list of the files in the DOS directory.

o To view a list of the files in the DOS directory

1. Type the following at the command prompt:

dir

A list of the files in the DOS directory appears, but scrolls by too quickly to read. You can modify the dir command so that it displays only one screen of information at a time.

o To view the contents of a directory one screen at a time

1. Type the following at the command prompt:

dir /p

One screen of information appears. At the bottom of the screen, you will see the following message:

Press any key to continue . . .

2. To view the next screen of information, press any key on your keyboard. Repeat this step until the command prompt appears at the bottom of your screen.

When you typed the dir command this time, you included the /p switch after the command. A switch modifies the way MS-DOS carries out a command. Generally, a switch consists of a forward slash (/) that is followed by one or more letters or numbers. When you used the /p switch with the dir command, you specified that MS-DOS should pause after it displays each screen of directory list information. The p actually stands for "page"

Page 27: MS Dos

Another helpful switch you can use with the dir command is the /w switch. The /w switch indicates that MS-DOS should show a wide version of the directory list.

o To view the contents of a directory in wide format

1.Type the following at the command prompt:

dir /w

The directory list appears, with the filenames listed in wide format. Note that only filenames are listed. No information about the files' size or date and time of creation appears.

2. If the directory contains more files than will fit on one screen, you can combine the /p and /w switches as follows:

dir /w /p

Changing Back to the Root Directory

Next, you will change from the DOS directory to the root directory. The root directory is the directory you were in before you changed to the DOS directory. Before you begin this section, make sure your command prompt looks like the following:

C:\DOS>

o To change to the root directory

1. Type the following at the command prompt:

cd \

Note that the slash you type in this command is a backslash (\), not a forward slash (/).

No matter which directory you are in, this command always returns you to the root directory of a drive. The root directory does not have a name. It is simply referred to by a backslash (\).

Page 28: MS Dos

The command prompt should now look like the following:

C:\>

When your command prompt appears similar to this---that is, when it does not contain the name of a directory---you are in the root directory.

Creating a Directory

In this section, you will create two directories. Creating a directory is helpful if you want to organize related files into groups to make them easy to find. Before you begin this section, make sure the command prompt looks like the following:

C:\>

To create a directory, you will use the md command. The md command stands for "make directory."

o To create and change to a directory named FRUIT

1. Type the following at the command prompt:

md fruit

You have now created a directory named FRUIT. You won't see the new FRUIT directory until you carry out the dir command in the next step.

2. To confirm that you successfully created the FRUIT directory, type the following at the command prompt:

dir

or

dir /p

Look through the directory list. A new entry somewhere in the list should look similar to the following:

Page 29: MS Dos

FRUIT <DIR> 09-25-93 12:09p

3. To change to the new FRUIT directory, type the following at the command prompt:

cd fruit

The command prompt should now look like the following:

C:\FRUIT>

You will now create a directory within the FRUIT directory, named GRAPES.

o To create and work with a directory named GRAPES

1.Type the following at the command prompt:

md grapes

You will not see the new GRAPES directory until you carry out the dir command in the next step.

2.To confirm that you successfully created the GRAPES directory, type the following at the command prompt:

dir

A list similar to the following appears:

Volume in drive C is MS-DOS-6 Volume Serial Number is lE49-15E2 Directory of C:\FRUIT

. <DIR> 09-25-93 12:08p

.. <DIR> 09-25-93 12:08p GRAPES <DIR> 09-25-93 12:10p 3 file(s) 0 bytes 11534336 bytes free

Note that there are three entries in the FRUIT directory. One is the GRAPES directory that you just created. There are two other

Page 30: MS Dos

entries---one looks like a single period (.) and the other looks like a double period (..). These directory entries are important to MS-DOS, but you can ignore them. They appear in every directory and contain information relation to the directory structure.

The GRAPES directory is a subdirectory of the FRUIT directory. A subdirectory is a directory within another directory. Subdirectories are useful if you want to further subdivide information.

3.To change to the GRAPES directory, type the following at the command prompt:

cd grapes

The command prompt should now look like the following:

C:\FRUIT\GRAPES>

4. To switch back to the FRUIT directory, type the following:

cd ..

The command prompt should now look like the following:

C:\FRUIT>

When the cd command is followed by two periods (..), MS-DOS moves up one level in the directory structure. In this case, you moved up one level from the GRAPES directory to the FRUIT directory.

Deleting a Directory

If you no longer use a particular directory, you may want to delete it to simplify your directory structure. Deleting a directory is also useful if you type the wrong name when you are creating a directory and you want to delete the incorrect directory before creating a new one.

Page 31: MS Dos

In this section, you will delete the GRAPES directory. Before you begin this section, make sure the command prompt looks like the following:

C:\FRUIT>

To delete a directory, use the rd command. The rd command stands for "remove directory."

o To delete the GRAPES directory

1.Type the following at the command prompt:

rd grapes

2. To confirm that you successfully deleted the GRAPES directory, type the following at the command prompt:

dir

The GRAPES directory should no longer appear in the directory list.

Note You cannot delete a directory if you are in it. Before you can delete a directory, you must make the directory that is one level higher the current directory. To do this, type cd.. at the command prompt.

Changing Drives

This section describes how to change drives. Changing drives is useful if you want to work with files that are on a different drive.

So far, you have been working with drive C. You have other drives you can use to store information. For example, drive A is your first floppy disk drive. The files and directories on drive A are located on the floppy disk in the drive. (You might also have a drive B, which contains the files and directories stored on the floppy disk in that drive.)

Page 32: MS Dos

Before you begin this section, make sure your command prompt looks like the following:

C:\FRUIT>

o To change to and view files on a different drive

1. Insert a 3.5" floppy disk in drive A label- side up. Make sure the disk clicks into the drive.

1.Type the following at the command prompt:

a:

Note that the command prompt changed to the following:

A:\>

This message may appear:

Not ready reading drive A

Abort, Retry, Fail?

If you see this message, the disk may not be inserted properly. Place the disk label-side up in the disk drive, and make sure the disk clicks into the disk drive. Then, type r for Retry. If this message appears again, press F for Fail, and then type b: at the command prompt. If you no longer see this message, type b: instead of a: throughout the rest of the tutorial.

There must be a floppy disk in the drive that you want to change to.

2.To view a list of the files on the floppy disk in drive A, type the following at the command prompt:

dir

A list of the files on the disk appears.

3. Change back to drive C by typing the following at the command prompt:

Page 33: MS Dos

c:

Your command prompt should return to the following:

C:\FRUIT>

When you type a drive letter followed by a colon, you change to that drive. The drive letter that appears in the command prompt shows which drive is the current drive. Unless you specify otherwise, any commands you type are carried out on the current drive and in the current directory.

So far, all the commands you typed were carried out on the current drive and in the current directory. You can also carry out a command on a drive that isn't current. For example, you can view the files on a disk in drive A without switching to drive A by following this procedure.

o To view files on drive A when drive C is current

1. Type the following at the command prompt:

dir a:

A list of the files on the floppy disk in drive A appears, even though your command prompt indicates that drive C is current.

By specifying a: after the dir command, you are giving MS-DOS additional information. You are indicating that you want the dir command to show the list of files and directories on drive A instead of drive C. The a: you typed after the dir command is called a parameter. A parameter specifies what a command should act on. In the previous example, the parameter you used indicated which directory list you want to view.

The following procedure presents another example of using a parameter.

o To view the contents of the DOS directory on drive C

1. Type the following at the command prompt:

Page 34: MS Dos

dir c:\dos

A list of the files in the DOS directory on drive C should scroll past on your screen.

The c:\dos parameter specifies that you want MS-DOS to display the contents of the DOS directory on drive C, even though your command prompt indicates that the FRUIT directory is current.

Copying Fies

This section describes how to copy a single file and a group of files. Copying files creates a duplicate of the original file and does not remove the original file. This is useful for many reasons. For example, if you want to work on a document at home, you can copy it from your computer at work to a floppy disk and then take the floppy disk home.

To copy a file, you will use the copy command. When you use the copy command, you must include two parameters. The first is the location and name of the file you want to copy, or the source. The second is the location to which you want to copy the file, or the destination. You separate the source and destination with a space. The copy command follows this pattern:

copy source destination

Copying a Single File

In this section, you will copy the EDIT.HLP and EDIT.COM files from the DOS directory to the FRUIT directory. You will specify the source and destination of these files in two different ways. The difference between the two methods is explained at the end of this section.

Before you begin this section, make sure the command prompt looks like the following:

C:\FRUIT>

Page 35: MS Dos

To copy the EDIT.HLP and EDIT.COM files from the DOS directory to the FRUIT directory

1.Return to the root directory by typing the following at the command prompt:

cd\

The command prompt should now look like the following:

C:\>

Change to the DOS directory by typing the following at the command prompt:

cd dos

The command prompt should now look like the following:

C:\DOS>

2.Make sure the file you are going to copy, EDIT.COM, is located in the DOS directory by using the dir command followed by a filename. To see if the EDIT.COM file is in the DOS directory, type the following at the command prompt:

dir edit.com

A list similar to the following appears:

Volume in drive C is MS-DOS-6

Volume Serial Number is lE49-15E2

Directory of C:\DOS

EDIT Com 413 03-25-93 5:00a

1 file(s) 413 bytes 11999232 bytes free

This shows that the EDIT.COM file is located in the DOS directory. You just specified another parameter with the dir command, one that

Page 36: MS Dos

directs MS-DOS to list only the files that match the filename you specified in the command. Since only one file in the DOS directory can be named EDIT.COM, the directory list includes only that file.

3.To copy the EDIT.COM file from the DOS directory to the FRUIT directory, type the following at the command prompt:

copy c:\dos\edit.com c:\fruit

The following message appears:

1 file(s) copied

The command you just typed copied the file from its source to its destination. By specifying C:\DOS\EDIT.COM as the source, you indicated that MS-DOS would find the source file EDIT.COM on drive C in the DOS directory. By specifying C:\FRUIT as the destination, you indicated that MS-DOS should place the copy of EDIT.COM on drive C in the FRUIT directory.

4.Next, you will copy the EDIT.HLP file to the FRUIT directory. To confirm that the EDIT.HLP file is in the DOS directory, type the following at the command prompt:

dir edit.hlp

5.To copy the EDIT.HLP file from the DOS directory to the FRUIT directory, type the following at the command prompt:

copy edit.hlp \fruit

The following message appears:

1 file(s) copied

If you forgot to leave a space before typing fruit, the following message will appear:

Access denied

Page 37: MS Dos

If this message appears, type the command again and leave a space before fruit.

6. To confirm that you copied the files successfully, view the contents of the FRUIT directory by typing the following at the command prompt:

dir \fruit

You should see the two files listed in the FRUIT directory.

Note that you specified the source and destination in the two copy commands differently. In the command you typed in step 4, you specified the source file as C:\DOS\EDIT.COM and the destination directory as C:\FRUIT. Both C:\DOS\EDIT.COM and C:\FRUIT are called full paths because you specified the drive and directory where these files are located. Specifying the full path is the safest way to copy files, because you provide all the information about which file you want to copy and which directory you want to copy it to.

In the copy command you typed in step 6, you specified EDIT.HLP for the source file and FRUIT for the destination directory. These are relative paths. A relative path specifies only the difference between the current drive and directory and the destination of the files you are copying. The following illustration shows how the DOS directory and the FRUIT directory are related:

When you typed the second copy command, you specified the source filename as EDIT.HLP instead of C:\DOS\EDIT.HLP. This is because drive C is the current drive, so you did not have to repeat C: in the path. The DOS directory is the current directory, so you did not have to repeat DOS in the path. You had to specify only the filename.

Page 38: MS Dos

 

For the destination directory, you specified the relative path as FRUIT instead of C:\FRUIT. Again, you did not need to specify drive C, because drive C is current. However, the FRUIT directory is not current. To access the FRUIT directory from the current directory, DOS, MS-DOS must first return to the root directory (), and then switch to the FRUIT directory, before copying the file to its new location. Therefore, you typed the path MS-DOS must take to switch between the current directory and the FRUIT directory, or \FRUIT.

Copying a Group of Files

In this section, you will use wildcards to copy a group of files from the DOS directory to the FRUIT directory. In a card game, a wildcard matches any card in the deck. In MS-DOS, the asterisk (*) wildcard matches any character in that position and all the other positions that follow it. If you want to copy a group of files with similar names, using wildcards is easier than copying each file individually.

In this section, you will first view a group of files by using wildcards, and then copy the files using wildcards. Before you begin this section, make sure your command prompt looks like the following:

C:\DOS>

To list all files ending with the extension TXT and copy them from the DOS directory to the FRUIT directory by using wildcards

1.View all the files in the DOS directory that end with the extension TXT by typing the following at the command prompt:

dir *.txt

Note that there is a space before the asterisk (*), but not after it.

This command directs MS-DOS to list all files and subdirectories in the current directory that end with the extension JXT. The asterisk matches the first character of the filename and all other characters that follow it, up to the period () that separates the name from the TXT extension. A list similar to the following appears:

Page 39: MS Dos

Volume in drive C is MS-DOS_6

Volume Serial Number is lE49-15E2 Directory of C:\DOS

NETWORKS TXT 8369 11-11-93 5:00a

OS2 TXT 4587 11-11-93 5:00a

README TXT 10858 11-11-93 5:00a

3 file(s) 23814 bytes

MS-DOS lists all the files that end with a TXT extension. The wildcard in your command specified that MS-DOS should ignore the very different beginnings of the files and focus only on the extensions.

Next, you will copy all the files with a TXT extension to the FRUIT directory by using wildcards.

2.To copy the files with a TXT extension to the FRUIT directory, type the following at the command prompt:

copy *.txt \fruit

This command copies all the files that have the TXT extension from the current directory (DOS) to the FRUIT directory.

3.To confirm that you copied the files successfully, change to the FRUIT directory by typing the following at the command prompt:

cd \fruit

4. To view a list of all the files in the FRUIT directory, type the following at the command prompt:

dir

A list similar to the following appears:

Volume in drive C is MS-DOS_6

Page 40: MS Dos

Volume Serial Number is lE49-15E2 Directory of C:\FRUIT

. <DIR> 09-27-93 11:11p

.. <DIR> 09-27-93 11:11p

EDIT COM 413 11-11-93 5:00a

EDIT HLP 17898 11-11-93 5:00a

NETWORKS TXT 8369 11-11-93 5:00a

OS2 TXT 4587 11-11-93 5:00a

README TXT 10858 11-11-93 5:00a

7 file(s) 42125 bytes

40652800 bytes free

The EDIT.COM and EDIT.HLP files are the files you copied by following the procedure in the previous section. The files with TXT extensions are the ones you just copied by using wildcards.

Renaming Files

This section explains how to rename files. You may want to rename a file if the information in it changes or if you decide you prefer another name.

To rename a file, you will use the ren command. The ren command stands for "rename." When you use the ren command, you must include two parameters.

The first is the file you want to rename, and the second is the new name for the file. You separate the two names with a space. The ren command follows this pattern:

ren oldname newname

Renaming a File

Page 41: MS Dos

In this section, you will rename the README.TXT file.

Before you begin this section, make sure your command prompt looks like the following:

C:\FRUIT>

1.To rename the README.TXT file to PEACH.TXT, type the following at the command prompt:

ren readme.txt peach.txt

2. To confirm that you renamed the file successfully, type the following at the command prompt:

dir

The name PEACH.TXT should appear instead of the name README.TXT. It is the same file, but now has a different name.

Renaming a Group of Files

You also can use wildcards to rename a group of files. If you want to rename a group of files that have similar names, using wildcards is easier than renaming the files individually. In this section, you will rename a group of files by using wildcards.

Before beginning this section, make sure your command prompt looks like the following:

C:\FRUIT>

To rename the files whose names begin with EDIT by using wildcards

1.List the files in the FRUIT directory that begin with EDIT by typing the following at the command prompt:

dir edit.*

A list of the files in the FRUIT directory that begin with EDIT appears.

Page 42: MS Dos

2.To rename the files that begin with EDIT to the new name PEAR, type the following command:

ren edit.* pear.*

This command specifies that all the files that begin with EDIT should be renamed PEAR, but should keep their original extensions.

3. To confirm that you renamed the files successfully, type the following at the command prompt:

dir pear.*

When the files were renamed, their extensions remained the same. For example, EDIT.COM became PEAR.COM, and EDIT.HLP became PEAR.HLP.

You can also rename extensions this way. For example, suppose you want to indicate that a group of files ending with a TXT extension are old. You can use wildcards to rename the files so they have the extension OLD.

To rename all the files in the current directory whose names end with the extension.TXT

1.View a list of all the files in the current directory with the extension TXT by typing the following command:

dir *.txt

2.To rename all files in the current directory that end with the extension TXT to end with the extension OLD, type the following command:

ren *.txt *.old

3. To confirm that you renamed the files successfully, type the following at the command prompt:

dir

Page 43: MS Dos

The files that had the extension TXT now have the extension OLD.

Deleting Files

This section explains how to delete, or remove, a file that you no longer want on your disk. If you don’t have very much disk space, deleting files you no longer use is essential.

To delete a file, you will use the del command. The del command stands for "delete."

Deleting a File

In this section, you will delete two files using the del command.

Before you begin, make sure your command prompt looks like the following:

C:\FRUIT>

To delete the PEARCOM and PEAR.HLP files

1.Delete the PEAR.COM file by typing the following at the command prompt:

del pear.com

2.Delete the PEAR.HLP file by typing the following at the command prompt:

del pear.hlp

3. To confirm that you deleted the files successfully, type the following at the command prompt:

dir

The PEAR.COM and PEAR.HLP files should no longer appear in the list.

Deleting a Group of Files

Page 44: MS Dos

In this section, you will use wildcards to delete a group of files.

Before you begin this section, make sure your command prompt looks like the following:

C:\FRUIT>

To delete files in the current directory that end with the extension OLD by using wildcards

1.View all files that end with the extension OLD by typing the following at the command prompt:

dir *.old

A list of all the files that end with the extension OLD appears. Make sure that these are the files you want to delete. When you are deleting files by using wildcards, this step is very important. It will prevent you from deleting files accidentally.

2. Delete all files ending with OLD by typing the following at the command prompt:

del *.old

3. To confirm that all the files with the extension OLD have been deleted, type the following at the command prompt:

dir

The FRUIT directory should contain no files.

Now that the FRUIT directory is empty, you can delete it by using the rd (remove directory) command that you learned to use in "Deleting a Directory" earlier in this chapter.

To delete the FRUIT directory

1.Return to the root directory by typing the following at the command prompt:

cd \

Page 45: MS Dos

2.You can see the FRUIT directory in the directory list by typing the following at the command prompt:

dir or dir /p

3.Remove the FRUIT directory by typing the following at the command prompt:

rd fruit

4. To verify that the FRUIT directory has been removed, type the following at the command prompt:

dir or dir /p

The FRUIT directory should not appear in the directory list.

Formatting a Floppy Disk

When you purchase new floppy disks, you may be required to format them before you can use them. Practice formatting a floppy disk now.

Caution The data on the disk you format will be erased, so make sure you select a disk that does not contain information you may need later.

To format a floppy disk

1.Type the following at the command prompt:

format a:

This command specifies that you want to format the disk in drive A. When you press ENTER, the following message appears:

Insert new diskette for drive A:

and press ENTER when ready ...

2. Insert the disk you want to format in drive A label-side up. Then close the drive door or make sure the disk clicks into the drive. When you are ready, press ENTER. The following message appears:

Page 46: MS Dos

Checking existing disk format

Saving UNFORMAT information

As it formats the disk, MS-DOS displays the percentage of the disk that has been formatted. When the format is complete, the following message appears:

Volume label (11 characters, ENTER for none)?

3. A volume label is a name for your disk. You can give your disk any name you like, as long as it has 11 or fewer characters. For this exercise, type practice and then press ENTER. Information similar to the following appears:

1213952 bytes total disk space

1213952 bytes available on disk

512 bytes in each allocation unit.

2371 allocation units available on disk.

Volume Serial Number is lE49-15E2 Format another (Y/N)?

4. If you have another disk to format, press Y. If not, press N.

Summary

This concludes the MS-DOS tutorial. During this tutorial, you learned how to:

View the contents of a directory by using the dir command. Change directories by using the cd command.

Create directories by using the md command.

Delete directories by using the rd command. C

Change drives by specifying the drive letter followed by a colon.

Page 47: MS Dos

Copy files by using the copy command.

Rename files by using the ren command.

Delete files by using the del command.

Format a floppy disk by using the format command.

DOS (Disk Operating System)

In July 1980 IBM assigned Microsoft to develop a 16-bit operating system for the personal computer for the fee of 186,000 dollars. Although the company Digital Research of Gary Kildall allready had with CP/M 86 such a 16-bit version,but by circumstances no contract has been established with IBM. Microsoft did not have yet any operating system, Microsoft licensed CP/M from Digital Research in November 1977 for 50,000 dollars. Since Microsoft could not sell licenses, a corresponding agreement with the company Seattle Computer Products was reached for QDOS. QDOS is a 16-bit clone of CP/M and was finished by Tim Paterson in April 1980. At first Microsoft licensed QDOS for 25,000 dollars. After a licence agreement with IBM was signed, Bill Gates bought QDOS for 50,000 dollars in July 1981. How proved this was a very lucrative business. IBM delivered it on all IBM computers as PC DOS for the first time on the IBM 5150 PC, for all other ones the name MS-DOS was for OEM partner. MS DOS 1.0 consists of about 4,000 lines assembler code.

The command interpreter is integrated in the file command.com with the internal commands for MS-DOS. Together with the file io.sys for simple device routines like the access to the monitor, keyboard, fixed storage disks and interfaces as well as the

Page 48: MS Dos

booting code these form the base operating system. DOS works very hardware near.

MS-DOS was wide spread in 1982 when 50 companies licensed MS-DOS. Software and hardware manufacturers build on this binary standard at this time. In 1983, the success of the PC system was clear the desire for a graphical surface was rising. Microsoft corresponded to the trend and announced a graphical user interface named Windows in 1983. Many other systems lost her market relevance at this time. In 1984 the number of PC and MS-DOS resellers increased to over 200. IBM published the AT computer in August, this one should refine the market for personal computer with MS-DOS 3.0/3.1. MS-DOS is already spread worldwide on Intel x86 computers in 1985. The easy extendibility of the computer by numerous plug-in cards of third party manufacturers, relatively low acquisition costs and a strongly growing amount of applications was a reason for it.

1988 was MS-DOS established and had reached measured on the market share a monopoly in the DOS market. The number of the MS-DOS installations grew worldwide to about 60 million and surpassed all other systems with that amount. Almost every software company offered standard applications like word processing, calculation or also special solutions like measurement tools, CAD (Computer Aided Design) or image processing for MS-DOS. The PC manufacturers designed her systems compatible to MS-DOS except for few manufacturers.

MS-DOS 5.0 allows the use of the High Memory and Upper Memory Area for DOS itself, TSR programs and drivers. The most important new external commands in this version are DOSKEY, DOSSHELL, EDIT, EMM386 and LOADHIGH. UNDELETE can recover deleted files, UNFORMAT can undo the format of floppy disks. 2.88 mb floppy disk drives from IBM are now supported. The

Page 49: MS Dos

BASIC interpreter was improved in detail.

Update: With the release of Windows 95 up to Windows ME MS-DOS has only a minory roll. It is installed for compatibility reasons for MS-DOS programs and makes Windows 95 up to ME start able. DOS programs being executed in the DOS box or directly in MS DOS before Windows start. Today it finds application for boot disks or similar purposes.

Small reference of internal DOS commands

del, erase - delete files rd, rmdir - delete directories dir - show content of directories cd, chdir - change current directory cls - clear the screen md, mkdir - create a directory copy - copy of one or several files ren, rename - rename of files or directories type - shows the content of text files set - shows the DOS environment variables or defines a new one ver - shows the DOS version number vol - shows the name of the storage drive

Small reference of external DOS commands

attrib - shows the attributes of files or set one of those fdisk - partitioning or modify of the hard disk move - move of files mem - shows the occupancy of working memory tree - shows the directory structure format - format of storage drives

Page 50: MS Dos

Field of Application - booting system for storage media - File management - For single user systems only - Network client (NetBEUI, IPX/SPX, TCP/IP) - batch processing

Structure information - 16-bit operating system, (formerly 8-bit) - Single tasking - command interpreter for internal and external commands - external driver software imbedding for periphery devices possible

System environment - minimum: 512 kbytes RAM, 5 mbyte harddisk storage (depends on version for full installation) - FAT file system - executable with every x86 compatible CPU - low RAM and fixed storage disk needs

Screenshots

Page 52: MS Dos

Date Version

1981 Aug.

MS-DOS 1.0, formerly QDOS/86-DOS, can use at maximum 128 kbyte RAM, FAT established

1981 Juni MS-DOS 1.10,1982 Aug.

MS-DOS 1.25, support for double-density floppy disks

1983 March

MS-DOS 2.0, support for IBM 10 mbyte harddisk, directorys and DD 5.25" floppy disk drives with up to 360 kbyte

1983 Dec.MS-DOS 2.11, extended character sets

1984 Aug.

MS-DOS 3.0, support for high density floppy disk drives with 1.2 mbyte and harddisk devices with 32 mbyte capacity

1984MS-DOS 3.1, first tiem with network support

1985 MS-DOS 3.21985 MS-DOS 3.21

1987 April

MS-DOS 3.3, extended for IBM's PS/2 computer, supports now bigger 3.5" harddisk drives and floppy disk drives, multiple partitions, character sets for different languages

1988 JuliMS-DOS 4.0, XMS support, partitions with up to 2 gbyte, graphical shell, bug fixes

1988 Nov.

MS-DOS 4.01, supports multiple partitions bigger than 32 mbyte, bug fixes

1991 June MS-DOS 5.0, Major Release

1992MS-DOS 5.0a, bug fixes for Undelete and Chkdsk

1993 Aug.

MS-DOS 6.0, Competition to Novell's DR-DOS 6, DoubleSpace, Anti-Virus program, Defrag, Move command, improved MSBACKUP and several boot configurations, memory optimizer MEMMAKER, DOS Shell is delivered separately on floppy disks

1993 MS-DOS 6.2, DoubleSpace becomes

Page 53: MS Dos

Nov.incompatible to the previous version, Scandisk, improved of DISKCOPY and SmartDrive

1994 March

MS-DOS 6.21, because of law conflict with Stac Electronics DoubleSpace is removed from MS DOS

1994 May

MS-DOS 6.22, Microsoft licences double disk of VertiSoft Systems and designates it in DriveSpace, last official standalone version

1995 Aug.

MS-DOS 7.0, MS-DOS component for Windows 95, LFS support through VFAT, more DOS programs are delivered on the Setup CD-ROM in the "oldmsdos" directory

1996 Aug.

MS-DOS 7.10, MS-DOS component for Windows 95 B and higher, supports the first time FAT 32 harddisks

2000MS-DOS 8.0, MS-DOS component for Windows ME, last MS-DOS version