appendixe_ms

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 1

Upload: mahemed-mamoun

Post on 06-Jul-2015

324 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 1/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

MS-DOS

USING MS-DOS.......................................................................................................................2

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

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

HOW TO LEARN DOS COMMANDS.................................................................................6

COMMANDS AVAILABLE IN WINDOWS 95/98/ME/2000............................................7DOS AND WINDOWS TUTORIALS .................................................................................8

MS-DOS 6.22 COMMANDS........................................................................................................................10

WINDOWS 95/98/ME EXTERNAL COMMANDS .................................................................................... .11WINDOWS 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..............................................................................................22The 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-20031

Page 2: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 2/63

 

PC Systems Installation and MaintenanceAPPENDIX 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. Someknowledge 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 properlyfor some reason, you usually get the chance to boot to the command prompt, or into MS-DOSmode. 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 variouscommands to check the system or run DOS based diagnostics software etc.When installing or reinstalling Windows you can boot from the Windows Startup disk andenter 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 tomemory, 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 modeyou can only work with short file names up to eight characters in length. Long file names areshown in truncated form.

If you intend to take certain lead body exams in PC support you may well find somequestions on MS-DOS, so it really is worth making the effort to learn the more usefulcommands and gain some familiarity with the syntax. 1

Some experimenters may be interested in setting up an MS-DOS based system on an old 486or legacy Pentium system purposely to learn MS-DOS. Using an old system like this willallow 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 througha typical MS-DOS installation.

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

KemTec 2001-2003 2

Page 3: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 3/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

THE MS-DOS COMMAND LINE PROCESSOR 

USER INTERFACEThe user interface is what you see and do when you interact with the computer. In generalyou 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 today’s applications asit affords a simple, effective and friendly WIMP 2environment. Menu driven interfaces areoften used for specialist applications where the user can only interact by making selections byclicking specific keys or interacting with a touch screen. In a Command driven interface, theuser interacts by typing commands and data at the keyboard. MS-DOS is inherently acommand driven interface but applications running in that environment can provide a GUIinterface. 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 GUIsystem, 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 calledMYFILES in Windows, you just go into Windows Explorer and left click on the file ‘Sue’ inTEMP and while depressing the left mouse button, drag it to the MYFILES folder, thenrelease 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 that’s required —but until youknow the commands verbatim, it can be very frustrating to use.

2 WIMP stands for Windows, Icons, Menus and Pointing devices.

KemTec 2001-20033

Page 4: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 4/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

COMMAND STRUCTUREMS-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 actionyou want to carry out and its name gives you a clue to its purpose. Some commandshave just a command name. Such as VER which informs you of the version of DOS youare 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 adirectory.

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 andthe 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 forwardslash ‘/’. These allow you to modify the way a command is processed. The classicexample is the Directory command Dir . This allows you to view the contents of adirectory on screen. If you enter dir to view a long directory, the contents will scrollthrough on the screen very quickly and you will only see the contents at the end of thedirectory. 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 /pDir /w

KemTec 2001-2003 4

Page 5: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 5/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 insquare brackets are optional, i.e. the command will work in its basic form withoutentering 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 asthe option "drive:" in the following command list. The colon ‘:’ following the drivedesignator must also be used, it cannot be omitted.  Note: If the parameters you areusing 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 Windows98/ME/2000, a filename can only be eight or less characters long followed by anoptional three character extension. The extension can be used after the filename toidentify 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 mustfollow from the current directory to reach the required parameters. The MS-DOSdirectory structure is really the same as the folder structure in Windows, i.e. directoriesand folders are synonymous.

C:\ (root directory)

DOS Myphotos Mydocs Myprogs Utils

Hols Business Home Office Home (sub directories)

1999 2000 Current Archived

Example 1: The path to the subdirectory 'Mydocs' from the root directory is simplyc:\mydocs.

Example 2: The path to the subdirectory 'Current' from the root directory isc:\Myphotos\Business\Current.

KemTec 2001-20035

Page 6: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 6/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 usethe MS-DOS Help facility. To see the function of each command, simply select it using themouse 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 oldMS-DOS help file installed on your hard drive. However these files are on your Windows95/98.ME Installation CD. Find the OldMS-DOS  directory on your CD. It is usually asubdirectory 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: Go to the MS-DOS command prompt (i.e. click Start , highlight Programs, thenclick MS-DOS Prompt.) (In windows ME this is in the accessories folder)

