79

Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Embed Size (px)

Citation preview

Page 1: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)
Page 2: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Seminar/Training of Group1

MS-DOS(Microsoft Disk Operating

System)

Page 3: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

MS-DOS HistoryThe history of MS-DOS is surprisingly long. It started off as QDOS

(Quick and Dirty Operating System) which was developed by Seattle Computer Products to run on IBM's new PC. This list is fairly

comprehensive although a number of the more obscure versions of DOS have been omitted.

Version Date Comments

1.0

1981

The original version of MS-DOS. This was a renamed version of QDOS which had been purchased by an upstart company called Microsoft.

1.25 1982 This added support for double-sided disks. Previously the disk had to be turned over to use the other side

2.0 1983 This added support for IBM's 10 MB hard disk, directories and double-density 5.25" floppy disks with capacities of 360 KB

2.11 1983 Support for foreign and extended characters was added.

3.0 1984 Support for high-density (1.2 MB) floppy disks and 32 MB hard disks was added.

3.1 1984 Network support was added.

Page 4: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Version Date Comments

3.3 1987 This release was written to take advantage of IBM's PS/2 computer range. It added support for high density 3.5" floppy disks, more than one partition on hard disks (allowing use of disks bigger than 32 MB) and code pages.

4.0 1988 This version provided XMS support, support for partitions on hard disks up to 2 GB and a graphical shell. It also contained a large number of bugs and many programs refused to run on it.

4.01 1989 The bugs in version 4.0 were fixed.

5.0 1991 This was a major upgrade. It allowed parts of DOS to load itself in the high memory area and certain device drivers and TSRs to run in the unused parts of the upper memory area between 640K and 1024K. This version also added support for IBM's new 2.88 MB floppy disks.

5.0a 1992/3 This was a minor bug fix which dealt with possibly catastrophic problems with UNDELETE and  CHKDSK.

Page 5: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Version Date Comments

6.0 1993 This was a catch-up with Novell's DR-DOS 6. It added a disk-compression utility called DoubleSpace, a basic anti-virus program and a disk defragmenter. It also finally included a MOVE command, an improved backup program, MSBACKUP and multiple boot configurations. Memory management was also improved by the addition of MEMMAKER.

6.2 1993 Extra security was built into DoubleSpace following complaints of data loss. A new disk checker, SCANDISK, was also introduced, as well as improvements to DISKCOPY and SmartDrive.

6.21 1993 Following legal action by Stac Electronics, Microsoft released this version which had DoubleSpace removed. It came with a voucher for an alternative disk compression program.

6.22 1994 Microsoft licenced a disk-compression package called DoubleDisk from VertiSoft Systems and renamed it DriveSpace, which was included in this version.

Page 6: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Version Date Comments

7.0 1995 This version is part of the original version of Windows 95. It provides support for long filenames when Windows is running, but removes a large number of utilities, some of which are on the Windows 95 CD in the \other\oldmsdos directory.

7.1

1997

This version is part of OEM Service Release 2 and later of Windows 95. The main change is support for FAT 32 hard disks, a more efficient and robust way of storing data on large drives.

What is DOS?DOS stands for Disk Operating System. DOS controls the computer’s hardware and provides an environment for programs to run. This system program must always be present when working with your computer.

Page 7: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

When IBM entered the personal computer marketplace in the fall of 1981, responsibility for creating an operating system was subcontracted to a brand new company named Microsoft. The result, MS-DOS was a command-driven operating system that allowed users to issue cryptic, single-line commands through a command interface. MS-DOS quickly became an industry standard and established the financial base on which Bill Gates and Paul Allen built today’s Microsoft. Given the availability of Windows and other easier to use interfaces, MS-DOS is rarely used today, however. Why then bother to learn MS-DOS commands? Basically there are two reasons: 1. Windows and other, more sophisticated operating

systems sometimes do a bit too much for the user, effectively hiding what is really happening in windows.

2. Should your computer fail or become infected with a virus, many utility and virus protection programs include a special recovery diskette. Often, the recovery diskette is designed to boot to MS-DOS and uses MS-DOS commands to support the recovery process.

Page 8: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

3. The default drive and the system prompt are displayed by the operating system. The user responds by typing a command name followed by necessary parameters. A delimiter, usually a space, separates the command from the parameters and (if there are several) the parameters from each other.

Why You Need DOSThere are a variety of reasons why you need DOS. A few of them are listed below to satisfy your curiosity.1. DOS controls the flow of information between you and the computer (translator).2. DOS allows you to store information on your computer.3. DOS allows you to retrieve information stored on your computer.4. DOS interprets and translates the software you have on your computer.5. DOS gives you access to all its function (i.e. saving, copying, and printing files).

Page 9: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Installing MS-DOS When installing MS-DOS, make sure that in the BIOS the the boot disk is set to A: first, then the hard drive (boot sequence: A:, C:) Then insert disk 1 in the A: drive, power up the computer, then follow the on-screen instructions.You must enter the following information:  * time and date * country * the media on which to install the operating system (make sure the drive is accessible and has sufficient free disk space) * the storage folder for MS-DOS files * if the MS-DOS shell should appear on each start-up * if MS-DOS should occupy a single partition taking up the entire hard drive

Page 10: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

The Chapter Tutorial

