Vous êtes sur la page 1sur 63

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

MS-DOS
USING MS-DOS.......................................................................................................................2 THE MS-DOS COMMAND LINE PROCESSOR ...............................................................3
USER INTERFACE........................................................................................................................................3

COMMAND STRUCTURE..................................................................................................4
SYNTAX..........................................................................................................................................................5

HOW TO LEARN DOS COMMANDS.................................................................................6 COMMANDS AVAILABLE IN WINDOWS 95/98/ME/2000............................................7 DOS AND WINDOWS TUTORIALS .................................................................................8
MS-DOS 6.22 COMMANDS........................................................................................................................10 WINDOWS 95/98/ME EXTERNAL COMMANDS .....................................................................................11 WINDOWS 95/98/ME INTERNAL COMMANDS.......................................................................................11 WINDOWS 2000 COMMAND SET..............................................................................................................12

WINDOWS XP COMMAND SET ......................................................................................14 INSTALLING MS-DOS 6.22................................................................................................16 DISK BASED OPERATING SYSTEMS..............................................................................................22
The Configuration Files...............................................................................................................................23 BATCH FILES..............................................................................................................................................25

THE MS-DOS BOOT SEQUENCE.....................................................................................28 DOS MEMORY LIMITATIONS.........................................................................................31


PRODUCING AN EMS BOOT DISK ..........................................................................................................33

INSTALLING A CD-ROM IN AN MS-DOS SYSTEM.....................................................38 MS-DOS 6.22 COMMAND LIST ........................................................................................41

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

USING MS-DOS
Although Windows 95/98/NT/ME/2000and XP now dominate the operating system market, there are tens of thousands of PCs using MS-DOS as the underlying operating system. Some knowledge of MS-DOS is therefore an essential requirement of every PC service technician. It is also useful for troubleshooting, for example, if Windows 95/98/ME fails to boot properly for some reason, you usually get the chance to boot to the command prompt, or into MS-DOS mode. In this mode, Windows Setup only loads a few basic files thus stopping short of loading the application or driver that caused the crash. The technician can then enter various commands to check the system or run DOS based diagnostics software etc. When installing or reinstalling Windows you can boot from the Windows Startup disk and enter commands to partition and format the hard disk or edit config.sys and command com. You can also use the command prompt from the Windows desktop for fast file manipulation, for example, to make a copy of a floppy disk in the A: drive you simply enter Diskcopy a: b: To do this in Windows 95/98/ME/2000/XP: Press Ctrl/ESC then 'R' (or Click on Start, then Run), for the command prompt. In the command prompt box, enter Diskcopy a: a You will now be prompted to insert the source disk in drive A: and after copying the disk to memory, you will be prompted to insert the target disk in drive A:. You can also quickly move, copy, rename or erase files. Unfortunately in command mode you can only work with short file names up to eight characters in length. Long file names are shown in truncated form. If you intend to take certain lead body exams in PC support you may well find some questions on MS-DOS, so it really is worth making the effort to learn the more useful commands and gain some familiarity with the syntax. 1 Some experimenters may be interested in setting up an MS-DOS based system on an old 486 or legacy Pentium system purposely to learn MS-DOS. Using an old system like this will allow you to become more adventurous, eliminating the fear of doing something catastrophic to the OS or stored files on your best computer. Later in this section we will take you through a typical MS-DOS installation.

The syntax of MS-DOS is covered in this section..

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

THE MS-DOS COMMAND LINE PROCESSOR


USER INTERFACE
The user interface is what you see and do when you interact with the computer. In general you see information and prompts on an output screen and interact by pressing keys, clicking buttons, moving a cursor or selecting from menus etc. There are three main categories of user interface as follows Command driven interface Graphical User Interface (GUI) Menu driven Interface

Windows is a GUI interface and this is the most popular interface for todays applications as it affords a simple, effective and friendly WIMP 2environment. Menu driven interfaces are often used for specialist applications where the user can only interact by making selections by clicking specific keys or interacting with a touch screen. In a Command driven interface, the user interacts by typing commands and data at the keyboard. MS-DOS is inherently a command driven interface but applications running in that environment can provide a GUI interface. Indeed Windows 3.* is such an application. There are a few advantages of a command driven interface: Uses less system resource memory, processor time Minimum hardware requirement elaborate graphics system not necessary Allows direct user interaction with the OS

However these advantages are modest compared to those offered by GUI interfaces. The first thing most people find when first confronted with MS-DOS after using a GUI system, is how difficult it is to carry out basic tasks that are taken for granted in Windows. Every action requires a command and often a set of parameters that the user has to remember. Another disadvantage is that you often cannot immediately see the results of your actions. In Windows all you have to remember is where things are and how to use the mouse. For example to move a file named Sue from the TEMP directory (folder) to a directory called MYFILES in Windows, you just go into Windows Explorer and left click on the file Sue in TEMP and while depressing the left mouse button, drag it to the MYFILES folder, then release the button and hey presto! To do the same thing in MS-DOS you enter the following command at the DOS prompt: MOVE c:\temp\sue c:\myfiles It is an efficient system just one concise statement is all thats required but until you know the commands verbatim, it can be very frustrating to use.
2

WIMP stands for Windows, Icons, Menus and Pointing devices. KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

COMMAND STRUCTURE
MS-DOS commands are entered into the command line. When in DOS mode, this is identified by the DOS prompt usually displayed thus:

c:\ >
DOS commands can have up to three parts the Command Name, Parameters and Switches. Command Name This is the part of the command you type first. Its invokes the action you want to carry out and its name gives you a clue to its purpose. Some commands have just a command name. Such as VER which informs you of the version of DOS you are working on, or CLS which clears the DOS screen area. Parameters Some commands need an additional parameter or set of parameters to define what you want the command to act upon. For example it could be a file name or a directory.

Here the parameter to be deleted is the file myfiles.doc: Del myfiles.doc


Command Parameter

In the next example there are two parameters, the source file to be copied i.e. myfiles.doc and the name you want it to be copied to i.e. yourfiles.doc . Copy myfiles.doc yourfiles.doc Switches A switch is usually a single alphanumeric character preceded by a forward slash /. These allow you to modify the way a command is processed. The classic example is the Directory command Dir . This allows you to view the contents of a directory on screen. If you enter dir to view a long directory, the contents will scroll through on the screen very quickly and you will only see the contents at the end of the directory. However using the /p switch allows you to view a page (screen) at a time. Using another switch with the same command this time /w , allows you view the directory in wide format thereby fitting more of the directory on the screen. Dir /p Dir /w

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

SYNTAX
You must enter commands, parameters and switches accurately to get the correct result from the command processor.

Command Syntax and punctuation


Brackets In the command list at the end of this appendix, any items enclosed in square brackets are optional, i.e. the command will work in its basic form without entering anything in the brackets. Command Name The DOS command name is always entered first before any parameters or switches but it is not case sensitive. You can use upper or lower case or even combinations of both. The command name must be followed by a space. Drive Designation Several disk access commands require a drive designator shown as the option "drive:" in the following command list. The colon : following the drive designator must also be used, it cannot be omitted. Note: If the parameters you are using are in the current directory you can omit the drive designator and colon. Filename A filename is the name of a file stored on disk. In MS-DOS, unlike Windows 98/ME/2000, a filename can only be eight or less characters long followed by an optional three character extension. The extension can be used after the filename to identify its type, e.g. exe means an executable file. The extension must follow a period . and must be three characters or less. Pathname You use pathnames to indicate the route the command processor must follow from the current directory to reach the required parameters. The MS-DOS directory structure is really the same as the folder structure in Windows, i.e. directories and folders are synonymous. C:\ DOS Hols 1999 2000 Myphotos Business Home Current Archived Mydocs Myprogs Utils (sub directories) (root directory)

Office Home

Example 1: The path to the subdirectory 'Mydocs' from the root directory is simply c:\mydocs. Example 2: The path to the subdirectory 'Current' from the root directory is c:\Myphotos\Business\Current. 5
KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

HOW TO LEARN DOS COMMANDS

Figure 1 If you have access to an old MS-DOS system or you have previously upgraded from Windows 3.1 to Windows 95/98, one way to learn the old MS-DOS 6.22 commands is to use the MS-DOS Help facility. To see the function of each command, simply select it using the mouse or arrow keys then either click the left mouse button or press enter. Note: If you are running later versions of Windows 95,98 or ME, you may not have the old MS-DOS help file installed on your hard drive. However these files are on your Windows 95/98.ME Installation CD. Find the OldMS-DOS directory on your CD. It is usually a subdirectory of the Tools directory on a Windows 98/ME CD or a subdirectory of the Other directory on a Windows 95 CD. NOTE: There is a full list of MS-DOS 6.22 commands at the end of this Appendix.

TO RUN OLD MS-DOS HELP FROM YOUR WINDOWS 95/98/ME CD:


Step1: Step2: Go to the MS-DOS command prompt (i.e. click Start, highlight Programs, then click MS-DOS Prompt.) (In windows ME this is in the accessories folder) At the command line, enter CD d:\tools\oldms-dos where d is the CD-ROM drive letter containing your Windows 95/98/ME Installation CD. Then type help to run the MS-DOS Help program.

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

COMMANDS AVAILABLE IN WINDOWS 95/98/ME/2000