Step2: At the command line, enter CD d:\tools\oldms-dos where ‘d ‘ is the CD-ROMdrive letter containing your Windows 95/98/ME Installation CD. Then typehelp to run the MS-DOS Help program.

KemTec 2001-2003 6

Page 7: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 7/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 CD-

ROM drive, Windows 95/98/ME/2000 has a subset of MS-DOS commands. 3 These run in theWindows environment from the Command Line. To get help on these commands do thefollowing:

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 typedeltree /? 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 aspace followed by /?.

3 These are listed in table 1, 2 and 3 of this appendix.

KemTec 2001-20037

Page 8: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 8/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

DOS AND WINDOWS TUTORIALSAn 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 onthe Internet. Some of the more notable ones are:

TutordosDos5Quiz.Advanced Dos Quiz (ADQ)Dos6QuizHtutor 

 Note 1: Some of the programs are shareware. They are not free, they are provided for you totry 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*QUIZwhose 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 harddisk or to a floppy disk. Once you have done this, go to the MS-DOS command prompt torun the programs.

If you are running Windows 95 or 98, it is best to reboot the system in MS-DOS mode byclicking on Start, Shut Down and clicking the Restart in MS-DOS mode, option and thenclicking OK.

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

CD A:\TUTORDOS  then press the enter key.

now run the program by typing;

TUTORDOS then press the enter key.

DOS QUIZ PROGRAMSThe DOS QUIZ programs are a great way to test your knowledge and use of MS-DOS onceyou 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 tellyou 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 samename, repeat the above commands substituting the name dos6quiz for tutordos.

KemTec 2001-2003 8