The introduction to MS-DOS is presented as a tutorial. Do not simply read it. Instead, find a personal computer that runs Windows. MS-DOS error messages tend to be rather cryptic and not very useful. Common mistakes include misspelling a command or file name, failing to type a space between a command and its parameters or between parameters, and adding extra, unnecessary parameters. If you type a command, press enter, and see an error message, simply retype the command after the next MS-DOS prompt.

The easiest and safest way to access MS-DOS through Microsoft Windows is to select the MS-DOS Prompt from the programs menu. Click on the Start button. Then move the mouse pointer to Programs. You should find an entry labeled MS-DOS Prompt check the Accessories submenu under Windows 2000. Click on MS-DOS Prompt and the initial MS-DOS screen (or window) will appear You can boot the system from an MS-DOS system diskette. If you shut down Windows, the third option on the shut down menu is Restart the computer in MS-DOS mode. Stay with the MS-DOS Prompt for now, however.

Page 11: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

MS-DOS Seminar/Training

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

• View the contents of a directory

• Change from one directory to another

• Create and delete directories

• Change from one drive to another

• Copy files

• Rename files

• Delete files

• Format a floppy disk

Page 12: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Common MS-DOS Commands

Page 13: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

ATTRIB displays or changes file attributes

CHDIR or CD

displays the name of the current directory or changes the current directory --- cd < directory name>

CHKDSK checks the status of a disk and displays a status report; it can also fix disk errors

CLS clears the screen

COPY copies one or more files to a destination you specify--- copy <source> <destination>

DEL or ERASE

deletes the files you specify

DELTREIE deletes a directory and all the files and subdirectories that are in it --- del<file>

DIR displays the files and subdirectories that are in the directory you specify --- dir [ name of directory]

Page 14: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

DISKCOPY copies the entire contents of one floppy disk to another floppy disk. It writes over the existing contents of the destination disk as it copies the new information on it.

ECHO displays or hides the text in batch programs when the program is running.

EDIT starts MS-DOS Editor, a text editor you can use to create and edit ASCII text files. --- edit <filename>

EXIT quits the MS-DOS command interpreter and returns to the program that started it, if one exists.

FASTHELP displays a list of all MS-DOS 6 commands and gives a short explanation of each.

FIND searches for a specific string of text in a file or files

FORMAT formats a disk for use with MS-DOS

Page 15: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

HELP starts MS-DOS Help

MKDIR or MD

creates a directory

MEM displays the amount of used and free memory on your computer

MORE displays one screen of output at a time

MOVE moves one or more files to the location you specify--- move <source> <destination>

MSBACKUP backs up or restores one or more files from one disk onto another

MSD Provides technical information about your computer

PRINT prints a text file while you are using other MS-DOS commands

Page 16: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

QBASIC starts MS-DOS Qbasic

RD or RMDIR

deletes a directory

REN changes the name of the file or files you specify--- ren <source> <destination>

SCANDISK starts a disk analysis and repair tool that checks a drive for errors and corrects any problems that it finds.

TREIE graphically displays the structure of a directory

UNDELETE restores files that were deleted previously by using the DEL command

VER displays the MS-DOS version number

XCOPY copies directories , their subdirectories, and files except hidden and system files.

Page 17: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Below is a listing of each of the MS-DOS commands currently listed on Computer Hope and a brief explanation of what each of the commands do.

Aansi.sysNSI.SYSDefines functions that change display graphics, control cursor movement, and reassign keys.

appendCauses MS-DOS to look in other directories when editing a file or running a command.

arpDisplays, adds, and removes arp information from network devices.

assignAssign a drive letter to an alternate letter.

assocView the file associations.

atSchedule a time to execute commands or programs.

Page 18: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

atmadmLists connections and addresses seen by Windows ATM call manager.attribDisplay and change file attributes.batchRecovery console command that executes a series of commands in a file.bootcfgRecovery console command that allows a user to view, modify, and rebuild the boot.inibreakEnable / disable CTRL + C feature.caclsView and modify file ACL’s.callCalls a batch file from another batch file.cdChanges directories.chcpSupplement the International keyboard and character set information.chdirChanges directories.chdskCheck the hard disk drive running FAT for errors.

Page 19: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

chkntfsCheck the hard disk drive running NTFS for errors.choiceSpecify a listing of multiple options within a batch file.clsClears the screen.cmdOpens the command interpreter.colorEasily change the foreground and background color of the MS-DOS window.commandOpens the command interpreter.compCompares files.compactCompresses and uncompress files.controlOpen Control Panel icons from the MS-DOS prompt.convertConvert FAT to NTFS.

Page 20: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

copyCopy one or more files to an alternate location.cttyChange the computers input/output devices.dateView or change the systems date.debugDebug utility to create assembly programs to modify hardware settings.defragRe-arrange the hard disk drive to help with loading programs.delDeletes one or more files.deleteRecovery console command that deletes a file.deltreeDeletes one or more files and/or directories.dirList the contents of one or more directory.disableRecovery console command that disables Windows system services or drivers.

Page 21: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

diskcompCompare a disk with another disk.diskcopyCopy the contents of one disk and place them on another disk.doskeyCommand to view and execute commands that have been run in the past.dosshellA GUI to help with early MS-DOS users.drivparmEnables overwrite of original device drivers.echoDisplays messages and enables and disables echo.editView and edit files.edlinView and edit files.emm386Load extended Memory Manager.enameRecovery console command to enable a disable service or driver.