Apart from these original dos help files accessible from the oldmsdos directory on the CDROM drive, Windows 95/98/ME/2000 has a subset of MS-DOS commands.3 These run in the Windows environment from the Command Line. To get help on these commands do the following: In Windows 95/98/ME : Go to the MS-DOS command prompt (i.e. click Start, highlight Programs, then click MS-DOS Prompt.) (In Windows ME this is in the assessories folder) In the MS-DOS Prompt window, type the command name you want help with and then enter a space followed by /?. For example, to find help on the deltree command simply type deltree /? then press the enter key.

Figure 2 In Windows 2000 : Go to the command prompt (i.e. click Start, highlight Programs/Assessories then click on Command Prompt.) In the Command Prompt window, type the command name you want help on and then enter a space followed by /?.

These are listed in table 1, 2 and 3 of this appendix. KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

DOS AND WINDOWS TUTORIALS


An alternative way to learn MS-DOS safely on your Windows based system is to use the DOS tutorials and quizzes. There are several shareware and freeware programs available on the Internet. Some of the more notable ones are: Tutordos Dos5Quiz. Advanced Dos Quiz (ADQ) Dos6Quiz Htutor Note 1: Some of the programs are shareware. They are not free, they are provided for you to try out. If you find any of them useful please register them with their respective authors. Registration information is provided with each program except Tutordos and DOS*QUIZ whose authors kindly allow private individuals to use the software at home free of charge. To run these programs you need a working PC system with MS-DOS or any version of Windows installed. It is probably best to copy/extract the files to a new folder on the hard disk or to a floppy disk. Once you have done this, go to the MS-DOS command prompt to run the programs. If you are running Windows 95 or 98, it is best to reboot the system in MS-DOS mode by clicking on Start, Shut Down and clicking the Restart in MS-DOS mode, option and then clicking OK.

TUTORDOS
Tutordos is an excellent little program that helps the absolute DOS beginner to quickly learn to use some of the common DOS commands. It is also great for anyone needing to brush up on MS-DOS. Copy the program to a disk in the a: drive, as directed in the readme file and use it! Running in MS-DOS or in an MS-DOS window, go into the tutordos directory by typing the following command .

CD A:\TUTORDOS
now run the program by typing;

then press the enter key.

TUTORDOS DOS QUIZ PROGRAMS

then press the enter key.

The DOS QUIZ programs are a great way to test your knowledge and use of MS-DOS once you have gained some proficiency in the use of MS-DOS commands. Before you try each quiz program, please read the accompanying .doc and .lst files, they tell you more about the software and how you can register your copy. To run the DOS6QUIZ program that you have previously copied to a directory of the same name, repeat the above commands substituting the name dos6quiz for tutordos.
KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

HTUTOR
To use this program, extract it to a disk in the A drive using Winzip or Pkunzip. Then type;

HTUTOR

then press the enter key.

For information on MS-DOS commands click on the Advanced Topics button or enter A until Advanced Topics is highlighted, then press Enter. You can change the colours used in the display by clicking Configure at the top of the display window or Alt/C. Note: Because these tutorial programs are quite long in the tooth, no guarantee can be given that they will still be available when this book is published.

NOTE: Some common but less intuitive MS-DOS commands


Most MS-DOS commands are reasonably intuitive, others are anything but! For example, you cannot rename a directory using the rename command Rename (ren) it only works on file names. You have to use the Move command. Eg. executing the following MS-DOS statement, will rename the current directory mydocs to myfiles: move mydocs myfiles Another common requirement that often causes confusion in MS-DOS is file and directory deletion. To delete files you use the Delete (del) or Erase command. This command however will not allow you to delete directories. To delete a directory you use the Rmdir (rd) command but this will only work if the directory is empty, i.e. all files and subdirectories must first be removed. This is probably done in the interest of safety, i.e. to make it more difficult to delete directories by accident. If you want to delete whole directories and subdirectories even when files are still present the Deltree command does the trick. Like the Move command, this was only introduced in MS-DOS 6.0 and later versions.

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

MS-DOS 6.22 COMMANDS


MS-DOS 6.22 was the last version of MS-DOS to be launched as a separate OS. When Windows 95 was launched the underlying DOS element was known as MS-DOS 7. Table 1 below is an abbreviated list of the internal and external DOS 6.22 commands. For a more detailed list see the table at the end of this appendix. append assign attrib backup break chcp chdir (cd) chkdsk cls command comp copy ctty date debug del (erase) deltree dir diskcomp diskcopy doskey dosshell edit emm386 exe2bin exit expand fastopen fc fdisk find for format graftabl graphics help Table 1 join keyb label loadhigh (LH) mem mirror mkdir (md) mode more nlsfunc path print prompt qbasic recover rename (ren) replace restore rmdir (rd) set setver share sort subst sys time tree type undelete unformat ver verify vol xcopy

KemTec 2001-2003

10

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

WINDOWS 95/98/ME EXTERNAL COMMANDS


The table below is a list of the external DOS commands held in the Windows\Command folder. External commands are visible, i.e. they are actual .exe or .com files. If you use Windows Explorer or the DOS dir command to view the Windows\Command folder you can see the external commands for yourself. They are listed in the table below. Attrib.exe Cfkdsk.exe Choice.com Cmdinit.bat Cscript.exe Cat.exe Debug.exe Deltree.exe Diskcopy.com Doskey.com Edit.com Extract.exe Fc.exe Fdisk.exe Find.exe Format.com Iextract.exe Label.exe Mem.exe Mode.com More.com Move.exe Mscdex.exe Scandisk.exe Scanreg.exe Sort.exe Start.exe Subst.exe Sulfnbk.exe Sys.com Xcopy.exe Xcopy32.exe Xcopy32.mod

Table 2 Windows 95/98/ME external commands The external commands listed above can be executed from the Windows 95/98/ME command prompt.

WINDOWS 95/98/ME INTERNAL COMMANDS


The internal commands are not visible as they are embedded in command.com and the hidden file MS-DOS.sys. The internal commands include the simpler commands that are used on a regular basis in MS-DOS applications and batch files. They cannot be executed from the Windows command line. However they can be executed in the MS-DOS prompt window or when booted in MS-DOS mode in Windows 95/98. Windows ME does not support the Restart in MS-DOS mode option but it does support the MS-DOS prompt. Call Chcp Chdir (cd) Cls Copy Ctty Date Del Dir Dos Driveparm Fcbs Mkdir (md) Mode Path Rename Rmdir (rd) Set Time Type Ver Verify Vol

Table 3 Windows 95/98/ME internal commands

11

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

WINDOWS 2000 COMMAND SET


The tables below briefly describe the new Windows 2000 commands not found in MS-DOS and the changes to the MS-DOS command set.

NEW WINDOWS 2000 COMMANDS


This table lists the new Windows 2000 system commands not found in MS-DOS. COMMAND FUNCTION At Schedules commands and programs to run on a computer at a specified time and date. Cacls Displays or modifies access control lists (ACLs) of files. Convert Converts file systems from FAT or FAT32 to NTFS. Dosonly Prevents starting applications other than MS-DOS-based applications from the Command.com prompt. Echoconfig Displays messages when reading the MS-DOS subsystem Config.nt file. Endlocal Ends localization of environment variables. Findstr Searches for text in files using regular expressions. Ntcmdprompt Runs the Windows 2000 command interpreter, Cmd.exe, rather than Command.com after running a TSR or after starting the command prompt from within an MS-DOS application. Popd Changes to the directory last set with the pushd command. Pushd Saves the current directory for use by the popd command, and then changes to the specified directory. Setlocal Begins localization of environmental variables. Start Runs a specified program or command in a secondary window and in its own memory space. Title sets the title of the command prompt window. && Command following this symbol runs only if the command preceding the symbol succeeds. || Command following this symbol runs only if the command preceding the symbol fails. & Separates multiple commands on the command line. () Groups commands. ^ Escape character. Allows typing command symbols as text. ; Or , Separates parameters. Table 4 The new Windows 2000 commands

CHANGES AND IMPROVEMENTS TO MS-DOS COMMANDS


CHANGED FEATURES COMMAND Chcp Changes code pages for full-screen mode only. Cmd Cmd.exe replaces Command.com.

KemTec 2001-2003

12

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Del Dir Diskcomp Diskcopy Doskey Format Label Mode More Path Print Prompt Recover Rmdir Sort Xcopy

New switches provide many more functions. New switches provide many more functions. Switches /1 and /8 are not supported. Switch /1 is not supported. Available for all character-based programs that accept buffered input. Doskey has been improved by a series of enhancements. 20.8 MB optical drive supported. Switches /b, /s, and /u are not supported. The symbols ^ and & can be used in a volume label. Extensive changes. New switches provide many more functions. The %PATH%environment variable appends the current path to a new setting at the command prompt. Switches /b, /c, /m, /p, /q, /s, /t, and /u are not supported. New character combinations allow you to add ampersands ($a), parentheses ($c and $f), and spaces ($s) to your prompt. Recovers files only. New /s switch deletes directories containing files and subdirectories. Does not require TEMP environment variable. File size is unlimited. New switches provide many more functions. Table 5 The modified MS-DOS Commands of Windows 2000

MS-DOS COMMANDS NO LONGER SUPPORTED