Page 9: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 9/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 inthe 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 giventhat 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 commandRename (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 fileand 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 todelete directories by accident.

If you want to delete whole directories and subdirectories even when files arestill 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-20039

Page 10: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 10/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 moredetailed list see the table at the end of this appendix.

appendassignattrib

 backup break chcpchdir (cd)

chkdsk clscommandcompcopycttydatedebugdel (erase)deltreedir 

diskcompdiskcopydoskeydosshelleditemm386exe2binexitexpandfastopenfcfdisk findfor formatgraftablgraphicshelp

 joinkeyblabelloadhigh (LH)memmirror mkdir (md)

modemorenlsfunc

 path print promptqbasicrecover rename (ren)replacerestore

rmdir (rd)setsetver sharesortsubstsystimetreetypeundeleteunformatver verifyvolxcopy

Table 1

KemTec 2001-2003 10

Page 11: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 11/63

 

PC Systems Installation and MaintenanceAPPENDIX 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\Commandfolder you can see the external commands for yourself. They are listed in the table below.

Attrib.exeCfkdsk.exeChoice.comCmdinit.batCscript.exeCat.exeDebug.exe

Deltree.exeDiskcopy.comDoskey.comEdit.com

Extract.exeFc.exeFdisk.exeFind.exeFormat.comIextract.exeLabel.exe

Mem.exeMode.comMore.comMove.exe

Mscdex.exeScandisk.exeScanreg.exeSort.exeStart.exeSubst.exeSulfnbk.exe

Sys.comXcopy.exeXcopy32.exeXcopy32.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 hiddenfile MS-DOS.sys. The internal commands include the simpler commands that are used on aregular basis in MS-DOS applications and batch files. They cannot be executed from theWindows 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 theRestart in MS-DOS mode option but it does support the MS-DOS prompt.

CallChcpChdir (cd)ClsCopyCttyDateDel

Dir DosDriveparmFcbsMkdir (md)ModePathRename

Rmdir (rd)SetTimeTypeVer VerifyVol

Table 3 Windows 95/98/ME internal commands

KemTec 2001-200311

Page 12: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 12/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 timeand 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 thanCommand.com after running a TSR or after starting the command prompt fromwithin 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 tothe specified directory.

Setlocal Begins localization of environmental variables.

Start Runs a specified program or command in a secondary window and in its ownmemory space.

Title sets the title of the command prompt window.

&& Command following this symbol runs only if the command preceding thesymbol succeeds.

|| Command following this symbol runs only if the command preceding thesymbol 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

COMMAND CHANGED FEATURES

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

KemTec 2001-2003 12

Page 13: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 13/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Del New switches provide many more functions.

Dir New switches provide many more functions.

Diskcomp Switches /1 and /8 are not supported.

Diskcopy Switch /1 is not supported.

Doskey Available for all character-based programs that accept buffered input. Doskeyhas been improved by a series of enhancements.

Format 20.8 MB optical drive supported. Switches /b, /s, and /u are not supported.

Label The symbols ̂ and & can be used in a volume label.

Mode Extensive changes.

More New switches provide many more functions.

Path The %PATH%environment variable appends the current path to a new settingat the command prompt.

Print Switches /b, /c, /m, /p, /q, /s, /t, and /u are not supported.

Prompt New character combinations allow you to add ampersands ($a), parentheses ($cand $f), and spaces ($s) to your prompt.

Recover Recovers files only.

Rmdir New /s switch deletes directories containing files and subdirectories.

Sort Does not require TEMP environment variable. File size is unlimited.

Xcopy 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 REASON FOR RETIRING THEM

Assign Not supported in Windows 2000.

Backup Not currently supported.

Choice Not currently supported.

Ctty Not currently supported.

Dblspace Not supported.

Defrag 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.

Deltree The rmdir /s command deletes directories containing files and subdirectories.

Diskperf Not currently supported.

Dosshell Unnecessary with Windows 2000.

Drvspace The Drvspace program is not currently supported.

Emm386 Unnecessary with Windows 2000.

Fasthelp This MS-DOS 6.0 command is the same as the Windows 2000 command help.Windows 2000 also provides an online command reference.

Fdisk Disk Management prepares hard disks for use with Windows 2000.

Include Multiple configurations of the MS-DOS subsystem are not supported.

Interlnk The Interlnk program is not supported.Intersrv The Intersrv program is not supported.

KemTec 2001-200313

Page 14: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 14/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Join Increased partition size and an improved file system eliminate the need to joindrives.

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 inControl 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-ROMdrives. 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

Page 15: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 15/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 abatch program.

GRAFTABL Enables Windows to display an extended character set in graphicsmode.

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.

KemTec 2001-200315

Page 16: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 16/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 experimentalcomputer this section takes you through a typical MS-DOS installation routine. To do thisyourself 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 andHIGH 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 andFORMAT C:/s commands respectively. In more recent versions of MS-DOS, these chorescan be done automatically.

The following MS-DOS 6.22 installation procedure demonstrates how easy it is to preparethe hard disk and install the OS:

Boot the DOS ‘setup’ disk off the ‘A:’ drive. The MS-DOS 6.22 setup screen is

displayed as shown below:

KemTec 2001-2003 16

Page 17: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 17/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 Setupnow. 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 existingfiles will be affected.

To have Setup configure the space for you, choose therecommended 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

KemTec 2001-200317

Page 18: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 18/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 waitSetup is checking your system configuration.

KemTec 2001-2003 18

Page 19: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 19/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Figure 6 WAIT while the hard drive parameters are read from the CMOS setup memory and the driveis automatically partitioned for MS-DOS. After a few seconds the following screenappears.......

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: 07/13/95 22.55Country: United StatesKeyboard Layout: United States

The settings are correct.

If all the settings are correct, press ENTER.

To change a setting, press the UP or DOWN ARROW keysto select it. Then press ENTER to see alternatives.

KemTec 2001-200319

Page 20: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 20/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 toUnited 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 differentcountries. Choose the character set you want.

P

 

olandPortugal

SpainSwedenSwitzerlandUnited KingdomUnited StatesYugoslavia

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 DOSdirectory, C:/DOS...........

MS-DOS 6.22 Setup

Setup will place your MS-DOS files in the followingdirectory:

C:\DOS

To place MS-DOS files in this directory, press ENTER.

To place MS-DOS files in a different directory, type it’spath and press ENTER.

KemTec 2001-2003 20

Page 21: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 21/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Figure 10

Press ENTER and wait while MS-DOS installs in the C:\DOS directory. You willsubsequently 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 theroot 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.EXECOUNTRY=044,,C:\DOS\COUNTRY.SYSFILES = 30

Typical AUTOEXEC.BAT file

@ECHO OFFPROMPT $P$GPATH C:\DOSSET TEMP=C:\DOSKEYB 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, MS-

 DOS.sys and Command.com and the other part is stored as several individual files in a subdirectory 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 directoryof 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 thedirectory name, thus, [DOS]. 

KemTec 2001-200321

Page 22: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 22/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

C:\> dir 

Volume in drive C has no labelVolume Serial Number is 1D40-4A12Directory of C:\

COMMAND.COM CONFIG.SYS AUTOEXEC.BAT [DOS]

4 file(s) 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. Youcan't see them because they are automatically hidden and made into read-only files to preventthem from being accidentally erased. The three files listed above are crucial DOS files thatcontain part of the system boot-loader program, and part of the DOS command library, the socalled 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 youare 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 in1981, 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 systemsHaving an operating system on disk rather than permanently stored in ROM allows the enduser to update the OS to keep pace with new developments in both hardware and software. Italso 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 namea few, can easily be added to the list of items recognised by the operating system.From the manufacturer’s 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

Page 23: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 23/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

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

The Configuration FilesMS-DOS provides two configuration files named config.sys and autoexec,bat , these areautomatically executed after the system has booted. When a card or peripheral is added to aDOS based PC system, these files are updated with the driver software supplied with thedevice. 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.SYSConfig.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, theseare listed in table 3.1.7.

Device drivers provided with MS-DOS 6.22

ANSI.SYSDISPLAY.SYSDRIVER.SYSEGA.SYS

RAMDRIVE.SYSINTERLNK.EXEPOWER.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 PURPOSEBREAK Enables more frequent checking of the Ctrl-C or control-Break, keys.BUFFERS Sets the number of sector buffers.COUNTRY Allows international time, date, and currency to be set.DEVICE Installs a particular device driver in the system.DRIVPARM Defines parameters for block devices.FCBS Sets the number of  File Control Blocks that can be opened concurrently.FILES Sets the number of files that can be opened at once.LASTDRIVE Sets the maximum number of drives that can be accessed.SHELL Change to a user defined command processor.

STACKS Specifies the no. memory stacks for hardware interrupts.

KemTec 2001-200323

Page 24: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 24/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 awareof config.sys and autoexec.bat files. They are not used on Windows 2000 systems or on newWindows 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 usedcommands are often inserted automatically when new driver software is installed. The moreyou get your hands on older systems, the more quickly you will feel at home using Config.sysand Autoexec.bat.4

The example config.sys file below, shows some of the more widely used commands.

BREAK=ONFILES = 50BUFFERS = 30COUNTRY = 044, , C:\DOS\COUNTRY.SYSDEVICE = C:\DOS\SETVER.EXEDEVICE = C:\MOUSE\MOUSE.SYSLASTDRIVE = 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, theBREAK = 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 MS-DOS 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 is65534. This is achieved when the program executes interrupt 21h, service 67 effectivelyoverriding the config.sys limit of 255.

‘BUFFERS = 30’ allocates a block of memory as a ‘disk buffer’. This allows MS-DOS tohold 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 basedsystem, the use of buffers can increase the performance of disk operations. Many DOS basedword processors insist on a minimum buffer size.

4 Discussed later in this appendix

KemTec 2001-2003 24

Page 25: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 25/63

 

PC Systems Installation and MaintenanceAPPENDIX 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. Acommon 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 itis 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 touse 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 inconfig.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' intomemory. This is contains a list of the DOS version that each program on the disk wasoriginally 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 theapplication 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, thecommand 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 MS-

DOS to communicate with the mouse hardware when required. The disk supplied with themouse 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.sysfile 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 thename. 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 calledmyword.exe, saved in a subdirectory of the apps directory, named wordproc. See thedirectory structure in figure 3.1.

KemTec 2001-200325

Page 26: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 26/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 batchfile 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 DOScopy to Console command (copy con):

copy con word.bat  press enter 

c:\apps\wordproc\ myword  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 mywordnow 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 chosenapplication immediately the system is booted. For example a computer system can be madeto automatically run a wordprocessor program by inserting the path and file name in theautoexec.bat file.

The normal use of autoexec.bat however is to automatically run DOS commands, allowingthe system to be configured as required. It may seem strange that config.sys and autoexec.bat

KemTec 2001-2003 26

Page 27: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 27/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

are both used to configure the system. The reason for this is that autoexec.bat can run normalDOS commands whereas config.sys contains files that can only be read and processed by thehidden DOS boot program called ‘IO.SYS’, when the system is booted.

A simple autoexec.bat file is shown below:

@ECHO OFFPATH C:\;C:\DOS;C:\APPS\WORDPROC;C:\UTILSPROMPT CURRENT DIRECTORY $P$GKEYB 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 processknown 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 directorystructure of figure 13, to run myword.exe in the wordproc directory, instead of using aseparate 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 andautoexec.bat have executed, typing ‘myword’ followed by the  ENTER key, in the rootdirectory 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 thecurrent 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 andtherefore 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 PURPOSE

Call

Echo

Runs a second batch file and then returns to the first one.

ECHO ON displays a message on screen, ECHO OFF stopsmessages being displayed.

KemTec 2001-200327

Page 28: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 28/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

For (in, do)

Goto

If 

Pause

Rem

Shift

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.

Carries out a command or sequence of commands depending onthe logical result of a specified condition.

Stops a batch file from continuing until a key is pressed.

Placed before the text, allows notes (REMarks), to be made abouteach part of a batch program.

Changes the position of replaceable parameters.Table 9

The autoexec.bat file can contain any DOS commands well as the batch processingcommands shown above.

THE MS-DOS BOOT SEQUENCE

  Now we have taken a quick look at the system configuration files, config.sys andautoexec.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

Page 29: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 29/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

(i) Executes ROM based diagnostic routines and sets up programmablehardware devices.

(ii) Checks for system software files on the default drive, namely IO.sys, MS-DOS.sys.

(iii) Loads the hidden files IO.sys and MS-DOS.sys from the default drive into RAM.

(iv) Checks for a CONFIG.SYS file and executes it, if present.

(v) Passes control to COMMAND.COM, a file in the root directory of the defaultdrive.

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

 present, set the on screen prompt

KemTec 2001-200329

Page 30: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 30/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Figure 14 MS-DOS BOOT SEQUENCE 

KemTec 2001-2003 30

Page 31: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 31/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

DOS MEMORY LIMITATIONS

In the first PCs based on the IBM XT, the maximum memory addressing capability of the8086/88 CPU, with its 20 address wires, was 1MB, (220 = 1048576 bytes = 1 MB). The 1MBaddress space was divided up for Application programs, the OS, the BIOS ROM and theVideo Display, as shown in the memory map below.

The bottom 640KB of the address space is known as conventional memory and is used byDOS and DOS Application software. The top 384KB holds the BIOS ROM, graphicsmemory 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 wereshipped 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 increasedsignificantly. The 486 and modern Pentium style CPUs have 32 address wires, so they candirectly address a maximum of 4 Gigabytes of RAM. Unfortunately, even though the PChardware 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 640KBconventional memory limit. The downward compatibility requirement of DOS, until theadvent of Windows 95 and Windows NT, held back the progress of the PC compared to other 

 personal computer systems such as the Apple Mac.

KemTec 2001-200331

Page 32: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 32/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 ExpandedMemory 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 EMS4.0). This allowed all XT and AT PCs fitted with an EMS RAM adapter card, and expandedmemory manager software, to run applications that would normally demand more memorythan the 640KB DOS limit.