Page 22: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

fendlocalStops the localization of the environment changes enabled by the set local command.eraseErase files from computer.exitExit from the command interpreter.expandExpand a Microsoft Windows file back to it's original format.extractExtract files from the Microsoft Windows cabinets.fasthelpDisplays a listing of MS-DOS commands and information about them.fcCompare files.fdiskUtility used to create partitions on the hard disk drive.findSearch for text within a file.findstrSearches for a string of text within a file.

Page 23: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

fixbootWrites a new boot sector.fixmbrWrites a new boot record to a disk drive.forBoolean used in batch files.formatCommand to erase and prepare a disk drive.ftpCommand to connect and operate on a FTP erver.ftypeDisplays or modifies file types used in file extension associations.gotoMoves a batch file to a specific label or location.graftablShow extended characters in graphics mode.helpDisplay a listing of commands and brief explanation.ifAllows for batch files to perform conditional processing.

Page 24: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

ifshlp.sys32-bit file manager.ipconfigNetwork command to view network adapter settings and assigned values.keybChange layout of keyboard.labelChange the label of a disk drive.lhLoad a device driver in to high memory.listsvcRecovery console command that displays the services and drivers.loadfixLoad a program above the first 64k.loadhighLoad a device driver in to high memory.lockLock the hard disk drive.logoffLogoff the currently profile using the computer.

Page 25: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

logonRecovery console command to list installations and enable administrator login.mapDisplays the device name of a drive.mdCommand to create a new directory.memDisplay memory on system.mkdirCommand to create a new directory.modeModify the port or display settings.moreDisplay one page at a time.moveMove one or more files from one directory to another directory.msavEarly Microsoft Virus scanner.msdDiagnostics utility.msdexUtility used to load and provide access to the CD-ROM.

Page 26: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

nbtstatDisplays protocol statistics and current TCP/IP connections using NBTnetUpdate, fix, or view the network or network settingsnetshConfigure dynamic and static network information from MS-DOS.netstatDisplay the TCP/IP network protocol statistics and information.nlsfuncLoad country specific information.nslookupLook up an IP address of a domain or host on a network.pathView and modify the computers path location.pathpingView and locate locations of network latency.pauseCommand used in batch files to stop the processing of a command.

Page 27: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

pingTest / send information to another network computer or network device.popdChanges to the directory or network path stored by the pushd command.powerConserve power with computer portables. printPrints data to a printer port.promptView and change the MS-DOS prompt.pushdStores a directory or network path in memory so it can be returned to at any time.qbasicOpen the QBasic.rdRemoves an empty directory.renRenames a file or directory.renameRenames a file or directory.rmdirRemoves an empty directory.

Page 28: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

routeView and configure windows network route tables.runasEnables a user to execute a program on another computer.scandiskRun the scandisk utility.scanregScan registry and recover registry from errors.setChange one variable or string to another. setlocalEnables local environments to be changed without affecting anything else. setverChange MS-DOS version to trick older MS-DOS programs.shareInstalls support for file sharing and locking capabilities. shiftChanges the position of replaceable parameters in a batch program.

Page 29: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

shutdownShutdown the computer from the MS-DOS prompt.smartdrvCreate a disk cache in conventional memory or extended memory.sortSorts the input and displays the output to the screen.startStart a separate window in Windows from the MS-DOS prompt.substSubstitute a folder on your computer for another drive letter. switchesRemove add functions from MS-DOS.sysTransfer system files to disk drive.telnetTelnet to another computer / device from the prompt.TimeView or modify the system time.titleChange the title of their MS-DOS window.

Page 30: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

TracertVisually view a network packets route across a network.treeView a visual tree of the hard disk drive.typeDisplay the contents of a file.undeleteUndelete a file that has been deleted.unformatUnformat a hard disk drive.unlockUnlock a disk drive.verDisplay the version information.verifyEnables or disables the feature to determine if files have been written properly. volDisplays the volume information about the designated drive. xcopyCopy multiple files, directories, and/or drives from one location to another.

Page 31: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Selecting the Default Drive The last line on the screen holds the MS-DOS prompt:

C:\WINDOWS>

The letter C is the current default drive (on most systems, C indicates the hard drive). To the right, the greater than (>) symbol indicates that MS-DOS is waiting for you to enter a command. WINDOWS is the name of the current directory.

Page 32: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Insert a blank diskette into a diskette drive. Then type the letter A followed by a colon; the prompt line should read

C:\WINDOWS>A:Although the sample commands will be typed upper case, you can type MS-DOS commands in either upper case or lower case. A new prompt will appear

A:\>

Drive A is now the default. Make sure the prompt reads A:\> before you move on the next step.

Page 33: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Formatting Diskette

The formatting process writes a pattern of sectors on the disk surface, records a copy of the boot routine on the first sector, initializes second information.The FORMAT command is used to format a disk. The simplest form consists of a single word: FORMAT.Be careful, however, because format is a destructive command. When you format a disk, you lose whatever data might be stored on it.

Caution: If your default drive is a hard drive (for example, drive C), do not, under circumstances, format that disk. You could destroy your system. Before you move on to the next step in this tutorial, make sure your default drive is your diskette drive (usually, drive A). If not, type A: and press the enter key. Even with the default drive set correctly, it is a good idea to specify the target drive as part of your command. For example, type the command