The following MS-DOS commands are not available at the command prompt. COMMAND Assign Backup Choice Ctty Dblspace Defrag Deltree Diskperf Dosshell Drvspace Emm386 Fasthelp Fdisk Include Interlnk Intersrv REASON FOR RETIRING THEM Not supported in Windows 2000. Not currently supported. Not currently supported. Not currently supported. Not supported. Windows 2000 automatically optimises disk use. To manually optimise a disk, right-click it in My Computer, click Properties, and then, on the Tools tab, click Defragment Now. The rmdir /s command deletes directories containing files and subdirectories. Not currently supported. Unnecessary with Windows 2000. The Drvspace program is not currently supported. Unnecessary with Windows 2000. This MS-DOS 6.0 command is the same as the Windows 2000 command help. Windows 2000 also provides an online command reference. Disk Management prepares hard disks for use with Windows 2000. Multiple configurations of the MS-DOS subsystem are not supported. The Interlnk program is not supported. The Intersrv program is not supported.

13

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Join

Increased partition size and an improved file system eliminate the need to join drives. Memmaker Windows 2000 automatically optimizes the MS-DOS subsystem's memory use. Menucolor Multiple configurations of the MS-DOS subsystem are not supported. Menudefault Multiple configurations of the MS-DOS subsystem are not supported. Menuitem Multiple configurations of the MS-DOS subsystem are not supported. Mirror Not supported in Windows 2000. Msav The Msav program is not supported. Msbackup Windows 2000 provides the Backup utility (in the Administrative Tools in Control Panel) for computers with tape drives, or the xcopy command for computers without tape drives. Mscdex It is unnecessary to configure the MS-DOS subsystem to use a CD-ROM drives. Windows 2000 provides access to CD-ROM drives for the MS-DOS subsystem. Msd Use the System Information snap-in. To start System Information, click Start, click Run, and then type msinfo32. Numlock Not currently supported. Power The Power utility is not supported. Restore Not currently supported. Scandisk The Scandisk utility is not supported. Smartdrv Windows 2000 automatically provides caching for the MS-DOS subsystem. Submenu Multiple configurations of the MS-DOS subsystem are not supported. Sys Windows 2000 will not fit on a standard 1.2 MB or 1.44 MB floppy disk. Undelete Not supported in Windows 2000. Unformat Not supported in Windows 2000. Vsafe The Vsafe program is not supported. Table 6

WINDOWS XP COMMAND SET


The Command prompt in Windows XP can be found in Start | All Programs | Accessories. In XP for more information on a specific command, type Help and a space followed by the command name. ASSOC Displays or modifies file extension associations. AT Schedules commands and programs to run on a computer. ATTRIB Displays or changes file attributes. BREAK Sets or clears extended CTRL+C checking. CACLS Displays or modifies access control lists (ACLs) of files. CALL Calls one batch program from another. CD Displays the name of or changes the current directory. CHCP Displays or sets the active code page number. CHDIR Displays the name of or changes the current directory. CHKDSK Checks a disk and displays a status report. CHKNTFS Displays or modifies the checking of disk at boot time.

KemTec 2001-2003

14

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

CLS Clears the screen. CMD Starts a new instance of the Windows command interpreter. COLOR Sets the default console foreground and background colors. COMP Compares the contents of two files or sets of files. COMPACT Displays or alters the compression of files on NTFS partitions. CONVERT Converts FAT volumes to NTFS. You cannot convert the current drive. COPY Copies one or more files to another location. DATE Displays or sets the date. DEL Deletes one or more files. DIR Displays a list of files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, recalls Windows commands, and creates macros. ECHO Displays messages, or turns command echoing on or off. ENDLOCAL Ends localization of environment changes in a batch file. ERASE Deletes one or more files. EXIT Quits the CMD.EXE program (command interpreter). FC Compares two files or sets of files, and displays the differences between them. FIND Searches for a text string in a file or files. FINDSTR Searches for strings in files. FOR Runs a specified command for each file in a set of files. FORMAT Formats a disk for use with Windows. FTYPE Displays or modifies file types used in file extension associations. GOTO Directs the Windows command interpreter to a labeled line in a batch program. GRAFTABL Enables Windows to display an extended character set in graphics mode. HELP Provides Help information for Windows commands. IF Performs conditional processing in batch programs. LABEL Creates, changes, or deletes the volume label of a disk. MD Creates a directory. MKDIR Creates a directory. MODE Configures a system device. MORE Displays output one screen at a time. MOVE Moves one or more files from one directory to another directory. PATH Displays or sets a search path for executable files. PAUSE Suspends processing of a batch file and displays a message. POPD Restores the previous value of the current directory saved by PUSHD. PRINT Prints a text file. PROMPT Changes the Windows command prompt. PUSHD Saves the current directory then changes it. RD Removes a directory. RECOVER Recovers readable information from a bad or defective disk. REM Records comments (remarks) in batch files or CONFIG.SYS. REN Renames a file or files. RENAME Renames a file or files.

15

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

REPLACE Replaces files. RMDIR Removes a directory. SET Displays, sets, or removes Windows environment variables. SETLOCAL Begins localization of environment changes in a batch file. SHIFT Shifts the position of replaceable parameters in batch files. SORT Sorts input. START Starts a separate window to run a specified program or command. SUBST Associates a path with a drive letter. TIME Displays or sets the system time. TITLE Sets the window title for a CMD.EXE session. TREE Graphically displays the directory structure of a drive or path. TYPE Displays the contents of a text file. VER Displays the Windows version. VERIFY Tells Windows whether to verify that your files are written correctly to a disk. VOL Displays a disk volume label and serial number. XCOPY Copies files and directory trees.

INSTALLING MS-DOS 6.22


For those of you who would like to configure an old MS-DOS PC system as an experimental computer this section takes you through a typical MS-DOS installation routine. To do this yourself you need an old AT PC and a set of MS-DOS6.22 installation disks. Before MS-DOS can be installed on the hard disk drive it must be PARTITIONED and HIGH LEVEL FORMATTED. In the older versions of MS-DOS below version 5, the partitioning and formatting operation had to be done separately using the DOS FDISK and FORMAT C:/s commands respectively. In more recent versions of MS-DOS, these chores can be done automatically. The following MS-DOS 6.22 installation procedure demonstrates how easy it is to prepare the hard disk and install the OS: Boot the DOS setup disk displayed as shown below: off the A: drive. The MS-DOS 6.22 setup screen is

KemTec 2001-2003

16

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Microsoft MS-DOS 6.22 Setup Welcome to Setup. The Setup program prepares MS-DOS 6.22 to run on your computer. To set up MS-DOS now, press ENTER. To learn more about Setup before continuing, press F1. To exit Setup without installing MS-DOS, press F3. Note: If you have not backed up your files recently, you might want to do so before installing MS-DOS. To back up your files, press F3 to quit Setup now. Then, back up your files by using a backup program. To continue Setup, press ENTER. ENTER=Continue Fl=Help F3=Exit F7=Install to a Floppy Disk

Figure 3 PRESS ENTER....

Microsoft MS-DOS 6.22 Setup Setup needs to configure the unallocated space on your hard disk for use with MS-DOS. None of your existing files will be affected. To have Setup configure the space for you, choose the recommended option. Configure unallocated disk space (recommended). Exit Setup. To accept the selection, press ENTER. To change the selection, press the UP or DOWN ARROW key, and then press ENTER. ENTER. ENTER=Continue Fl=Help F3=Exit

17

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Figure 4 PRESS ENTER..... Microsoft MS-DOS 6.22 Setup

Setup will restart your computer now. Please make sure Setup Disk 1 is in drive A. To continue, press ENTER.

Figure 5 PRESS ENTER.....

Microsoft MS-DOS 6.22 Setup

Please wait Setup is checking your system configuration.

KemTec 2001-2003

18

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Figure 6 WAIT while the hard drive parameters are read from the CMOS setup memory and the drive is automatically partitioned for MS-DOS. After a few seconds the following screen appears....... Microsoft MS-DOS 6.22 Setup Formatting Hard Disk Drives All of your disk space is configured for use with MS-DOS. This space is being formatted now.

Formatting drive C: 0% of drive formatted

Figure 7

Wait until 100% of the drive is high level formatted and the system files are transferred ......
Microsoft MS-DOS 6.22 Setup
Setup will use the following system settings: Date/Time: Country: Keyboard Layout: The settings are correct. 07/13/95 22.55 United States United States

If all the settings are correct, press ENTER. To change a setting, press the UP or DOWN ARROW keys to select it. Then press ENTER to see alternatives.

19

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

ENTER=Continue Fl=Help F3=Exit

Figure 8 Use the UP and DOWN arrow keys to change the country and keyboard settings to United Kingdom. If you wish you can also alter the data and time.
Microsoft MS-DOS 6.22 Setup MS-DOS 6.22 supports the character sets used in different countries. Choose the character set you want.
Poland Portugal Spain Sweden Switzerland United Kingdom United States Yugoslavia

To accept the selection, press ENTER. To change the selection, press the UP or Down Arrow key, and then press ENTER. ENTER=Continue F1=Help F3=Exit ESC=Previous Screen

Figure 9 PRESS ENTER and you are prompted to change or accept the name of the DOS

directory, C:/DOS...........

MS-DOS 6.22 Setup Setup will place your MS-DOS files in the following directory: C:\DOS To place MS-DOS files in this directory, press ENTER. To place MS-DOS files in a different directory, type its path and press ENTER.

KemTec 2001-2003