EMS uses a technique known as bank switching . Instead of addressing memory contiguouslyas in conventional memory reads and writes, it copies 16KB blocks of memory from the EMSadapter card to a specially reserved area of RAM in the 384KB upper memory area. The16KB 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 RAMcould 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, thesystem 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. Aswell as it's slow performance, application software had to be specifically written for the LIM4.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 nowrun 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 andis 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 moreelaborate scenarios to be incorporated into the software. Such games are still being sold inmost games stores, often at greatly reduced prices.

To install an EMS compatible driver on a PC AT with a 386SX or greater processor, the EMSemulator called EMM386.EXE, supplied with MS-DOS 5.0 or greater, should be used. Thisis 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:

5 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

Page 33: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 33/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

PRODUCING AN EMS BOOT DISK 

To make a DOS bootable floppy disk that will also install 1024KB (1MB) of expandedmemory, using DOS 5 to DOS 6.22, follow these steps:

1. Produce a bootable floppy disk.2. Copy config.sys and autoexec.bat from the root directory of drive C: drive to drive A:.3. Add an extra line into config.sys to enable the EMS driver.4. 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: then press enter.

copy c:\autoexec.bat a: 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.

KemTec 2001-200333

Page 34: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 34/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Insert the new line  DEVICE=C:\DOS\EMM386.EXE 1024 RAM  It must be placed belowthe line DEVICE=C:\DOS\HIMEM.SYS. See the example config.sys file below.