FORMAT A:

Page 34: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

The File SystemThe MS-DOS file system allows a users to identify, save, and retrieve files by name. Note that a program is a type of file.

File NamesA file name is composed of the name itself and an optional extension. The name consists of from 1 to 8 characters. A few file names are reserved by the system, and delimiters may not be used. Otherwise, just about any combination of characters you can type is legal. The file name is separated from its optional, 1 to 3 character extension by a period. Some extensions have a special meaning to the operating system. The extension is sometimes used to identify a version of a program or data file. For example: VITA.1, VITA.2 and so on.

DirectoriesDirectory management is a key function of the MS-DOS file system. The first time a file is written to disk, its name, disk address, creation date, and other information are recorded in the directory. Later, when the file is retrieved, the operating system reads the directory and searches it by name. When a file is modified, the file system updates its directory entry. When the file is deleted, its directory entry is deleted.

Page 35: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

SubdirectoriesWhen a disk is first formatted, a single root directory is created by the format routine. Using a single directory is fine for a few files, but as the number of files increases, distinguishing them becomes increasingly difficult.

For example, imagine a work disk that holds several different types of files. To simplify keeping track of the files, MS-DOS allows the user to create special files called subdirectories.

Path NamesWhen subdirectories are used, you need more than a simple file name to find a file.

For example, it is possible to have files named PAY stored on two different subdirectories. A reference to PAY would does be ambiguous –which PAY do you mean?To fully identify a file you need a complete path name. For example:

\LETTERS\PAYand

\WS\PAYare two different files.

Page 36: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Batch FilesA Batch file is a file of precoded MS-DOS commands. You can assign any file name to a batch file, but the extension must be .BAT. If you type the batch file’s name and press enter. MS-DOS will execute the commands in sequence. For example, a file named AUTOEXEC.BAT is automatically executed each time the system is booted(if such a file exists). Program FilesA program is a special type of file. By convention, executable programs are assigned the extension .COM or .EXE. To load and execute a program, simply type its file name (with or without its extension) as though it was a command. If no extension is given, MS-DOS will look for a command with the specified file name and a .COM extension, then search for a .EXE file, and finally for a .BAT file.

Page 37: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Pipes, Filters, and Redirection

Many MS-DOS commands assume a standard input or output device; for example, the directory command sends its output to the screen. By using redirection parameters the user can change those defaults. For example, the command

DIR>PRN

sends the output directory listing to the printer.

A filter is a special type of command. It accepts input from the standard input device, modifies (or filters) the data in some way, and sends the results to the standard output device. For example, the SORT filter accepts data from the keyboard, sorts the data into alphabetical or numerical sequence, and outputs the sorted data to the screen. You can add redirection parameters to override or change the standard input device, output device, or both.

Try an example. Make sure your diskette is in the drive and type the command

SORT <A:\LETTERS\JIM

Page 38: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Because of the redirection parameter (<), this SORT filter accepts its input from the file named JIM. The output, the lines of text that you typed when you created JIM sorted into alphabetical order, should appear on your screen. For future reference, to sort and store the output on a different file, code something like

SORT<MYFILE>RESULT

Note that both source and destination redirection parameters are included.

The MORE command is another useful filter. It sends output to the terminal one screen at a time. MORE is often used with pipes. A pipe causes one command’s standard output to be used as the standard input to another command. Pipes are designed by a vertical line (|); you will find this character near the top right of most alphanumeric keyboards.

For example, type

C:

Page 39: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

And press enter to make drive C your default drive and WINDOWS your current directory. Then type

DIR

Press enter, and watch the file names scroll by too quickly to read. Now type the command

DIR | MORE

The directory command’s standard output will be routed to the MORE filter rather than directly to the screen. The filter will display one screen and then wait until you press the enter key before it displays the next one.

Try another experiment. Sort the WINDOWS directory and then display it one screen at a time. It’s easy. Just code

DIR|SORT|MORE

And press enter. Not that the file names are displayed one screen at a time in alphabetical order.

Page 40: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Returning to Windows

That completes the chapter tutorial. To return to Windows, type the command

EXIT

And press the enter key.

MS-DOS is a powerful operating system and you have barely scratched the surface of its command language. However, given a clear understanding of the commands in this brief tutorial, you should be able to read a reference manual and determine how to use additional commands on your own. 

Page 41: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Evaluating an Operating SystemIf an operating system is to be a hardware/software interface, it makes sense to design an efficient interface. Thus, on most modern computers, the operating system serves as the primary resource manager, responsible for managing processor time, memory space, registers, input and output devices, secondary storage space, and data and program libraries. A well-designed operating system attempts to optimize the utilization of all the system resources.

Measures of EffectivenessA number of criteria are used to measure a computer systems performance, including: Throughput. Generally, total execution time (for all programs) divided by total elapsed time. Turnaround. The elapsed time between job submission and job completion.Response time. The elapsed time between a request for the computer’s attention and the computer’s response.Availability.Security.Reliability.Cause.Ease of use.

Page 42: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

MS-DOS InternalsMS-DOS was once the world’s most commonly used microcomputer operating system. Although it has been largely supplanted by Microsoft Windows, it still runs under Windows. 