20

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Figure 10 Press ENTER and wait while MS-DOS installs in the C:\DOS directory. You will subsequently be prompted to place first disk 2 and then disk 3, into drive A:. Remember to press enter after you insert each disk. MS-DOS is now installed. Remove the floppy from drive A: and re-boot the system. The automatic installation creates a basic CONFIG.SYS and AUTOEXEC.BAT file on the root directory of the hard disk (C:\). The files are shown below. Notice how the country and keyboard definition in the config.sys and autoexec.bat respectively have been set to the UK version. Typical CONFIG.SYS file DEVICE = C:\DOS\SETVER.EXE COUNTRY=044,,C:\DOS\COUNTRY.SYS FILES = 30 Typical AUTOEXEC.BAT file @ECHO OFF PROMPT $P$G PATH C:\DOS SET TEMP=C:\DOS KEYB UK,,C:\DOS\KEYBOARD.SYS

Figure 11

At this point MS-DOS 6.22 is now successfully installed on the hard disk (Drive C:). Part of DOS has been placed in three files in the root directory of drive c:, named I/O.sys, MSDOS.sys and Command.com and the other part is stored as several individual files in a sub directory named DOS. In addition, two system configuration files known as config.sys and Autoexec.bat are also present in the root directory. We can examine the contents of the hard disk at this point, by first entering the root directory of drive c: by typing: c:\ Enter followed by the view directory (wide view), commandrive:

dir/w

Enter

The files COMMAND.COM, CONFIG.SYS, AUTOEXEC.BAT and a directory named DOS are listed on screen. The DOS directory is indicated by square brackets around the directory name, thus, [DOS].

21

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

C:\> dir Volume in drive C has no label Volume Serial Number is 1D40-4A12 Directory of C:\ COMMAND.COM 4 file(s) CONFIG.SYS AUTOEXEC.BAT [DOS]

55,072 bytes 2,140,321,120 bytes free Figure 12

Notice that the files IO.SYS and MS-DOS.SYS previously mentioned, are not visible. You can't see them because they are automatically hidden and made into read-only files to prevent them from being accidentally erased. The three files listed above are crucial DOS files that contain part of the system boot-loader program, and part of the DOS command library, the so called internal commands. The rest of the DOS command library, known as the external commands are placed in the [DOS] directory and are visible to the user. If you would like to see the hidden system files IO.SYS and MS-DOS.SYS. Make sure you are in the root directory and simply type:

attrib

then press Enter.

This will list all the files in the root directory including the hidden system files.

Disk Based Operating Systems


The Disk Operating System (DOS), as the name implies is an Operating System on Disk. This was rather significant, as many personal computers available at the time of the PC's launch in 1981, had all the Operating System (OS) permanently stored in a ROM chip. Having the OS, or part of it on disk, offers advantages to the end user and the OS manufacturer alike. Of course modern GUI operating systems like Windows 95/98/ME/2000/NT are also disk operating systems Having an operating system on disk rather than permanently stored in ROM allows the end user to update the OS to keep pace with new developments in both hardware and software. It also offers greater flexibility, as the system can be easily configured to suit the users needs. Hardware items such as a mouse, graphics pad, scanner, sound card, CD-ROM drive, to name a few, can easily be added to the list of items recognised by the operating system. From the manufacturers point of view, a disk based OS has a monetary advantage as it allows new versions and upgrades to be launched. This in turn has a knock on effect of increasing the saleable life of the product. A firmware (ROM based) operating system would
KemTec 2001-2003

22

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

be far more difficult for the end user to install and this would adversely effect volume sales and the long term success of the product.

The Configuration Files


MS-DOS provides two configuration files named config.sys and autoexec,bat, these are automatically executed after the system has booted. When a card or peripheral is added to a DOS based PC system, these files are updated with the driver software supplied with the device. This allows DOS to serve the new item just like any other installed device. Device drivers are small programs (routines) that allow DOS to recognise devices and parameters that are not part of the normal PC system. Items such as a mouse, scanner, printer, sound card, graphics card, and CDROM drive are usually supplied with their own driver software, that must be installed along with the hardware.

CONFIG.SYS
Config.sys resides in the root directory of the boot disk and is executed automatically after the system has booted. The main purpose of config.sys is to: (i) make DOS aware of extra driver software, (ii) allow system memory space for information processing and (iii) configure the system to conform to international standards. To inform DOS of the new driver software, a device statement is installed in config.sys (or sometimes in autoexec.bat). DOS itself provides a handful of standard device drivers, these are listed in table 3.1.7. Device drivers provided with MS-DOS 6.22 ANSI.SYS DISPLAY.SYS DRIVER.SYS EGA.SYS RAMDRIVE.SYS INTERLNK.EXE POWER.EXE Table 7

CONFIG.SYS COMMANDS
To effect a user installable device driver facility, DOS provides a set of commands that can be added to the config.sys file. The purpose of each command is described below: COMMAND BREAK BUFFERS COUNTRY DEVICE DRIVPARM FCBS FILES LASTDRIVE SHELL STACKS PURPOSE Enables more frequent checking of the Ctrl-C or control-Break, keys. Sets the number of sector buffers. Allows international time, date, and currency to be set. Installs a particular device driver in the system. Defines parameters for block devices. Sets the number of File Control Blocks that can be opened concurrently. Sets the number of files that can be opened at once. Sets the maximum number of drives that can be accessed. Change to a user defined command processor. Specifies the no. memory stacks for hardware interrupts.

23

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Table 8 Don't worry if some of these terms sound like double-Dutch they do to most people meeting DOS for the first time. The important thing to do is to at least make yourself aware of config.sys and autoexec.bat files. They are not used on Windows 2000 systems or on new Windows ME systems, however they are still found frequently on Windows 95 /98 systems. This is particularly the case on systems upgraded from DOS or Windows 3.1. The less used commands are often inserted automatically when new driver software is installed. The more you get your hands on older systems, the more quickly you will feel at home using Config.sys and Autoexec.bat.4 The example config.sys file below, shows some of the more widely used commands. BREAK=ON FILES = 50 BUFFERS = 30 COUNTRY = 044, , C:\DOS\COUNTRY.SYS DEVICE = C:\DOS\SETVER.EXE DEVICE = C:\MOUSE\MOUSE.SYS LASTDRIVE = f Each of the commands in the above config.sys file will now be explained briefly: The BREAK = ON command tells MS-DOS to check for the Ctrl-C or Ctrl-Break key combination as often as possible. (This key combination normally only allows a break to take place during a printing process to screen or printer.) Depending on the software in use, the BREAK = ON command may enable the break key sequence during disk processing or program execution. FILES = 50 allocates space in memory for information on up to twenty open disk files called by MS-DOS. The maximum number of files that can be opened at once and called by MSDOS by this command is 255. Note for the inquisitive reader: The maximum number of files that can be opened by an application program in MS-DOS is 65534. This is achieved when the program executes interrupt 21h, service 67 effectively overriding the config.sys limit of 255. BUFFERS = 30 allocates a block of memory as a disk buffer. This allows MS-DOS to hold data in the buffer area during disk reading and writing. Each buffer takes up 512 bytes of memory so this particular command line allocates 10k bytes of memory as a disk buffer, reducing the amount of conventional RAM available for applications. In a simple DOS based system, the use of buffers can increase the performance of disk operations. Many DOS based word processors insist on a minimum buffer size.

Discussed later in this appendix

KemTec 2001-2003

24

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

COUNTRY = 044, , C:\DOS\COUNTRY.SYS, tells MS-DOS to follow the UK Date, Time and number format. The number 044 is the international dialling code for the UK. A common failure to insert this command results in the default American date and time formats. The statement following the two commas indicates the path to DOS's country.sys command. If country.sys is placed in the root directory, then this statement is not necessary, however it is neater to leave it as it is, in the DOS directory. Together with the KEYB UK command in autoexec.bat, these commands tell the system to use British characters and key functions. For example the full A to Z alphabet, sign, day/month/year, and 24 hour time format, is adopted. If you wish to write a letter in French for example, then you can change the Country value in config.sys to 033 and the KEYB command in autoexec.bat, to KEY FR. 'DEVICE = C:\DOS\SETVER.EXE' This loads a table called the 'version table' into memory. This is contains a list of the DOS version that each program on the disk was originally designed to run on. Most DOS programs run on any DOS version without problems. However some must be loaded into the version table so that DOS can trick the application into thinking that the correct version of DOS is present. To load a particular program to the version table the command SETVER filename n.nn is used. For example to place a DOS 3.3 program called 'pack1.exe' into the version table using DOS6.22, the command SETVER pack1 3.3 is used. To see the contents of the version table you simply enter setver. 'DEVICE = C:\MOUSE\MOUSE.SYS' installs the mouse driver, mouse.sys allowing MSDOS to communicate with the mouse hardware when required. The disk supplied with the mouse package usually contains a mouse.sys and a mouse.com file. This allows the mouse to be configured from either config.sys or autoexec.bat respectively. See the example config.sys file on page 3.37. 'LASTDRIVE = f ', This command simply specifies the maximum number of drives that can be accessed form DOS, in this case six drives, a:,b:,c:,drive:,e:,and f:.

BATCH FILES
A batch file is a sequence of DOS commands saved in a file with a .BAT extension after the name. When the batch file called up via the keyboard or via another program, each command is executed in sequence. As a simple example of a bat file we will assume we have a wordprocessor program called myword.exe, saved in a subdirectory of the apps directory, named wordproc. See the directory structure in figure 3.1.