CONFIG.SYSDEVICE=C:\DOS\HIMEM.SYSBUFFERS=30FILES=40DOS=UMBLASTDRIVE=EDOS=HIGHCOUNTRY=044,,C:\DOS\COUNTRY.SYSDEVICE=a:\DOS\EMM386.EXE 1024 RAMDEVICE = C:\DOS\SETVER.EXE

DEVICE = C:\DOS\DISPLAY.SYS CON=(EGA,,1)DEVICE = C:\DOS\ANSI.SYSDEVICE = 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 then press enter.

Exit the editor by typing :

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 theCtrl 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 then press enter.

The DOS mem command lists the current memory configuration.

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

Page 35: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 35/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Memory Type Total = Used + Free

---------------- ------- ------- -------Conventional 640K 23K 617K Upper 187K 81K 106K Reserved 384K 384K 0K  Extended (XMS) 2,885K 217K 2,668K  ---------------- ------- ------- ---------Total memory 4,096K 704K 3,392K 

Total under 1 MB 827K 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) 1,408K (1,441,792 bytes)Free Expanded (EMS)* 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.

KemTec 2001-200335

Page 36: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 36/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 systemthat 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 memorymanagement utilities to MS-DOS-5, and onwards, to support  Extended Memory. This ismemory 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 memoryarea.

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, theavailable memory is divided into areas known as Conventional Memory, Upper memory,High Memory and Extended Memory. This is shown if figure 3.1. 48.