The ShellMS-DOS is command driven. Users request support by typing commands in response to a system prompt. When the return key is pressed, the shell, called COMMAND.COM, interprets the command and calls the appropriate lower level routine or program. COMMAND.COM consists of a program interpreter and a number of resident operating system routines that remain in memory at all times. Other routines are transient and are read into memory on demand. Generally, those routines needed to support an active program are resident.

Page 43: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Accessing PeripheralsThe task of accessing peripheral devices is divided between two operating system modules. IO.SYS is a hardware dependent module that is used physical data transfer commands. This module interacts with the basic input/output system (BIOS) usually implemented in read-only memory.Logical I/O is implemented by a hardware independent module called MSDOS.SYS. MSDOS.SYS accepts logical input/output from application programs or other operating system modules, translates them into physical I/O commands, and passes the physical commands to IO.SYS.Each physical device attached to the computer is described in a special file called a device driver. Character drivers control such devices as the keyboard, the screen and the printer.

Page 44: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Interrupt ProcessingThe interrupt itself consists of an electronic pulse and the address of an interrupt vector. When an interrupt occurs, hardware immediately copies the contents of the IP register to the stack, and loads the specified interrupt vector into the IP register. Once, the interrupt is processed the contents of the stack are copied back into the IP register, and the original program resumes processing.Interrupts are much more common than you might imagine. For example, each time you press a key on the keyboard, an interrupt is generated. In response, the operating system copies a single character into memory and then waits for the next interrupt to herald the arrival of the next character. Hardware response to a software-generated interrupt exactly as if the source had been hardware, copying the IP register to the stack and loading the contents of the specified vector into IP register.

Page 45: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Booting MS-DOSMemory is volatile; it loses its contents when the computer loses power. Consequently, the operating system must be read into memory each time the computer is switched on. Under MS-DOS, the boot routine is stored on the first sector of each disk. Flipping the power switch (or simultaneously pressing CTRL, ALT, and DELETE) causes hardware to read into memory the first sector from the disk in the system drive.The COMMAND.COM modules that immediately follow MSDOS.SYS are resident. Other COMMAND.COM modules are stored at the high end of memory following the transient area.

Page 46: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Running MS-DOSOnce loaded, MS-DOS controls literally everything that happens on the computer. First, COMMAND.COM gets control and, by calling IO.SYS, displays a system prompt on the screen. As the user types a command, each character generates an interrupt. Responding to the interrupt, the operating system reads the character, stores it in memory, and again using IO.SYS, display it. The basic work flow is simple. A prompt is displayed. The user types a command or program name. The appropriate operating system module or application program gets control. As the program runs, the operating system provides support by processing interrupts. Eventually, the module returns control to COMMAND.COM and the process is repeated, again and again, until the machine is shut down. MS-DOS is command driven.

Page 47: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

The File SystemThe MS-DOS file system allows users to identify, save, and retrieve files by name. Note that a program is a type of file.MSDOS.SYS converts logical I/O requests to physical form. One of its responsibilities is directory management. MSDOS.SYS also supports application programs. When a disk file is first opened, MSDOS.SYS asks IO.SYS to read the directory. It then extracts the location of an existing file or creates a directory entry for a one and, if necessary, asks IO.SYS. MSDOS.SYS responsibility is allocating space on disk. Quickly overview a disk format.Disk space allocated in clusters. Each cluster holds 1,024 bytes. The clusters are numbered sequentially with zero and the file allocation table contains an entry for each cluster on the disk.MS-DOS views the data’s word in a disk file as a continuous stream of bytes. Logical I/O operations request data by relative byte. MS-DOS.SYS calls IO.SYS to perform whatever physical input/output operations are necessary to access the requested string. Logically, data on disks are addressed just like data in memory.

Page 48: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Set the Date and TimeMost computers on campus have an internal clock that will automatically set the date and time for you when you turn the computer on. However, if your computer does not have this feature or your computer has two floppy drives, you will need to do the following steps to set the date and time.

Directions:1. Type the date like this: 1-15-972. Press the return key (enter key).3. Type the time like this: 8:464. Press return.5. Notice that the C:\> prompt will appear. DOS marks the date and time on everything you do. It is important to periodically check the date and time if you have an internal clock to see if it is correct. If you have a two floppy system, it is important to enter the correct date and time when you turn the computer on. 

Page 49: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Check the Date and TimeDOS will let you check or change the date and time once it has been set. The procedure to do this is as follows:Directions:1. Type: date and press return.2. If the correct date is displayed, simply press return. If the date is incorrect, type the correct date and press return.3. Type: time and press return.4. If the correct time is displayed, simply press return. If the time is incorrect, type the correct time and press return. Directory CommandThe DIRECTORY command is like a table of contents in a book. This directory will list the following information:· Filenames· File extensions· Size of each file· Date and time the file was last updated.Directions:1. At the C:\> type: dir and press return.2. The list of files will scroll up and off the screen.NOTE: At the end of the listing, there is a line that shows the number of bytes free on the hard drive.

Page 50: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

At first glance, subdirectories may seem to complicate rather than simplify the task of accessing files. In practice, however, people rarely use such lengthy path names. Instead, they select a working directory and allow the operating system to keep track of the subdirectories needed to complete a path name.