25

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Figure 13 To run the program called myword we must enter the path followed by the filename thus, C:\apps\wordproc\ myword, To save having to type this each time we want to execute the program, we will make a batch file named word.bat that runs the program by simply entering the name word. To do this we could enter the following from the root directory of drive C using the DOS copy to Console command (copy con):

copy con word.bat c:\apps\wordproc\ myword

press enter press enter

lastly hold down the Ctrl key and press the z key, i.e. Ctrl z, to save the file. The file called word.bat is now saved to the root directory of drive c: To run myword now all we have to do is type word and then press enter.

AUTOEXEC.BAT
Any batch file labelled AUTOEXEC.BAT will run automatically when the system has booted. This is a useful facility in aDOS based machine as it allows the user to run a chosen application immediately the system is booted. For example a computer system can be made to automatically run a wordprocessor program by inserting the path and file name in the autoexec.bat file. The normal use of autoexec.bat however is to automatically run DOS commands, allowing the system to be configured as required. It may seem strange that config.sys and autoexec.bat

KemTec 2001-2003

26

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

are both used to configure the system. The reason for this is that autoexec.bat can run normal DOS commands whereas config.sys contains files that can only be read and processed by the hidden DOS boot program called IO.SYS, when the system is booted. A simple autoexec.bat file is shown below: @ECHO OFF PATH C:\;C:\DOS;C:\APPS\WORDPROC;C:\UTILS PROMPT CURRENT DIRECTORY $P$G KEYB UK,, C:\DOS\KEYBOARD.SYS Each line of the above autoexec.bat file will now be explained briefly: ECHO OFF, prevents each line being executed, from appearing on the screen, a process known as echoing. ECHO ON enables screen echoing. The @ sign placed before the ECHO command, prevents the command itself from echoing on the screen. PATH C:\;C:\DOS;C:\APPS\WORDPROC;C:\UTILS, tells MS-DOS which directories, and in what order, it must search for external commands. For example from the directory structure of figure 13, to run myword.exe in the wordproc directory, instead of using a separate bat file as shown earlier, we simply include its path in autoexec.bat. i.e., C:\APPS\WORDPROC. From the PATH statement in autoexec.bat: After the system has booted and confi.sys and autoexec.bat have executed, typing myword followed by the ENTER key, in the root directory would force MS-DOS to first first search for the command in the root directory, then in DOS and finally in WORDPROC. The use of the semicolon ';' in the path statement, allows several paths to be specified in one line. NOTE: Entering PATH on its own, shows the current path setting on the screen. 'PROMPT current directory $p$g', changes the normal default DOS prompt to display the current directory name, the time and date, or any text the user wishes. In this case the words current directory followed by the working directory, and the > character are shown. 'KEYB UK,, C:\DOS\KEYBOARD.SYS', this configures the keyboard for UK English and therefore enables the full QWERTY, alphanumeric characters and special symbols like the sign. This is used to complement the COUNTRY= 044 command in config.sys.

BATCH PROCESSING COMMANDS


COMMAND Call Echo PURPOSE Runs a second batch file and then returns to the first one. ECHO ON displays a message on screen, ECHO OFF stops messages being displayed.

27

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

For (in, do) Goto

Runs a specified command for each file in a group of files. It must be used with IN and DO. Allows the batch file sequence to be processed at another part of the batch file, pointed to by a label name.

If Carries out a command or sequence of commands depending on the logical result of a specified condition. Pause Stops a batch file from continuing until a key is pressed. Rem Placed before the text, allows notes (REMarks), to be made about each part of a batch program. Shift Changes the position of replaceable parameters. Table 9 The autoexec.bat file can contain any DOS commands well as the batch processing commands shown above.

THE MS-DOS BOOT SEQUENCE


Now we have taken a quick look at the system configuration files, config.sys and autoexec.bat, we will summarise the sequence of events from power on to the command processor prompt for an MS-DOS based PC. The operating system performs the following tasks during the boot sequence:

KemTec 2001-2003

28

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

(i)

Executes ROM based diagnostic routines and sets up programmable hardware devices. Checks for system software files on the default drive, namely IO.sys, MS-DOS.sys. Loads the hidden files IO.sys and MS-DOS.sys from the default drive into RAM. Checks for a CONFIG.SYS file and executes it, if present. Passes control to COMMAND.COM, a file in the root directory of the default drive.

(ii) (iii) (iv) (v)

(vi) The command processor looks for autoexec.bat and executes it if present. If there is no autoexec.bat file the command processor prompts for the date and time before handing control over to the user, i.e. it awaits for a command from the keyboard. If there is an autoexec.bat file this is executed first. What happens after this depends on the command sequence in autoexec.bat, but usually it loads a PATH for the various application programs present, set the on screen prompt

29

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Figure 14 MS-DOS BOOT SEQUENCE

KemTec 2001-2003

30

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

DOS MEMORY LIMITATIONS


In the first PCs based on the IBM XT, the maximum memory addressing capability of the 8086/88 CPU, with its 20 address wires, was 1MB, (220 = 1048576 bytes = 1 MB). The 1MB address space was divided up for Application programs, the OS, the BIOS ROM and the Video Display, as shown in the memory map below. The bottom 640KB of the address space is known as conventional memory and is used by DOS and DOS Application software. The top 384KB holds the BIOS ROM, graphics memory and Expanded Memory (EMS) area. This is known as the upper memory area. The 640KB maximum memory space assigned to DOS and its applications was more than adequate for the size of programs available at the time. In fact many early XT machines were shipped with 256KB or less, of main system RAM.

Figure 15 Basic memory map an XT system running MS-DOS. As more powerful CPUs became available the CPUs inherent addressing range increased significantly. The 486 and modern Pentium style CPUs have 32 address wires, so they can directly address a maximum of 4 Gigabytes of RAM. Unfortunately, even though the PC hardware is capable of addressing these huge amounts of memory, DOS isn't! It is held back by the need to offer downward compatibility and is therefore restricted to the 640KB conventional memory limit. The downward compatibility requirement of DOS, until the advent of Windows 95 and Windows NT, held back the progress of the PC compared to other personal computer systems such as the Apple Mac.

31

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

EXPANDED MEMORY

(obsolete, but sometimes the hapless PC technician still comes across it on some old legacy systems) In an attempt to increase the memory used by DOS application programs, the Expanded Memory System (EMS) was introduced by Lotus, Intel and Microsoft. The last version, produced in 1987, was known as the LIM 4 specification (sometimes referred to as EMS 4.0). This allowed all XT and AT PCs fitted with an EMS RAM adapter card, and expanded memory manager software, to run applications that would normally demand more memory than the 640KB DOS limit. EMS uses a technique known as bank switching. Instead of addressing memory contiguously as in conventional memory reads and writes, it copies 16KB blocks of memory from the EMS adapter card to a specially reserved area of RAM in the 384KB upper memory area. The 16KB blocks are known as pages. Four such pages were stored in a block of upper memory known as a page frame. An EMS memory card containing several Megabytes of RAM could therefore store large amounts of data including large application programs. However, because only four pages (64KB), could be copied across to a page frame at a time, the system was inherently slow. The advantage of the EMS specification is that is allows XT class machines to use larger programs and handle larger amounts of data. The disadvantages were all too apparent. As well as it's slow performance, application software had to be specifically written for the LIM 4.0 driver software. Memory adapter cards are now a thing of the past as more and more memory is being integrated onto the motherboard. This has the added advantage that ram devices, can now run at the full external CPU bus speed (usually 66MHz), instead of the slow ISA bus speed of 8MHz.. As page switching was a slow and cumbersome process, EMS is now classed as obsolete and is no longer supported by the original vendors. However, it is wise to become familiar with it, as many DOS machines still have EMS installed. The games fraternity, until quite recently, used EMS to increase the size of DOS based games. This allowed better graphics and more elaborate scenarios to be incorporated into the software. Such games are still being sold in most games stores, often at greatly reduced prices. To install an EMS compatible driver on a PC AT with a 386SX or greater processor, the EMS emulator called EMM386.EXE, supplied with MS-DOS 5.0 or greater, should be used. This is an upper memory manager and EMS emulator, for use with extended memory. Note: Extended memory is discussed later in this section. As EMS is probably only needed on the odd occasion, e.g., to run DOS based games 5, it is best to make a special floppy boot disk, rather than install an EMS driver onto the C: drive. To make an EMS boot disk follow the procedure below:

There are a lot of high quality CD-ROM based MS-DOS games and multimedia now sold at rock bottom prices because they won't run on modern Windows systems. KemTec 2001-2003

32

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

PRODUCING AN EMS BOOT DISK


To make a DOS bootable floppy disk that will also install 1024KB (1MB) of expanded memory, using DOS 5 to DOS 6.22, follow these steps: 1. 2. 3. 4. Produce a bootable floppy disk. Copy config.sys and autoexec.bat from the root directory of drive C: drive to drive A:. Add an extra line into config.sys to enable the EMS driver. Check the memory configuration to confirm the new 1024KB EMS portion. In this example a total of 4MB or RAM is installed

The following steps take you through this procedure:

STEP 1: Format a blank disk and install a DOS boot sector and system files by typing format a:/s
then press enter.

STEP 2: Once the boot disk has been created, copy config.sys and autoexec.bat from the
root directory of drive C: to the floppy disk A: by typing:

copy c:\config,sys a: copy c:\autoexec.bat a:

then press enter. then press enter.

STEP 3: Now invoke the DOS EDITOR (EDIT.COM) in the DOS directory of drive c: by
typing:

c:\dos\edit

then press enter.

Once in EDIT, open your existing config,sys file, installed on the root directory of drive A: by typing :

alt f then o
then type

a:\Config.sys

then press enter.

Your config.sys file will appear in the editor screen. 33


KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Insert the new line DEVICE=C:\DOS\EMM386.EXE 1024 RAM It must be placed below the line DEVICE=C:\DOS\HIMEM.SYS. See the example config.sys file below. CONFIG.SYS DEVICE=C:\DOS\HIMEM.SYS BUFFERS=30 FILES=40 DOS=UMB LASTDRIVE=E DOS=HIGH COUNTRY=044,,C:\DOS\COUNTRY.SYS

DEVICE=a:\DOS\EMM386.EXE 1024 RAM


DEVICE = C:\DOS\SETVER.EXE DEVICE = C:\DOS\DISPLAY.SYS CON=(EGA,,1) DEVICE = C:\DOS\ANSI.SYS DEVICE = C:\DOS\MOUSE.SYS

Figure 16 A typical Config.sys file Save the new config.sys file by typing:

alt f then a
then in the filename box that appears, type:

a: Config.sys
Exit the editor by typing :

then press enter.

alt f then x STEP 4: Now reboot the PC from the A: drive:


To do this, leave your disk in the A: drive, and press the RESET button, or hold down the Ctrl and Alt keys and then press Del.

STEP 5: To see your new memory configuration run the DOS MEM command. To do this
type:

mem
The DOS mem command lists the current memory configuration.

then press enter.

The new 2048KB EMS memory area that you have just created, will be displayed in a similar fashion to that shown in figure 18.

KemTec 2001-2003

34

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Memory Type Total ---------------------Conventional 640K Upper 187K Reserved 384K Extended (XMS) 2,885K ---------------- ------Total memory 4,096K Total under 1 MB 827K

= 23K 81K

Used -------

+ 617K 106K

Free -------

384K 0K 217K 2,668K --------------704K 3,392K 103K 724K

Largest executable program size 617K (632,176 bytes) Largest free upper memory block 106K MS-DOS is resident in the high memory area Figure 17 Memory before EMS is installed.

Memory Type Total = Used + Free ---------------- ------------------Conventional 640K 41K 599K Upper 91K 74K 17K Reserved 384K 384K 0K Extended (XMS)* 2,981K 485K 2,496K ---------------- ------------------Total memory 4,096K 984K 3,112K Total under 1 MB 731K 115K 616K

Total Expanded (EMS) Free Expanded (EMS)*

1,408K (1,441,792 bytes) 1,024K (1,048,576 bytes)

* EMM386 is using XMS memory to simulate EMS memory as needed. Free EMS memory may change as free XMS memory changes. Largest executable program size 599K (613,184 bytes) Largest free upper memory block 17K MS-DOS is resident in the high memory area. Figure 18 Memory after 1024k of EMS is installed.

EXTENDED MEMORY

used on DOS and WIN3.1 based systems.

35

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Many DOS based, applications and GUI programs like Windows need memory in excess of the normal 640k DOS limit. The old LIM 4.0 expanded memory system did not do justice to the powerful CPUs emerging on the market. Coupled to this was the burgeoning demand for more potent applications. What was needed was a more modern memory management system that could utilise the huge memory addressing capability of the then new 386 and 486 CPUs. To go some way to meeting this requirement, Microsoft added drivers and memory management utilities to MS-DOS-5, and onwards, to support Extended Memory. This is memory above the 1MB 8086/8088 addressing capability, so it is unsuitable for PC XTs. Unfortunately the old DOS 640KB limit still applied to conventional DOS application programs but new programs can be specially written to utilise the vast extended memory area. Microsoft's extended memory manager is known as HIMEM. In a PC system with a 386SX or greater processor and MS-DOS 5.0 to 6.22 installed, the available memory is divided into areas known as Conventional Memory, Upper memory, High Memory and Extended Memory. This is shown if figure 3.1. 48. Maximum amount of memory actually installed Extended Memory (XMS)

High Memory Area (HMA) 1MB Upper memory area (384k) 640k Conventional Memory (640k)

0k Figure 19 Basic memory map of a PC with MS-DOS 5 or greater installed. Instead of storing device drivers in conventional memory, as they were in older versions of DOS, they can be stored in Upper Memory thus freeing up more of the 640KB conventional

KemTec 2001-2003

36

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

memory for DOS applications. Unused portions of upper memory are known as UMBs (Upper Memory Blocks). By including the DOS devicehigh command before a device driver statement in config.sys, MS-DOS will attempt to fit the device driver into a spare UMB rather than use up valuable conventional memory space. The High Memory Area (HMA) is the first 64k of extended memory. Part of DOS can be made to run from this area by incorporating the DOS=HIGH statement in config.sys thereby freeing up space in conventional ram. Extended Memory (XMS) is ram above 1MB including HMA. Applications that use this area require extended-memory manager software such as HIMEM provided with DOS 5.0 and DOS 6.x. Expanded Memory applications on a 386SX or higher machine can be supported in DOS or Windows by invoking the EMM386 expanded memory driver supplied with DOS 5.0 and DOS 6.x.

DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE NOEMS BUFFERS=30 _ FILES=40 _ DOS=UMB _ LASTDRIVE=E _ FCBS=16,8 _ DEVICEHIGH /L:1,12048 =C:\DOS\SETVER.EXE _ DOS=HIGH _ COUNTRY=044,,C:\DOS\COUNTRY.SYS _ DEVICEHIGH /L:1,15792 =C:\DOS\DISPLAY.SYS CON=(EGA,,1)

37

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

_ DEVICEHIGH /L:1,9072 =C:\DOS\ANSI.SYS _ DEVICEHIGH /L:1,9456 =C:\WINDOWS\PP\SCANDEV.SYS _ DEVICEHIGH /L:1,2640 =C:\WINDOWS\PUBPB\HPSCANER.SYS Figure 20 A typical CONFIG.SYS file for a 80486 based PC running Windows 3.1.

INSTALLING A CD-ROM IN AN MS-DOS SYSTEM


This section of the appendix describes the typical installation for a DOS based CD-ROM drive. This is included here because it is a slightly more involved procedure than installing a CD-ROM on a modern Windows based system as discussed in section 3. CD-ROM drives, like hard drives, are supplied to fit either SCSI or IDE interfaces. The most popular type used on the PC nowadays is the IDE variety. As mentioned in section 1, the ATA-2 and ATA-3 IDE standard supports the ATAPI (AT Attachment Packet Interface), which allows CD-ROM drives to connect to any PC fitted with an ATA interface. When a CD-ROM is purchased it is often supplied with a device specific ATAPI driver that links to the DOS MSCDEX file. A few years back such a disk was always supplied as it allowed the CD-ROM to interface to the underlying DOS environment. Today the second edition of Windows 95 and also Windows 98/ME/2000 no longer needs an ATAPI driver from the manufacturer as IDE CD drives are now automatically incorporated into the system using a built in driver interface. You simply install the drive and Windows recognises it. Unfortunately on an older DOS based machine things are not so straight forward and a manufacturer's disk is usually essential. The manufacturer's device driver can have any file name but it is often named MSCD0001. When the CD-ROM driver is installed, the installation program should check to ensure that these two files exist and that MSCDEX knows the path to MSCD0001. Before we physically install the CD-ROM drive it is important to know how to install the IDE connector and whether to set the CD-ROM as a master or as a slave device. In section 3 you worked through a complete installation of a modern PC and the CD-ROM (DVD) installation was described in just a paragraph as it is so straight forward. Most modern
KemTec 2001-2003

38

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Pentium style motherboards have a Primary and Secondary IDE interface built in. If you are using such a motherboard, then install the CD-ROM on the secondary interface and set the CDROM jumper to master. The primary and secondary motherboard IDE connectors are usually labelled IDE 0 and IDE 1, or IDE 1 and IDE 2. Installing a CD-ROM on an older machine is slightly more involved. If the host motherboard only has a primary IDE connector many 386/486 motherboards fall into this category then you must set the CDROM to slave and connect it to the same cable as the hard disk. To do this you need a ribbon cable fitted with two IDC sockets on one end. See table 10.

Primary Cable
master CD-ROM 1 ATA hard disk drive CD-ROM 1 slave CD-ROM 1

Secondary cable
master slave

Set up
CD-ROM, no IDE hard drive A hard drive and a CD-ROM on one cable. Often adopted on 386/486 systems Two CD-ROM drives on one cable also possible on the secondary cable Hard drive on cable 1 and a CD-ROM on cable 2 (The most common arrangement for Pentium systems) Two hard drives on one cable

(SLAVE)
CD-ROM 2

(MASTER)
ATA hard disk drive

(SLAVE)
CD-ROM 1

(MASTER)

ATA hard disk ATA hard disk drive drive ATA hard disk ATA hard disk CD-ROM 1 drive drive (MASTER) ATA hard disk ATA hard disk CD-ROM 1 (SLAVE) drive drive ATA hard disk ATA hard disk ATA hard disk drive drive drive

Two hard drives on one cable and a CDROM drive on the second cable A hard drive on one cable and another hard drive plus a CD-ROM drive on a second cable CD-ROM 1 Two hard drives on one cable and one (SLAVE) hard drive and a CD-ROM drive on a second cable

Table 10 Installation options available for IDE hard drives and CD-ROMs.