Extended Memory (XMS)

High Memory Area (HMA)

1MBUpper 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

Maximumamount of memoryactuallyinstalled

Page 37: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 37/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 valuableconventional memory space.

The High Memory Area (HMA) is the first 64k of extended memory. Part of DOS can bemade to run from this area by incorporating the DOS=HIGH statement in config.sys therebyfreeing up space in conventional ram.

Extended Memory (XMS) is ram above 1MB including HMA. Applications that use thisarea require extended-memory manager software such as HIMEM provided with DOS 5.0and 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 andDOS 6.x.

DEVICE=C:\DOS\HIMEM.SYSDEVICE=C:\DOS\EMM386.EXE NOEMSBUFFERS=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)

KemTec 2001-200337

Page 38: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 38/63

 

PC Systems Installation and MaintenanceAPPENDIX 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-ROMdrive. 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, theATA-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 thatlinks to the DOS MSCDEX file. A few years back such a disk was always supplied as itallowed the CD-ROM to interface to the underlying DOS environment. Today the secondedition 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 systemusing 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 amanufacturer's disk is usually essential. The manufacturer's device driver can have any filename but it is often named MSCD0001. When the CD-ROM driver is installed, theinstallation 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 theIDE connector and whether to set the CD-ROM as a master or as a slave device. In section 3you 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

Page 39: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 39/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Pentium style motherboards have a Primary and Secondary IDE interface built in. If you areusing such a motherboard, then install the CD-ROM on the secondary interface and set theCDROM 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 motherboardonly has a primary IDE connector – many 386/486 motherboards fall into this category – thenyou must set the CDROM to slave and connect it to the same cable as the hard disk. To dothis you need a ribbon cable fitted with two IDC sockets on one end. See table 10.

Primary Cable Secondary cable Set up

master  slave master slave

CD-ROM 1 CD-ROM, no IDE hard drive

ATA hard disk 

drive

CD-ROM 1

(SLAVE)A hard drive and a CD-ROM on one

cable. Often adopted on 386/486

systems

CD-ROM 1(MASTER)

CD-ROM 2(SLAVE)

Two CD-ROM drives on one cable also

 possible on the secondary cable

ATA hard disk 

drive

CD-ROM 1

(MASTER)Hard drive on cable 1 and a CD-ROM

on cable 2 (The most common

arrangement for Pentium systems)