Create a File with DOSDirections:1. Type: copy con Eimz.txt and press return.2. Type this message in the following format: Eimanisbeautifuljoke. 3. Press the F6 function key (^Z) and press return.4. DOS gives you a message that 1 File(s) has been copied.5. Type: dir e* and press return.6. Now you can see the list of files beginning with the letter E. 

Page 51: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Manipulating FilesCopy a FileYou can use the COPY command to copy one file to another.Directions:1. Type: copy eimz.txt esheen.txt and press return.2. DOS will tell you one file has been copied.3. Type: dir e* and press return.4. You should have two files listed with different names. NOTE: Filenames cannot be more than eight characters in length. File extensions cannot be more than three characters in length.  Copy a File with a New ExtensionYou can also use the COPY command to copy the file with a different filename extension.Directions:1. Type: copy eimz.txt eimz.jpgand press return.2. Type: dir e* and press return.3. Three files should be listed.

Page 52: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Rename a FileThe RENAME command lets you rename a previous file with a new name.Directions:1. Type: ren eimz.txt esheen.txt and press return.2. Type: dir *.txtand press return.

Page 53: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Scroll Through the Directory ListingWhen you type the DIR command and press return, the files begin to scroll vertically on your screen. If you have a lot of files it is difficult to read each one. By holding down the Control Key (CTRL) and the letter S at the same time, you are able to freeze the listing to view your files. When you are finished, press the spacebar for the list to continue. NOTE: You must return to the C:\> before entering your next command.

  Pause a Directory ListingYou can add a PAUSE command to your directory command which will allow you to view your directory one screen at a time.Directions:1. Type: dir/p and press return.2. The screen freezes after it fills the screen with the files that are listed first in the directory.3. Press the spacebar to continue listing you files.4. Continue to press the spacebar until you return back to the C:\> prompt. 

Page 54: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

View a Wide Listing of FilesWhen you need to quickly view your files, you can add a /W to the directory command. This will display your files into five columns on the screen.Directions:1. Type: dir/w and press return.2. DOS will list only the name of you file and the file extension on the screen. NOTE: Use this command when you are not concerned with looking at the file size or the date it was created.  Recall a DOS CommandThe F3 function key can be used to recall the last DOS command you typed in. If you would like to retrieve a previously entered command, you can also press the up arrow key continuously until you reach the desired command you were looking for. NOTE: You can also type out each letter in your last command by using the right arrow key or the right cursor key. After you use the F3 key to recall a command, you can use the backspace key to edit any part of the command or add to your command.

Page 55: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Check for a Single FileInstead of using the directory command to look for one particular file, you can type the name of the file after the DIR command at the C:\> prompt.Directions:1. Make sure that you are at your C:\> prompt.2. Type: dir format.com (filename.extension) and press return.3. The screen will display a listing of the file or a file not found message.  Check for a Group of FilesThe * symbol is referred to as a wildcard and stands for any character or group of characters.This is helpful when you want to list files that start with a particular letter or group.Directions:1. Type: dir c* and press return.2. All filenames that begin with the letter C will be listed.3. Press the F3 key.4. Backspace twice and replace C* with A* and press return.5. All filenames that begin with the letter A are listed. 

Page 56: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

List Files with the Same ExtensionsYou can also use the wildcard character * to look for a group of files with the same extension.Directions:1. Type: dir *.bat and press return.2. All files with the .bat extension are listed.3. Press the F3 key.4. Backspace three times and replace the .bat extension with the .sys extension and press return.5. All files with the .sys extension should now be listed.  Clear the ScreenWhen the screen get full of information, you may want to clear it. To do this, type CLS at the C:\> prompt and press return.

Page 57: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Rename a Group of FilesWith the wildcard character *, you can also use the RENAME command to change a group of files.Directions:1. Type: ren *.txt *.bob and press return.2. Type: dir *.bob and press return.3. You should have two files listed with a .bob extension.4. Type: dir *.txt and press return.5. There should be no files found with .txtextensions. 

Page 58: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Create a SubdirectoryTo create a subdirectory, you will need to use the MAKE DIRECTORY command, a.k.a.MD. The MD command is useful for organizing files on your hard drive. With subdirectories, you can create and store related files together. For example, one subdirectory could be used to store all word processing files and another for all spreadsheet files.Directions:1. Type: md \info and press return.2. Type: dir *. and press return.3. Notice the *. will list only the subdirectories.  Move to a SubdirectoryOnce you have created a subdirectory, to move to that directory, you will use the CHANGE DIRECTORY command, a.k.a. CD.Directions:1. Type: cd \info and press return.2. Type: cd and press return.3. The name of the directory is listed. 

Page 59: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Move to the Parent DirectoryDOS has a quick way to move from the current directory back to the parent directory.Directions:1. Type: cd.. and press return.2. You will return back to the C:\> prompt.  Copy a File into a SubdirectoryThe COPY command lets you copy files from one directory to another.Directions:1. Type: copy esheen.bob \info and press return.2. Type: dir \info and press return.3. Notice that a copy of Sales.bob is copied into the subdirectory Info. The original file is also in the root directory.