INSTALLING A DOS CDROM DRIVER STEP1:


To do this: turn on the computer and monitor and wait for the system to boot to the DOS prompt. Insert the ATAPI driver disk supplied with the CD-ROM drive into the A: drive and read the installation instructions provided on the disk. For example, if the instructions are in a file named 'readme.txt' enter the following DOS commands;

39

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

To go to the floppy disk drive type, A: To read the text file type, type readme.txt more

then press enter then press enter.

The DOS type command tells MS-DOS to print the readme.txt file on the screen. Unfortunately on a large file it scrolls through far to quickly to read. However the more extension stops scrolling as soon as the screen is full of text to allow you to read it. You can then read the next screen full by pressing any key. If the instructions are in the form of an executable file such as readme.com, readme.exe, or readme.bat then just type the filename, then press enter. Now proceed to install the driver as instructed in the readme file. In our installation example we simply type the following at the DOS prompt:

a: install

then press enter (to access the Floppy disk drive) then press enter. (to run the installation

program) Note: Some manufacturers name the installation program setup.exe. so you would type setup then press enter As the installation program runs the DOS CD driver MSCDEX is searched for and placed in a statement in AUTOEXEC.BAT and the manufacturer's driver named MSCD0001 in our example is set up as a device in CONFIG.SYS. After a successful installation, you are prompted to reboot the system to activate the CDROM drivers.

STEP 2:
Reboot the system by pressing the reset button or pressing Ctrl Alt Del If everything is fine the following events take place: The system boots, MS-DOS loads the OEM device driver 'MSCD0001' listed in CONFIG.SYS. MSCDEX.EXE is invoked from AUTOEXEC.BAT. MSCDEX then performs a system call to the OEM driver to locate the start addresses of the various driver routines. If it finds them, it reports a successful installation on the boot up screen and the CD-ROM is recognised as a valid drive. This is usually the D: drive, when one hard disk partition is installed. If more than one hard disk partition or drive is present the CDROM drive will be allocated as the next available drive.

STEP 3:
TEST THE CD-ROM DRIVE Place a CD in the drive and do a directory listing to check the installation. For example if the drive is set up as the D: drive, type :

D:

then press enter. (to access the CD-ROM drive)

KemTec 2001-2003

40

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

DIR/w

then press enter. (to do a directory listing in wide format)

The CD-ROM should behave just like another drive, except you cant write to it You could test it further by placing the CD-ROM provided on this course into the drive and run one of the DOS programs included on the disk.

MS-DOS 6.22 Command List


Append
(EXTERNAL) Append ; [drive:]path[;][drive:]path[...] [/x:on|off][/path:on|path:off] [/e] Allows programs to open files in specified directories as if they are in the default directory, i.e. when opening files the appended directories appear to be part of the current directory.

Assign
(external) Assign [x[:]=y[:] [...]] Redirects disk drive requests from one drive to a different drive.

Attrib
(external) Attrib [drive:][path]filename [/s] Attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [drive:][path]filename [/s] Sets or displays the read-only, archive, system, and hidden attributes of a file or directory.

41

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Backup
(external) Backup drive:[path][filename] drive:[/s][/m][/a][/f:(size)] [/p][/d:date] [/t:time] [/l: [path]filename] Makes a backup copy of one or more files. (in dos version 6, this program is stored on the dos supplemental disk.)

Break
(internal) Break =on|off Used from the dos prompt or in a batch file or in the config.sys file to set (or display) whether or not dos should check for a ctrl + break key combination.

Buffers
(internal) Buffers=(number),(read-ahead number) Used in config.sys to set the number of disk buffers to be used for data input. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations.

Call
(internal) Call [drive:][path]batchfilename [options] Calls another batch file and then returns to current batch file to continue.

Chcp
(internal) Chcp (codepage) Displays the current code page or changes the code page that dos will use.

KemTec 2001-2003

42

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Chdir
(internal) Chdir (cd) [drive:]path Chdir (cd)[..] Displays working (current) directory and/or changes to a different directory.

Chkdsk
(external) chkdsk [drive:][path][filename] [/f][/v] Checks a disk and provides a file and memory status report.

Choice
(internal) Choice [/c[:]keys] [/n][/s][/t[:]c,nn] [text] Used to provide a prompt so that a user can make a choice while a batch program is running.

Cls (clear screen)


(internal) Cls Clears (erases) the screen.

Command
(external) Command [drive:][path] [device] [/p][/e:(size)] [/msg][/y [/c (command)|/k (command)] Starts a new version of the dos command processor (the program that loads the dos internal programs).

43

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Comp
(external) Comp [drive:][path][filename] [drive:][path][filename] [/a][/c][/d][/l][/n:(number)] Compares two groups of files to find information that does not match. (see fc command).

Copy
(internal) copy [/y|-y] [/a][/b] [drive:][path]filename [/a][/b] [drive:][path][filename] [/v] or copy [/y|-y][/a][/b] [drive:][path]filename+[drive:][path]filename[...][drive:][path][filename] [/v] Copies and appends files.

Country
(internal) Country=country code,[code page][,][drive:][filename] Used in config.sys to inform DOS of the country to use for country specific applications.

Ctty
(internal) Ctty (device) Changes the standard input/output device to an auxiliary device.

Date
(internal) Date mm-dd-yy Displays and/or sets the system date.

KemTec 2001-2003

44

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Debug
(external) Debug [pathname] [parameters] A low level MS-DOS utility used to carry out advanced test and configuration utilities.

Defrag
(external) Defrag [drive:] [/f][/s[:]order] [/b][/skiphigh [/lcd|/bw|/go] [/h] Defrag [drive:] [/v][/b][/skiphigh] [/lcd]|/bw|/go] [/h] Optimises disk performance by reorganizing the files on the disk.

Del (erase)
(internal) Del (Erase) [drive:][path]filename [/p] Deletes (erases) files from disk.

Deloldos
(external) Deloldos [/b] Deletes all files from previous versions of an older version of DOS after a new installation.

Deltree
(external) Deltree [/y] [drive:]path [drive:]path[...] Deletes (erases) a directory including all files and subdirectories that are in it.

45

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Device
(internal) Device=(driver name) Used in config.sys to load DOS device drivers.

Devicehigh
(internal) devicehigh=(driver name) Devicehigh is used in the config.sys file to load DOS device drivers however unlike Device, it installs the device driver into the upper memory area.

Dir
(internal) Dir [drive:][path][filename] [/a:(attributes)] [/o:(order)] [/b][/c][/ch][/l][/s][/p][/w] Displays directories and files stored on disk.

Diskcomp
(external) Diskcomp [drive:] [drive:][/1][/8] Compares the contents of two diskettes.

Diskcopy
(external) Diskcopy [drive:] [drive:][/1][/v][/m] Makes an track by track copy of a diskette.

KemTec 2001-2003

46

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Dos
(internal) Dos=[high|low],[umb|noumb] Used in config.sys to specify the memory location for DOS. It is used to load DOS into the upper memory area and to specify whether or not the upper memory blocks will be used.

Doskey
(external) Doskey [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]] Starts the doskey program to enable you to repeat and or edit the last command used. It can also create command macros. (a record of a certain sequence of dos commands).

Dosshell
(external) Dosshell [/b/t/g/]:[res][n]] Initiates the graphic menu interface for MS-DOS using one of three screen resolution options l,m,h (low medium high).

Drivparm
(internal) Drivparm= /drive:(number) [/c] [/f:(form factor)] [/h:(number)] [/i][ /n][/s:(number)] [/t: (tracks)] Used in config.sys. Defines Drive Parameters for block devices.

Echo
(internal) Echo on|off Echo (message) displays messages or turns on or off the display of commands in a batch file.

47

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Edit
(external) Edit [drive:][path]filename [/b][/g][/h][/nohi] Starts the ms-dos editor, a text editor used to create and edit text files. e.g.It can be used to edit Config.sys and Autoexec.bat

Emm386
(external) Emm386 [on|off|auto] [w=on|off] Enables or disables emm386 expanded-memory support on a computer with an 80386 or higher processor.

Exe2bin
(external) Exe2bin [drive:][path]filename [drive:][path]filename Converts .exe (executable) files to binary format.

Exit
(internal) Exit Exits a secondary command processor.

Expand
(external) Expand [drive:][path]filename [[drive:][path]filename[ . . .]] Expands a compressed file.

KemTec 2001-2003

48

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Fasthelp
(external) Fasthelp [command][command] /? Displays a list of dos commands with a brief explanation of each.

Fastopen
(external) Fastopen drive:[=n][/x] Keeps track of the locations of files for fast access.

Fc
(external) Fc [/a][/c][/l][/lb n][/n][/t][/w][number] [drive:][path]filename [drive:][path]filename File comparison command. It displays the differences between two files or sets of files.

Fcbs
(internal) Fcbs=(number) Used in config.sys to specify the maximum number of file-control blocks that can be open at the same time.

Fdisk
(external) Fdisk [/status] Used to partition hard disk drives or safely examine (status) partition information.

49

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Files
(internal) Files=(number) Used in config.sys to specify the maximum number of files that can be open at the same time.

Find
(external) Find [/v][/c][/n][/i] "string" [drive:][path] filename[...] Searches for a specific string of text characters in a specified file.

For
(internal) For %%(variable) in (set) do (command) For %(variable) in (set) do (command) Runs a specified command for each file in a set of files.