ATA hard disk 

drive

ATA hard disk 

drive

Two hard drives on one cable

ATA hard disk 

drive

ATA hard disk 

drive

CD-ROM 1

(MASTER)Two hard drives on one cable and a CD-

ROM drive on the second cable

ATA hard disk 

drive

ATA hard disk 

drive

CD-ROM 1

(SLAVE)A hard drive on one cable and another 

hard drive plus a CD-ROM drive on a

second cable

ATA hard disk 

drive

ATA hard disk 

drive

ATA hard disk 

drive

CD-ROM 1

(SLAVE)Two hard drives on one cable and one

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 afile named 'readme.txt' enter the following DOS commands;

KemTec 2001-200339

Page 40: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 40/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

To go to the floppy disk drive type, A: then press enter 

To read the text file type, type readme.txt ¦ more  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 canthen 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:  then press enter ( to access the Floppy disk drive)

install 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 ina 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 CD-ROM drivers.

STEP 2:Reboot the system by pressing the reset button or pressing Ctrl Alt Del If everything is finethe following events take place:

• The system boots, MS-DOS loads the OEM device driver 'MSCD0001' listed inCONFIG.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 thedrive is set up as the D: drive, type :

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

KemTec 2001-2003 40

Page 41: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 41/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 can’t 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.

KemTec 2001-200341

Page 42: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 42/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 dossupplemental 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 seta value for the number of sectors to be read in advance (read-ahead) during data inputoperations.

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

Page 43: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 43/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

Chdir

(internal)

Chdir (cd) [drive:]pathChdir (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).

KemTec 2001-200343

Page 44: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 44/63

 

PC Systems Installation and MaintenanceAPPENDIX 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

Page 45: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 45/63

 

PC Systems Installation and MaintenanceAPPENDIX 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.

KemTec 2001-200345

Page 46: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 46/63

 

PC Systems Installation and MaintenanceAPPENDIX 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

Page 47: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 47/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 theupper 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 canalso 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 optionsl,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.

KemTec 2001-200347

Page 48: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 48/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 toedit 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

Page 49: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 49/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 atthe same time.

Fdisk 

(external)

Fdisk [/status]

Used to partition hard disk drives or safely examine ( status) partition information.

KemTec 2001-200349

Page 50: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 50/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 nameup to ten characters.

Goto

(internal)

KemTec 2001-2003 50

Page 51: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 51/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 nontext 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)

KemTec 2001-200351

Page 52: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 52/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 pageConfigures 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

Page 53: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 53/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 accidentallyerased files.

Mkdir

(md) (internal)

Mkdir (md) [drive:]path

Creates a new subdirectory.

Mode

(external)

Mode n

KemTec 2001-200353

Page 54: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 54/63

 

PC Systems Installation and MaintenanceAPPENDIX 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]filenameMode (device) codepage prepare=(codepage list) [drive:][path]filenameMode (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 renamedirectories.

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

Page 55: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 55/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 sysfile.

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.

KemTec 2001-200355

Page 56: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 56/63

 

PC Systems Installation and MaintenanceAPPENDIX 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

Page 57: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 57/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 destinationdirectory.

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.

KemTec 2001-200357

Page 58: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 58/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 thatwhich 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 requestsfrom programs.

Shell

(internal)

Shell=[drive:][path]filename [parameters]

Used in config.sys to specify the name and location of the command interpreter that DOSshould 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

Page 59: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 59/63

 

PC Systems Installation and MaintenanceAPPENDIX 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:pathSubst 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 conventionalkeyboard.

Sys

(external)

sys [source] drive:

Copies the MS-DOS hidden system files and command.com to the disk in the drive you

KemTec 2001-200359

Page 60: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 60/63

 

PC Systems Installation and MaintenanceAPPENDIX 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

Page 61: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 61/63

 

PC Systems Installation and MaintenanceAPPENDIX 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 virusesand 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.

KemTec 2001-200361

Page 62: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 62/63

 

PC Systems Installation and MaintenanceAPPENDIX 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

Page 63: AppendixE_MS

5/7/2018 AppendixE_MS - slidepdf.com

http://slidepdf.com/reader/full/appendixems 63/63

 

PC Systems Installation and MaintenanceAPPENDIX E: MS-DOS

KemTec 2001-200363