Page 60: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Copy a Group of Files into a SubdirectoryWhen copying a group of files from the root directory into a subdirectory, it is necessary to use the wildcard character * along with the COPY command.Directions:1. Type: copy dawn.* \info and press return.2. DOS will list the files being copied.3. Type: dir \info and press return.4. Three files should be listed in the Info subdirectory.  List Files in a SubdirectoryThe CHANGE DIRECTORY, a.k.a. CD, command will let you list files in your subdirectory from your hard drive.Directions:1. Type: cd \info and press return.2. Type: dir and press return.3. All files in the Info subdirectory are listed.

Page 61: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

List Files in the Root from a SubdirectoryThe DIRECTORY command is also used to get a listing of all the files in the root directory while in a subdirectory. The backslash character \ represents the root directory.Directions:1. Type: dir \ and press return.2. All the files in the root directory are listed.  Select the Directory ListTo look for a specific filename extension, you can use the SELECTED DIRECTORY command.Directions:1. Type: dir \*.bat and press return.2. Only the files with the .bat extensions are listed.3. Press the F3 key.4. Backspace three times.5. Type: sys and press return.6. Now only the files with the .sys extensions are listed.

Page 62: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

List SubdirectoriesDirections:1. Type: dir \*. and press return.2. All the subdirectories are listed.NOTE: The backslash character \ directs DOS to read from the root directory. The *. requests the listing of the subdirectories.  Delete a Single FilePeriodically it is a good idea to delete files from the hard disk which are no longer needed or used. DOS makes it easy to remove these files with the DELETE command, a.k.a. DEL.Directions:1. Type: cd.. and press return.2. The prompt shows you that you are back in the root directory.3. Type: del eimz.bob and press return.4. Type: dir eimz.bob and press return.5. Sales.bob is no longer listed because it has been deleted.

Page 63: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Delete a Group of FilesBy using the wildcard character * you can delete a group of files from your hard drive.Directions:1. Type: del eimz.* and press return.2. Type: dir eimz.* and press return.3. All Quick files have been deleted.  Delete all Files in a SubdirectoryThere are two rules you will need to follow before removing a subdirectory.RULE 1: All files in the subdirectory must be deleted. NOTE: Never type DEL *.* when you are in the root directory. It will destroy all DOS files that are necessary to boot and operate the computer.Directions:1. Type: cd \info and press return.2. Type: dir and press return.4. Type: del *.* and press return.5. DOS will ask you if you are sure? (Y/N)6. Type: Y and press enter.Now your subdirectory is empty.

Page 64: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Remove a SubdirectoryRULE 2: You cannot be in the subdirectory that you wish to remove. You will need to returnto the root directory (C:\> prompt).Directions:1. Type: cd.. and press return.2. You should be back in the root directory.3. Type: rd \info and press return.4. Type: dir *. and press return.5. Notice that the Info subdirectory is no longer listed.

Page 65: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Format a Floppy DiskBefore you can use a disk, you must format it.Directions:1. At the C:\> prompt type: format a:2. The A drive will be the drive that you insert your disk into; hence, the a: after the Format command and press return.3. You will be prompted with the message: "Insert new diskette for drive A: and press enterwhen ready."4. Now insert the disk you wish to format and press return.5. Once this formatting process is done, the following message will appear: "FormatCompleted." Then you will be prompted for a volume label. Simply press return again.6. Now you will be asked if you would like to format another disk (Y/N)? Press N.NOTE: If you receive a message like: "Track 0 bad" or "Disk unusable," your disk may be the wrong capacity. You can get help with this error message by typing:Help Format. 

Page 66: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Change the Default DriveTo change from your hard drive to a floppy drive, you will need to indicate this change as follows:Directions:1. Put a floppy disk into drive A.2. Type: a: and press return.3. Your prompt should change to A:\>4. Type: dir and press return.5. You are now able to see all the files on the floppy.6. To change back to your hard drive, you will need to reverse this procedure.7. Type: c: and press return. Now your prompt should be C:\> 

Page 67: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Diskcopy CommandSometimes there is a need to copy all the files on one floppy diskette to another floppy. First you will need a blank formatted disk (refer to section on formatting disks.)Directions:1. Type: diskcopy a: a: and press return.2. When asked to put in the source disk, put in the diskette that has the information you want to copy into drive A and press return.3. Wait a few seconds. When asked to insert a target disk, take out the diskette from drive A and insert the blank floppy disk and press return.4. Once this process is complete, you will be prompted to write to another duplicate diskette (Y/N). Press N.5. Then you will be prompted to copy another disk (Y/N)? Press N.

NOTE: If your machine has two floppy disk drives, insert the original (source) disk into drive A and the blank (target) disk into drive B. Then type: DISKCOPY A: B:

Page 68: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Copying a File from the Hard Drive to a Floppy DiskSometimes there is a need to copy a file from the hard drive onto a floppy disk. This is helpful if you would like to have an extra copy of a certain file as a backup or to transport the copied file to another computer.

Directions:1. Type: copy <insert filename here> a: and press return.2. Wait for a few seconds, notice the red light on the floppy drive. Never attempt to remove a disk from the disk drive while this red light is on.3. To check to see if the file was copied, type a: at the C:\> prompt and press return.4. Type: dir and press return.

 

Page 69: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Using The ATTRIB Command

The ATTRIB command is used to set file attributes like making a file read-only or make it a hidden file. All the different file attributes is listed below: R      Read-only file attribute.A      Archive file attribute.S      System file attribute.H      Hidden file attribute.