Format
(external) Format drive:[/1][/4][/8][/f:(size)] [/n:(sectors)] [/t:(tracks)][/b|/s][/c][/v:(label)] [/q][/u][/v] High Level formats a disk to accept DOS files. For example: Format a:/s/v:spare formats the floppy disk in the a drive. The switch '/s' copies the system files io.sys (hidden), msdos.sys (hidden) and command com to the disk to make it bootable. Finally the switch '/v', labels the disk volume 'spare'. It can be any name up to ten characters.

Goto
(internal)

KemTec 2001-2003

50

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Goto (label) Unconditionally directs MS-DOS to a go to the specified label in a batch program.

Graftabl
(external) Graftabl [(code page)] Graftabl [status] Allows a monitor to display extended ascii characters depending on the country code page.

Graphics
(external) Graphics [printer type][profile] [/b][/r][/lcd][/pb:(id)] [/c][/f][/p(port)] Runs a program that allows a printer to print the displayed screen contents on graphoical non text only screens.Provides a way to print contents of a graphics screen display.

Help
(external) Help [command] [/b][/g][/h][/nohi] Displays information about a dos command similar to this command list.

If
(internal) If [not] errorlevel (number) (command) [parameters] If [not] (string1)==(string2) (command) [parameters] If [not] exist filename (command) [parameters] Specifies that a command should only be carried out if specific conditional operations in a batch file are met.

Install
(internal)

51

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Install=[drive: ][\path]filename [parameters] Used in config.sys to load memory-resident programs into memory.

Join
(external) Join drive: [drive:path] Join drive: [/d] Allows the OS to treat directories and files on a disk drive as the contents of another specified drive and path.

Keyb
(external) Keyb [xx][,][yyy][,][drive:][path]filename [/e][/id:(number)] xx = country code yyy = code page Configures the keyboard for a language other than the USA. (Eg keyb uk)

Label
(external) Label [drive:][volume label] Creates or changes or deletes a volume label for a disk.

Lastdrive
(internal) Lastdrive=(drive letter) Used in config.sys to set the maximum number of drives that can be accessed.

Loadfix
(internal) Loadfix [drive:][path]filename [parameters] Ensures that a program is loaded above the first 64k of conventional memory, and runs the program.

KemTec 2001-2003

52

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Loadhigh
(internal) Loadhigh (lh) [drive:][path]filename [parameters] Loads a program into the upper memory area.

Mem
(external) Mem [/program|/debug|/classify|/free|/module(name)] [/page] Displays amount of installed and available memory, including extended, expanded, and upper memory.

Memmaker
(external) Memmaker [/b][/batch][/session][/swap:d] [/t][/undo][/w:size1,size2] Invokes the memmaker program, to optimise your computer's memory.

Mirror
(external) Mirror [drive:]path [drive:] path [...] Mirror [d1:][d2:][...] [/t(drive)(files)] [/partn][/u][/1] Saves disk information that can be used by unformat and undelete to recover accidentally erased files.

Mkdir
(md) (internal) Mkdir (md) [drive:]path Creates a new subdirectory.

Mode
(external) Mode n

53

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Mode lpt#[:][n][,][m][,][p][retry] Mode [n],m[,t] Mode (displaytype,linetotal) Mode comn[:]baud[,][parity][,][databits][,][stopbits][,][retry] Mode lpt#[:]=comn [retry] Mode con[rate=(number)][delay=(number)] Mode (device) codepage prepare=(codepage) [drive:][path]filename Mode (device) codepage prepare=(codepage list) [drive:][path]filename Mode (device) codepage select=(codepage) Mode (device) codepage [/status] Mode (device) codepage refresh Configures system devices.

More
(external) More < (filename or command) (name)|more Forces a file to be displayed one screen at a time.

Move
(internal) Move [/y|/-y] [drive:][path]filename[,[drive:][path]filename[...]] Destination Moves one or more files to the location you specify. This command is also used to rename directories.

Msav
(external) Msav [drive:] [/s|/c][/r][/a][/l][/n][/p][/f][/video][/mouse] Msav /video Scans system for known viruses.

Msbackup
(external) Msbackup [setupfile] [/bw|/lcd|/mda]

KemTec 2001-2003

54

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Used to backup or restore files from one disk to another.

Mscdex
(external) Mscdex /drive:driver [/drive:driver2. . .] [/e][/k][/s][/v][/l:letter] [/m:number] Used to allow MS-DOS to handle CD players.

Msd
(external) Msd [/b][/i] Msd [/i] [/f[drive:][path]filename [/p[drive:][path]filename [/s[drive:][path]filename Microsoft Diagnostics provides technical information about the system.

Nlsfunc
(external) Nlsfunc [drive:][path]filename National Language Support (NLS). Loads country specific information. Uses the country sys file.

Numlock
(internal) Numlock=on|off Used in the config.sys file to specify the state of the numlock key.

Path
(internal) Path; Path [drive:]path[;][drive:]path[...] Sets or displays a search path for executable files.

55

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Pause
(internal) Pause [comment] Suspends further processing of a batch file until a key is pressed.

Power
(external) Power [adv:max|reg|min]|std|off] Controls power management

Print
(external) Print [/b:(buffersize)] [/drive:(device)] [/m:(maxtick)] [/q:(value] [/s:(timeslice)][/u: (busytick)] [/c][/p][/t] [drive:][path][filename] [...] Used to print a text file.

Prompt
(internal) Prompt [text] [options] Allows you to customize the DOS command prompt.

Rem
(internal) Rem [comment] Used in batch files and in config.sys to insert comments (remarks).

KemTec 2001-2003

56

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Rename (ren)
(internal) Rename (ren) [drive:][path]filename [drive:][path]filename Allows filenames to be renamed.

Replace
(external) Replace [drive:][path]filename [drive:][path] [/a][/p][/r][/s][/u][/w] Places files in the destination directory with files of the same name in the destination directory.

Restore
(external) Restore drive: [drive:][path]filename [/p][/s][/b:mm-dd-yy] [/a:mm-dd-yy][/e:hh:mm:ss] [/l:hh:mm:ss] [/m][/n][/d] Restores files that were backed up previously using the backup command.

Rmdir (rd)
(internal) Rmdir (rd) [drive:]path Deletes a directory after all files and subdirectories have been removed. See Deltree.

Set
(internal) Set (string1)=(string2) Displays, sets or removes, MS-DOS environment variables.

57

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Setver
(external) Setver [drive:]:path][filename (number)][/delete][/quiet] Used to display and modify the DOS version table. It can set the current version of dos to that which a program is designed to run on.

Share
(external) Share [/f:space] [/l:locks] Installs file sharing and file locking, allowing MS-DOS to validate all read and write requests from programs.

Shell
(internal) Shell=[drive:][path]filename [parameters] Used in config.sys to specify the name and location of the command interpreter that DOS should use. I.e. an alternative to command.com can be specified

Shift
(internal) Shift Changes the position of replaceable parameters in batch files.

Sort
(external) Sort [/r][/+n] < (filename) Sort [/r][/+n] > (filename2)

KemTec 2001-2003

58

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Sorts reads input data and sorts and sends the result to the screen or to a file.

Stacks
(internal) Stacks=(number),(size) Used in config.sys to support the dynamic use of stacks to handle hardware interrupts.

Submenu
(internal) Submenu=blockname, [menutext] Used in config.sys to create a multilevel menu from which you can select start-up options.

Subst
(external) Subst drive: drive:path Subst drive: /d Allows a path to be treated as a virtual drive letter.

Switches
(internal) Switches= [/k][/f][/n][/w] Used in config.sys to force an enhanced AT keyboard to behave like a conventional keyboard.

Sys
(external) sys [source] drive: Copies the MS-DOS hidden system files and command.com to the disk in the drive you

59

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

specify.

Time
(internal) Time hh:mm[:ss][.cc][a|p] Displays current time setting of the system clock and provides a way of resetting it.

Tree
(external) Tree [drive:][path] [/a][/f] Graphically displays the directory structure of a path.

Type
(internal) Type [drive:][path]filename Displays the contents of a file.

Undelete
(external) Undelete [drive:][path][filename] [/dt|/ds|/dos] Undelete [/list|/all|/purge[drive:]|/status|/load|/u|/s[drive:]|/tdrive:[-entries]] Restores files deleted with the del (erase) command.

Unformat
(external) Unformat drive: [/j][/l][/test][/partn][/p][/u] Restors a disk erased by the format command.

KemTec 2001-2003

60

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

Ver
(internal) Ver Displays the MS-DOS version number.

Verify
(internal) Verify on|off Verifys a that a recently copied file is saved properly to disk.

Vol
(internal) Vol [drive:] Displays the volume label of a disk.

Vsafe
(external) Vsafe [/option[+|-]...] [/ne][/nx][ax|/cx] [/n][/d][/u] Vsafe is a memory-resident program that continuously monitors your computer for viruses and warns the user if one is found.

Xcopy
(external) Xcopy [drive:][path]filename [drive:][path][filename] [/a][/drive:(date)] [/e][/m][/p][/s][/v] [/w][y\-y] Copies files and directories except hidden files and system files.

61

KemTec 2001-2003

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

NOTE: If you want more information on MS-DOS try the excellent 'Easy Dos' reference site at http://www.easydos.com

KemTec 2001-2003

62

PC Systems Installation and Maintenance APPENDIX E: MS-DOS

63

KemTec 2001-2003

Vous aimerez peut-être aussi