If you are still in the MS-DOS Editor click on "File" and then on "Exit". If you followed along the Command Prompt should currently be "C:\MainDir\SubDir2>". If it is not the case use the CD or CD.. command to change it to "C:\MainDir\SubDir2>". Type Dir at the Command Prompt and make sure that the files "File2.txt" and "File2.dat" are present in this subdirectory. If it is not the case exactly repeat the steps explained in the "Editing Text Files" section.  At the Command Prompt type Attrib +r File2.txt and press the "Enter" key. File2.txt should now be a read-only file. You can test this by typing Dir at the Command Prompt. Both "File2.txt" and "File3.dat" should now be listed. Now type Dir /ar at the Command Prompt and press "Enter". With this command entered like this only read-only files will be listed and you should now only see "File2.txt" listed.

Page 70: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

MS-DOS & Windows command line errors

Page 71: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

A duplicate file name exists, or the file cannot be foundWhen attempting to rename a file, the file does not exist or there is already a file with that name. Verify no other file exists with the same name in the current directory and/or that you're typing the file you wish to rename correctly.

Abort, Retry, Fail?This error is commonly encountered when attempting to read a diskette that is not readable or if no disk or disc in the drive trying to be read. Access deniedOften caused when the file or directory has read-only attributes, is being modified by another person or program on the computer, and/or other network permissions that prevent it from being deleted or modified. Bad command or file nameCommonly caused by a misspelling or error when typing a command and/or when the command attempting to be used is not a valid command for your version of MS-DOS or Windows.

Page 72: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Bad or missing command interpreterThe computer cannot locate the command.com, an important file that that enables the computer to boot into the operating system. This error occurs when you're trying to copy or xcopy all directories and files and that directory also contains the directory you're copying all the files to. If this command were to be allowed it would get into a loop and would never stop copying the same files over and over. When using the xcopy command if you're copying all subdirectories you must copy those files and folders to a completely separate directory or drive.   Divide overflowProgram has attempted to divide something by zero. This error is often caused by an error in the program you're running on your computer. Verify there are no available patches or other updates for the software you're using on your computer.

Page 73: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Duplicate file name or file not foundWhen attempting to rename a file, the file does not exist or there is already a file with that name. Verify no other file exists with the same name in the current directory and/or that you're typing the file you wish to rename correctly. File cannot be copied onto itselfAn attempt to copy a file could not be completed because the file already exists or same source and destination. Copy the file to an alternate drive or directory. File creation errorDirectory could be full because of the DOS limitation of files in one directory, the file already exist, and/or the file was not copied correctly. Try creating or copying the file in a different directory. File not foundThe file you attempted to list, copy, or edit does not exist in the directory you're in. Verify you're in the correct directory and that the file exists in that directory.This error may also occur if you're using a back slash instead of a forward slash for switches on commands. For example, doing dir \p instead of the proper dir /p.

Page 74: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

General FailureAn unknown error has occurred that is not known by MS-DOS. If this is given when trying to read the hard drive, you may need to format the hard drive as it could be failing or already bad. Insufficient disk spaceDisk is full or, if you are trying to copy am file to a disk, the file is too big to fit on the disk. Internal stack overflowThe MS-DOS internal storage areas are full. You may need to go into your config.sys and increase the STACKS=0,0 Invalid directoryThe directory or path you attempted to enter does not exist in the directory or drive you're currently in. Invalid drive specificationThe drive letter you're typing does not exist on the computer.

Page 75: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Invalid file name or file not foundThis error occurs when attempting to rename, copy, or otherwise manipulate a file the file does not exist. Verify you're typing the file you wish to rename correctly. Invalid media, track 0 bad or unusableFormat command cannot format the specified disk or the disk capacity is invalid, or bad disk. Invalid number of parametersWhen the command was typed, something was left out that DOS needed by the command, it was mistyped, or a space was placed where one was not needed.This error commonly occurs when you're typing a directory in the MS-DOS or the Windows command line that has spaces in it. For example using the xcopy command to copy files in the Documents and Settings folder. When typing a directory with spaces in MS-DOS make sure to surround the path with quotes. For example, instead of typing c:\documents and settings type "c:\documents and settings". 

Page 76: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Invalid parameterTyped a command correctly but specified the incorrect parameter, such as format /z. Invalid SwitchThe wrong slash was typed, for example: cd/ instead of cd\. Not ready, reading drive XThe drive letter you're typing does not exist on the computer or there is no disk or disc in the drive. Parse errorThis error occurs when the command you're typing in has invalid syntax. For example, if you're surrounding your path in quotes and leave out the ending quotes. The system cannot find the drive specified.The drive letter you're typing does not exist on the computer. The system cannot find the file specified.This error occurs when attempting to rename, copy, or otherwise manipulate a file the file does not exist. Verify you're typing the file you wish to rename correctly.

Page 77: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

The system cannot find the path specified.The directory or path you attempted to enter does not exist in the directory or drive you're currently in. Write fault errorTried to reroute text to a device that is not connected, is not valid or not hooked up. Write protectTried to write to a disk that is write protected. 

Page 78: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Nahudan, Eiman S.Dacay, Sheena Mae B.

Bernabe, Dawn Denise Saguilabon, Jenny

Engr. Heidee Soliman

O.S. instructor

Page 79: Seminar/Training of Group 1 MS-DOS (Microsoft Disk Operating System)

Fin.