Operating system MS DOS. Determining Anti-Virus program settings. Using MS-DOS Help

Target: Learn to use basic MS-DOS commands.

Equipment: Personal Computer,

Location: Computer class.

Time: 2 hours.

Basic information:

Operating system (OS) MS-DOS is a personal non-network operating system designed for use on IBM-compatible computers.

MS-DOS OS is designed to organize a dialogue with the user, easy access to computer hardware resources and program execution control.

MS-DOS OS is developed by Microsoft Corporation. There are various MS-DOS clones developed by other companies (PC-DOS, DR-DOS, Novell DOS).

Until the mid-90s, MS-DOS was the most common and popular OS for PCs. Now, as a functioning operating system for PCs, MS DOS has become a thing of history, although it has limited use in a number of industrial systems in built-in control computers if there are no strict time requirements, etc.

However, a number of concepts implemented in MS DOS are still basic today. It is from these positions that it is considered in laboratory work.

Main functions of MS-DOS OS:

a) the ability to organize multi-level directories;

b) the ability to work with various peripheral devices using drivers for these devices;

c) automatic allocation of main memory;

d) the ability to run a background task simultaneously with dialogue work user;

d) opportunity batch processing control command data.

MS-DOS OS components:

MS-DOS has three main components: IO.SYS; MSDOS.SYS; COMMAND.COM.

Programs stored in a file IO.SYS (Input/Output), provide information exchange with external devices(input/output operations).

File MSDOS.SYS contains programs that control the operation of floppy drives magnetic disk and programs that allow you to create files. The programs in this file also monitor the use of computer RAM by application programs.

File COMMAND.COM (command interpreter, or command processor) is intended exclusively for the user. It contains all the so-called internal(resident) teams. They are available to the user as long as the file is COMMAND.COM is in the machine's memory.

In addition to these three main files, the operating system contains a varying number of more or less large programs that make up the so-called external teams. They are often called service programs or utilities. They are represented by files like exe or com , are located on the disk and are in the machine's memory only for the time necessary for their execution, therefore, by the time the corresponding command is launched, the disk containing the command must be on the reading device and ready for reading, otherwise an error message will be displayed: Bad command or file name (invalid command or file).



Dialogue with the user:

The user interacts with the system through a set of OS commands in command line. Teams are recruited only if available invitations type:

<drive > > or<drive >:\ > (For example, A > or A:\> ).

The command text follows immediately after the prompt > . Command entry ends by pressing the Enter key.

MS DOS command structure:

<имя команды> < параметры> <ключи>

Parameters are separated by spaces and correspond to command inputs and outputs. The keys determine the operating modes of the command. Each key is preceded by a /. The number and meaning of parameters and keys is determined by the command description.

To stop executing a command, type Ctrl-C or Ctrl-Break.

Ctrl-S combination pauses the output of the command; Pressing it again resumes dispensing.

To get help information about a command, follow the command name with /?.

The principles of working with the command line are the same in different operating systems (for example, in Unix OS). In addition, in a number of rather special but important situations, the use of command line remains relevant and has no alternatives in terms of efficiency (so, first of all, this applies to working with a server on the network).



Correlation between MS-DOS and Windows OS:

All versions of Windows up to Windows versions NT and Windows 95 worked as add-ons on MS-DOS, that is, they were actually more or less colorful graphical user shells. This situation began to change with the release of Windows 3.1 and Windows for Workgroups 3.11. In Windows 95, this process went even further, and everything became exactly the opposite. Now the MS-DOS session is one of many standard applications Windows. This is shown schematically in the figure below.

Files with MS-DOS system programs are located in the Windows OS directories, but starting from Windows 98, if any system functions, then rather due to the historical continuity of the OS.

Why learning MS-DOS remains relevant:

The concepts introduced for working with files, storing them, and file conventions used in MS-DOS are rational, natural, and have remained virtually unchanged. They retained the role of the basic conceptual apparatus.

Leading network operating systems such as Unix, unlike Windows, do not initially have graphical user interface(GUI, Graphic User Interface). Moreover, it is not relevant for system network developments. The principles of constructing commands and working with the command system are the same for MS-DOS and Unix. Having mastered the first, we will create a basis for mastering the second.

Concept plays a huge role file shells(file managers), the most famous of which is Norton Commander for MS-DOS (1986). We can say that its appearance is commensurate with the appearance of MS-DOS and Windows itself. The idea and implementation turned out to be so viable that they remain no less relevant to this day.

This kind of shell exists and is being developed for modern operating systems (NCW, Windows Commander, Far Manager and etc.). Professional programmers clearly give them preference over Windows Explorer. As a result, file shells (heritage of MS-DOS) and specific Windows tools coexist, organically complementing each other.

In professional programming activities there is often a need to launch small information programs, which objectively do not require a graphical interface (even file manager). Such programs include, for example, ipconfig.exe (definition network ip address machines), arp.exe (assigning network cards and addresses), at.exe (assigning a task to be executed), ping.exe (checking the passage of packets on the network), etc. In this case, working with a simple command line is more rational .

In a number network equipment such as programmable switches, routers retained prince command interface, to program such devices you must be able to use the command interface.

Scroll main commands:

ASSOC Displays or changes associations based on file name extensions.

AT Execute commands and run programs on a schedule.

ATTRIB Display and change file attributes.

BREAK Enable/disable the processing mode of the CTRL+C key combination.

CACLS Display/edit access control lists (ACLs) for files.

CALL Call one batch file from another.

1. CD Displays the name or changes the current folder.

CHCP Display or set the active code page.

CHDIR Displays the name or changes the current folder.

CHKDSK Check disk and statistics output.

CHKNTFS Displays or changes whether disk check is performed during boot.

CLS Screen clearing.

CMD Launches another Windows command line interpreter.

COLOR Sets the default text and background color.

COMP Compares the contents of two files or two sets of files.

COMPACT Display/change file compression on NTFS partitions.

CONVERT Converts FAT disk volumes to NTFS. Cannot be completed

converting the current active disk.

2. COPY Copy one or more files to another location.

3. DATE Display or set the current date.

4. DEL Delete one or more files.

5. DIR Displays a list of files and subfolders from the specified folder.

DISKCOMP Compares the contents of two floppy disks.

DISKCOPY Copies the contents of one floppy disk to another.

DOSKEY Editing and re-calling command lines; creating macros.

ECHO Displays messages and switches the display mode of commands on the screen.

ENDLOCAL Ends local environment changes for the batch file.

ERASE Deletes one or more files.

EXIT Exits the CMD.EXE (command line interpreter) program.

FC Compare two files or two sets of files and display the differences between

6. FIND Search for a text string in one or more files.

FINDSTR Searches for strings in files.

FOR Launch the specified command for each of the files in the set.

FORMAT Formatting disk for working with Windows.

FTYPE Display or change the file types used when matching by

file name extensions.

GOTO Transfers control to the marked line in the batch file.

GRAFTABL Allows Windows to display an extended character set in a graphical

HELP Displays help information about Windows commands.

IF Conditional execution statement for commands in a batch file.

LABEL Create, edit, and delete volume labels for disks.

7. MD Create a folder.

8. MKDIR Create a folder.

MODE Configure system devices.

MORE Serial output of data in parts the size of one screen.

MOVE Move one or more files from one folder to another.

PATH Display or set the search path for executable files.

PAUSE Pauses execution of a batch file and displays a message.

POPD Restore the previous value of the current active folder,

saved using the PUSHD command.

9. PRINT Print contents text files.

PROMPT Change the Windows command prompt.

PUSHD Saves the current active folder and moves to another folder.

10. RD Deleting a folder.

RECOVER Recovers readable information from a bad or damaged disk.

11. REM Putting comments in batch files and the CONFIG.SYS file.

12. REN Rename files and folders.

13. RENAME Rename files and folders.

REPLACE Replace files.

14. RMDIR Deletes a folder.

SET List, set, and remove Windows environment variables.

SETLOCAL Start local environment changes for the batch file.

SHIFT Change the contents (shift) of substituted parameters for a batch

SORT Sorting input.

START Start programs or commands in a separate window.

SUBST Matches given path disk name.

15. TIME Display and set the system time.

TITLE Assign a window title for the current interpreter session

CMD.EXE command lines.

16. TREE Graphic display folder structures specified disk or given

17. TYPE Displays the contents of text files.

18. VER Display information about the Windows version.

VERIFY Sets the mode to check whether files are written to the disk correctly.

VOL Output label and serial number disk volumes.

19. XCOPY Copy files and folder tree.

For information about a specific command, type HELP [command name]

Execution order:

On Windows functions system programs MS-DOS is emulated by a corresponding application - this application is called “Command Line”.

1. Start emulation of MS DOS mode. To do this, enter in the command line menu START->RUN CMD command

use the command COMMAND LINE from the START menu->PROGRAMS->STANDARDS

2. Call up help on the list of commands supported by the interpreter. C:\>HELP

3. Write down in the report detailed information about the command corresponding to the number of the computer you are working on.

For example, you are sitting at computer number 5, which means you are writing help on the DIR command in the report.

4. Run the commands below. Write down (draw) the result of executing the commands in a report.

4.1. Create a directory according to the directory tree. (MD- create, CD- go)

4.2. Enter the first level directory.

4.3. Display the contents of the first level directory.

4.4. Clear screen.

4.5. Create and then go to the second level directory.

4.6. Create two additional subdirectories in the current directory.

LEFO\LEV>MD SK1

LEFO\LEV>MD SK2

4.7. Display the contents of a second-level directory.

4.8. Go to the root directory.

LEFO\LEV>CD ..

4.9. Create file PR1.TXT in the first level directory LEFO

COPY CON PR1.TXT

Type your text…..

4.10 Display the contents of the PR1.TXT file on the display screen.

LEFO>TYPE PR1.TXT

4.11. Print the contents of file PR1.TXT.

LEFO>PRINT PR1.TXT/P

4.12. Copy PR1.TXT to LEFO\LEV.

LEFO>COPY PR1.TXT LEV

4.13. Rename file PR1.TXT to file PR1.DAT

LEFO>REN LEV\PR1.TXT PR1.DAT

4.14. Draw the directory tree resulting from the execution of the commands.

4.15 Delete all files and directories you created.

Topic 1.3: System Software

Topic 1.4: Service software and algorithmic basics

Introduction to Economic Informatics

1.3. PC system software

1.3.4. Operating system MS DOS

One of the most common operating systems until the mid-90s was Microsoft's disk operating system MS DOS (Microsoft Disk Operating System).

In modern Windows operating systems, to work with DOS commands, the command line is used, which can be called: Start/Run, enter cmd in the dialog box and click OK. Another way to open the command line is Start/Programs/Accessories/Command Prompt.

Composition of MS DOS

The MS DOS operating system includes the following main modules:

  1. Basic input-output system (BIOS).
  2. Boot Record block.
  3. BIOS expansion module (IO.SIS).
  4. Interrupt processing module (MS DOS.SYS).
  5. Command processor (COMMAND.COM).
  6. driver files, which, after being loaded into memory, ensure the operation of devices such as a mouse, CD-ROM, etc.
  7. OS utilities that perform various service functions (disk formatting, etc.).

Basic BIOS system It is hardware dependent and is located in the PC ROM memory. This part operating system is built into the PC.

It implements the following main functions:

  1. Automatic check hardware components when turning on the PC.
  2. Calling the OS boot block (loading the operating system program into memory occurs in two stages: first, the boot record block is loaded and control is transferred to it, then the remaining modules are transferred using this block).

The Boot Record is a very short program (about 512 bytes) found in the first sector of every DOS disk. Boot Record loads two more OS modules into memory (system files io.sys, msdos.sys), which complete the DOS boot process.

The IO.SIS BIOS extension module is an addition to the BIOS ROM. It configures the OS for a specific PC configuration and allows you to connect new drivers to non-standard I/O devices.

MS DOS.SYS interrupt handling module – implements services related to servicing the file system and input/output operations.

Command processor COMMAND.COM – processes commands entered by the user.

Loading MS DOS

After turning on the power of a computer on which the MS DOS operating system is installed, the following processes automatically occur:

  • PC testing (BIOS runs a set of initial computer testing programs);
  • loading MS DOS (reading the operating system from an external storage device into RAM);
  • MS DOS setup (OS setup is performed using commands written in the config.sys and autoexec.bat files).

After loading the OS, a prompt is displayed on the monitor screen for the user to enter commands, which consists of the disk name and the following symbols:
A:\> or C:\>.

This means that DOS is ready to receive commands.

The DOS prompt contains information about the current drive and the current directory. For example,
A:\>- drive A:, root directory:
C:\windows>- drive C:, windows directory.

The disk that the PC is currently working with is called the current one.

Entering and editing commands

To enter a command, type this command on the keyboard and press Enter. To edit the entered command, you can use the following keys: Backspace, Delete, Ins, Esc, Cursor keys.

General purpose commands:

  • VER – check the OS version (A:\>VER, press Enter);
  • CLS – clear screen (A:\> CLS, press Enter);
  • TIME – check and correct the system clock (A:\>TIME, press Enter);
  • DATA - check and correct the system calendar (A:\> DATA, press Enter).

Basic commands for working with files, directories, disks

Working with files:

  • creating text files: A:\>copy con (file name) – after entering this command, you will need to enter the lines of the file one by one. At the end of each line you need to press Enter key, and after entering the last line, press F6 (or Ctrl +Z) and then Enter. A file with the specified name will appear on the disk;
  • copy file: A:\>copy a:\lesson urok (copy lesson from root directory to the urok directory);
  • delete file: A:\>del less, press Enter;
  • rename: A:\>ren lesson conon, press Enter (the renamed file is conon);
  • displaying the file on the screen: TYPE example: A:\>TYPE prim.1, press Enter;
  • merge (combining files into one) COPY_ full name 1st file + full name of the 2nd file _ full name of the 3rd file, press Enter.

Working with directories:

  • create a directory: A:\>md urok, press Enter;
  • delete directory: A:\>rd urok, press Enter;
  • directory browsing (directory table of contents): A:\>DIR, press Enter;
  • change the current directory: A:\>cd urok, press Enter. We get: A:\urok> (drive A:, directory \urok);
  • going to the root directory: A:\urok>cd .. , press Enter. We get: A:\> (drive A:, root directory);
  • displaying a list of disk directories: A:\>TREE A: /F, press Enter.

Working with disks:

  • moving from disk to disk: C:\ windows >A:, press Enter, we get A:\>;
  • format disks: C:\> format a:, press Enter;
  • specifying a label on the disk: A:\vol, press Enter;
  • reading the label: A:\label, press Enter.

The birth date of the DOS operating system can be considered 1980, when the first development was created, called QDOS. The system became most widespread in 1987 and is still in use today.

DOS: general characteristics

The computer system (operating system) is a program that loads when the personal computer is turned on. It carries out a dialogue with a person, manages the PC and its resources, and launches various programs. Thanks to the operating system, the user can conveniently communicate with PC devices (interface).

The core of the MSDOS system is the MSDOS.SYS and I0.SYS files, which are loaded into memory using the bootloader and are permanently present there. The first file implements high-level core MSDOS services, and the second file complements the basic I/O system.

Processing of commands entered by the user is carried out using a command processor, which is implemented through the COMMAND.COM file, located on the disk along with the kernel. Some commands in DOS, such as DIR, TYPE and others, are executed by the command processor itself. They are called internal teams. Other external commands are carried out using external files, which are loaded into memory and also controlled via COMMAND.COM. After the program has finished running, the processor deletes the program from memory and reports its readiness for further user actions.

External commands that the DOS operating system executes come in the form separate files along with the system. They perform various service actions (formatting, etc.).

An addition to the MSDOS I/O system are device drivers that provide non-standard application existing devices or servicing new ones. These programs are loaded into the PC memory along with the system, and their names are written in a special configuration file CONFIG.SYS. This makes it easier to add new devices without using system MSDOS files.

DOS operating system: basic functions

The main responsibility of the system is to maintain (create, store, delete) files, which are similar to any others and represent a set of data from a specific memory location. During processing, files are loaded into the operating system and this occurs under the control of the system (operating system).

Each file must have a name, which can be complex or simple. The complex name is represented by the file name and its extension. Unlike other systems, more high level(Windows), in MS-DOS the file name can have a maximum of eight characters. The file extension indicates its type or affiliation with a particular program, for example, a data file or a text file.

Of course, compared to Windows, MS DOS is a completely different interface. If in the first system everything necessary tools and all information is graphically presented on the computer screen, then working in the DOS system is more complex and requires special skills and knowledge of commands.

As an interface when working in a DOS system, the user appears with only one command line. And, for example, to load a program or game (supported by this system) you will need to enter several commands.

After the appearance of the Norton Commander program, working in MS-DOS became much easier. Also, the DOS operating system is a single-tasking system and, unlike Windows, does not allow you to work with two or more programs at the same time. However, this system is still in use and allows solving various specific problems. From under DOS, a program is launched to restore information, check memory and solve other “hardware” problems.

MS DOS-- the first operating system for personal computers, which has become widespread. Over time, it was practically replaced by new, modern operating systems, Windows type and Linux, but in a number of cases MS DOS remains convenient and the only one possible for working on a computer (outdated technology, written long ago software and so on.)

Users work with the DOS operating system using the command line, because it does not have its own graphical interface. Many attempts have been made to simplify communication with the system, and the most successful solution was proposed by Peter Norton. Many users associate working in the DOS operating system with its program -- Norton Commander. The NC shell hides from the user many inconveniences that arise when working with the MS DOS file system, for example, such as the need to type commands from the command line. Simplicity and ease of use are what makes NC-type shells popular in our time (these include QDos, PathMinder, XTree, Dos Navigator, Volkov Commander and etc.). Fundamentally different from them graphical shells Windows 3.1 and Windows 3.11. They use the concept of so-called "windows" that can be opened, moved around the screen and closed.

MS DOS uses a file system FAT. One of its disadvantages is the strict restrictions on file and directory names. Name can consist of no more than eight characters. Extension is indicated after the period and consists of no more than three characters. The presence of the extension in the file name is not mandatory, it is added for convenience, since the extension allows you to find out which program created it and the type of content of the file. DOS makes no distinction between lowercase and lowercase letters of the same name. in capital letters. In addition to letters and numbers, the file name and extension can consist of the following characters: -, _, $, #, &, @, !, %, (,), {, }, ", ^ . Examples of file names in MS DOS: doom.exe, referat.doc.

Since MS DOS was created quite a long time ago (it is known how rapidly computers and, as a result, programs for them develop and become obsolete), it does not at all meet the requirements for modern operating systems. It cannot directly use the large amounts of memory installed in modern computers. IN file system only short file names are used (8 characters in the name and 3 in the extension), poorly supported different devices type sound cards, video accelerators, etc.

MS DOS does not implement multitasking at all, i.e. it cannot naturally perform several tasks (running programs) at the same time. Therefore, it cannot be used as the main operating system for full multi-user work on the network. MS DOS does not have any means of control and protection against unauthorized actions of programs and the user, which has led to the appearance of a huge number of so-called viruses.


Let's list some components of the MS DOS operating system. Disk files IO.SYS and MSDOS.SYS (they may be called differently, for example IBMBIO.COM and IBMDOS.COM for PC DOS) are placed in RAM at boot and remain in it permanently. The IO.SYS file is an addition to the basic I/O system, and MSDOS.SYS implements the core high-level operating system services.

Command processor DOS processes commands entered by the user. The command processor is located in disk file COMMAND.COM on the disk from which the operating system boots. Some user commands, such as type, dir or copy, are executed by the shell itself. Such commands are called internal or built-in commands. To execute other (external) user commands, the command processor searches the disks for a program with the appropriate name and, if it finds it, loads it into memory and transfers control to it. At the end of the program, the command processor deletes the program from memory and displays a message indicating that it is ready to execute commands (DOS prompt).

External commands DOS are programs that come with the operating system as separate files. These programs perform maintenance tasks, such as formatting floppy disks (format.com), checking the status of disks (scandisk.exe), etc.

Device Drivers-- This special programs, which complement the DOS I/O system and provide support for new or non-standard use of existing devices. For example, using the DOS driver ramdrive.sys it is possible to work with " electronic disk", i.e. part of the computer's memory, which can be worked with in the same way as with a disk. Drivers are placed in the computer's memory when the operating system boots, their names are indicated in a special file CONFIG.SYS. This scheme makes it easy to add new devices and allows you to this without affecting system files DOS.

The system software of each computer can be divided into two components - operating system (OS) and system software packages. Some of the system programs required by a computer are built into the machine, and specifically into a part of the computer called read-only memory (ROM). ROM programs are read-only. These system programs that monitor, assist and necessary services application programs are called basic input/output system (BIOS). Operating systems are examples of higher-level system programs. operating system - a set of programs that, interacting, jointly manage computer (system) resources and processes that use these resources when executing application programs.

Main OS functions:

Testing (checking the correct functioning) of hardware;

Deciphering and executing commands coming from the user (from the keyboard) or from RAM;

Control of the operation of all devices and computer blocks;

Memory resource allocation;

Providing the ability for several users to work on one computer;

Protection of software from outside influence;

Maintenance of interruptions in hardware operation.

Purpose and characteristics of MS DOS. MS DOS versions; MS DOS composition;

MSDOS – Microsoft Disk Operating System, i.e. disk operating system from Microsoft. operating system MSDOS is the simplest operating system for IBMPC computers. It is used on all junior models of IBMPC and can be used on all older models of computers of the same type.

The first version of MS DOS had much more modest capabilities than modern operating systems. It was single-user, supporting only disk drives, a keyboard, and an alphanumeric display. But it was compact, had rather modest requirements and performed the necessary minimum functions for users and programs. Over time, many changes were made to MS DOS:

Support for new devices (hard drive, CDs, extended memory, etc.) was added, and the ability to support any other devices using software drivers was also provided;

Hierarchical support included file structure on floppy disks and hard drives;

Support for national keyboards and alphabets is provided;

Numerous new user features are included.

MS DOS remained a single-tasking OS;

It turned out to be impossible to build into MS DOS reliable means for protecting data from unauthorized access and organizing collective work with data;

DOS programs can only be executed within the first MB of memory, and the rest of the memory can only be used for data storage.

OVERVIEW OF MS DOS VERSIONS

Versions 1.x : Very similar to OS CP/M. Only single-sided floppy disk format with a memory capacity of 160 KB (8 sectors, 40 tracks, sector size 512 bytes) was supported. Starting with version 1.25 (PC DOS 1.0), which appeared in May 1982, a double-sided floppy disk format with a memory capacity of 320 KB was introduced.

Versions 2.x : March, 1983 Additional features: working with hard drives (HDD); hierarchical file system structure; I/O redirection tools (borrowed from UNIX); the concept of installable peripheral device drivers, which made it possible to quickly adapt the OS to various hardware configurations; 360 KB floppy disk format (9 sectors, 40 tracks, sector size 512 bytes)

Versions 3.x : August, 1984 Additional features: 1.2 MB floppy disk format,

3.5" floppy disks (720 KB format) (starting from version 3.2), partitioning the HDD into logical disks (up to 32 MB in size), which made it possible to use HDDs larger than 32 MB in size, improved support for national character sets. Support for computer networks (weak , starting from version 3.1), commands (programs): LABEL, ATTRIB, commands (programs): XCOPY, REPLACE (starting from version 3.3),

MS DOS 3.3 is by far the most widely used on the IBM PC XT and the IBM PC AT-286 with a memory capacity of no more than 640 KB.

Versions 4.x : November, 1988 Additional features: support for graphic Video Adapters EGA, VGA, logical disk capacity - more than 32 MB, support for the LIM / EMS standard, which allowed certain parts of MS DOS to be loaded into additional memory,

Dos-Shell shell program. Despite this, MS DOS versions 4.x are not widely used.

Version 5.0 : July, 1991 Additional features: efficient use RAM, additional utility programs, the ability to load the MS DOS kernel into HMA memory (High Memory Area) on the IBM PC AT-286 and higher, the ability to load peripheral device drivers into UMB memory on the IBM PC AT-386 and higher,

up to 620 KB of address space (0-640 KB) of RAM is allocated for application programs,

HDD support up to 2 GB, 2.88 MB format for 3.5" floppy disks

Version 6.0 : March, 1993 Additional features: efficient use of RAM, additional utility programs, software for optimizing the file system on logical disks (DEFRAG), commands (programs) that have lost their relevance have been removed, special. MEMMAKER program - optimization of the location of resident programs in RAM, multi-configuration files ONFIG.sys, virus protection system (weak), increasing available disk space (DoubleSpace),

means for regulating PC power consumption (LapTop, NoteBook)

Version 6.2 : October, 1993. All improvements are in the area of ​​increasing the reliability of working with data at the file system level. Additional features: increased efficiency of existing commands (programs), CD-ROM caching, rejection of DoubleSpace without loss of information, identification and bypass of physical defects of HDD and FDD, identification and elimination of defects in the file system, including “compressed” DoubleSpace, step-by-step execution of any *.bat file, including AutoExec.bat,

What does the MS-DOS operating system consist of?

The MS-DOS operating system consists of many different files. They include the actual operating system files IO.SYS, MSDOS.SYS and the command processor COMMAND.COM. In addition to these three files, which represent a working MS-DOS kernel, the operating system distribution includes files of so-called external commands, for example FORMAT, FDISK, SYS, drivers for various devices and some other files.

The IO.SYS file contains the extension basic system input/output and is used by the operating system to interact with the computer hardware and BIOS.

The MSDOS.SYS file is in a sense a set of interrupt handling programs, in particular the INT 21H interrupt.

The COMMAND.COM command processor is designed to organize a dialogue with the computer user. It analyzes commands entered by the user and organizes their execution. So called internal teams- DIR, COPY, etc. are processed by the command processor.

The remaining operating system commands are called external commands. External commands are so named because they are located in separate files. Operating system external command files contain utility programs for performing a variety of operations, such as formatting disks, sorting files, and printing texts.

Drivers (usually files with the extension SYS or EXE) are programs that support various hardware. The use of drivers easily solves the problems of using new equipment - just connect the appropriate driver to the operating system.

Application programs interact with the device through the driver, so they will not change when the hardware changes. For example, new disk device may have a different number of tracks and sectors, different control commands. All this is taken into account by the driver, and the application program will work with the new disk as before, using DOS interrupts.

The operating system files IO.SYS, MSDOS.SYS and COMMAND.COM must be written to a specific location on the disk. They do not need to be copied to other directories on the disk.

The loading process is carried out as follows. First, the system start record is loaded into memory, then the system files IO.SYS, MSDOS.SYS and COMMAND.COM.

When the machine is turned on (or the system is restarted), control is transferred to the ROM program (memory read only). The program checks the correct structure of the operating system startup record on the system disk. If the entry is found and does not contain errors, then it is loaded into memory and receives control.

The start entry checks whether the IO.SYS and MSDOS.SYS files are the first files on the disk. If the test result is positive, then the files are loaded into memory, and the free section with the lowest address is selected. Control is then transferred to the initialization module of the IO.SYS file. If the files are written in a different location or are not on the disk, a message appears on the screen:

Non system disk Replace and press any key

The initializing module transfers control to the MSDOS.SYS file, which determines the initial parameters of the disk buffer and data control block area used during execution service programs. File programs also determine the status and initialize the computer's electronic equipment. After this, control returns to the initializing module IO.SYS.

The initializing module checks for the presence of the CONFIG.SYS file in the root directory of the system disk. If a file is found and contains data about available drives, then the specified drives are stored in memory.

Files One of the main responsibilities of MS-DOS is the maintenance (storage, creation, destruction, etc.) of files. A file in MS-DOS is similar to any file. This is a set of interrelated data located in a specially designated place. Unlike ordinary documents stored in special archive folders or safes, MS-DOS files are stored on disks. When a file is processed, it is loaded into the machine's RAM. Both loading into memory and storing files are functions of the operating system.

File identification Every file in MS-DOS must have a name. The file name can be simple or complex. A complex name consists of a base (simple) name and an extension. The file is recognized by the operating system by its name. The names of some files, for example those on the system floppy disk, are predefined. They are reserved by the operating system. The names of the remaining files are assigned by the user. Usually they try to come up with a name that reflects the purpose of the information inside the file. The extension is used to indicate the type of file, for example, text or data file. It can also serve to identify files with information similar in meaning, for example, to differentiate files with personal and business correspondence. When a file is written to disk, its name is automatically placed in an area of ​​disk memory called a directory (or directory).

File serving in MSDOS The file management system in MS-DOS is built on the use of directory (or directory) data on the disk. A directory is an area of ​​memory on a disk that is allocated during the formatting process. A directory is a table where data about files stored on disk is entered. Each file in the directory corresponds to one entry. The directory entry includes the following information: the full name of the file (name and extension), the date and time of its creation or last modification, the amount of memory occupied in bytes, as well as some additional information used when servicing the file by the operating system .

Tracks and sectors In order for data to be written to a disk, its surface must be structured - i.e. divided into sectors and tracks. TRACKS are concentric circles covering the surface of the disk. The track closest to the edge of the disk is assigned the number 0, the next one - 1, etc. If the floppy disk is double-sided, then both of its sides are numbered. The number of the first side is 0, the number of the second is 1.

Each track is divided into sections called sectors. Sectors are also assigned numbers. The first sector on the track is assigned the number 1, the second - 2, etc. Typically a sector takes up 512 bytes.

Hard disks A hard drive consists of one or more round platters. Both surfaces of the plate are used to store information. Each surface is divided into tracks, the tracks, in turn, into sectors. Tracks of equal radius form a cylinder. Thus, all zero tracks make up cylinder number zero, tracks number 1 make up cylinder number 1, etc.

File and directory allocation table The FORMAT command creates a file allocation table (FAT) and disk directories. Both of these structures are closely related to the organization of access to files. There are two copies of FAT on each drive. This table is of exceptional importance when serving files, so if the first copy of FAT is lost, the system gains access to the second.

On a standard floppy disk with 8 sectors per track, FAT occupies 1 sector. On a standard floppy disk with 9 sectors, 2 sectors are allocated per track for the table.

Directory structure A directory is a table describing the contents of a disk. Each file in the table corresponds to one entry. A record occupies 32 bytes, divided into 8 sections or fields. Each field records information used by the system when servicing the file.

System file maintenance MS-DOS provides two file serving technologies. The first was developed during the creation of versions 1.X. This technology is based on the use of data structures called file control blocks (FCB). At that time, the vast majority of computers ran the CPM operating system. FCB blocks provided compatibility MS-DOS files with the files of this system. During the development of MS-DOS versions 2.X, when a hierarchical file organization structure was proposed, a second technology for maintaining them was developed. It is based on the use of references to the file control record and does not require the organization of an FCB. After this technology was tested in the operating room UNIX system, it has become widespread.

Memory organization

Memory consists of large quantity separate elements, each of which is designed to store a minimum unit of information - 1 byte. Each element has a unique numeric address. The first element is assigned address 0, the second - 1, etc., including the last element, whose address is determined by the total number of memory elements minus one. Typically, the address is specified by a hexadecimal number (in the text, hexadecimal numbers are marked with a capital “H”, for example, 10H).

Segments A computer's processor (CPU) divides memory into blocks called segments. Each segment occupies 64 K and each segment has a unique numeric address. The processor has four segment registers. A register is an internal structure designed to store information. Segment registers are designed to store the addresses of individual segments. They are called CS (Code Segment), DS (Data Segment), SS (Stack Segment) and ES (Spare Segment). In addition to those indicated, the processor has 9 more registers. At this point, the IP (instruction pointer) and SP (stack pointer) registers should be noted. The CS and IP registers paired together make up the long address of the instruction that will be executed next. The SS and SP registers in pairs make up the long stack address.

Memory access Access to memory cells is carried out by connecting the contents of a segment register with the contents of one or another register. In this way, the address of the required memory area is determined. For example, the address of the next instruction is determined by the contents of the CS and IP registers (written “CS:IP”). After a command is executed and removed from memory, the contents of IP are changed so that the CS:IP registers contain the address of the command that will be executed after this one. The method of combining registers to determine the address of a memory cell does not impose restrictions on the amount of available memory. The upper limit depends on the physical structure of the memory (i.e., the total number of cells). First MS-DOS versions developed for the Intel 8088 CPU. Each register of this processor is designed to store a 16-bit number. That is, the 8088 CPU combines the contents of a segment register (say CS) with the contents of another register (say IP) to produce a 20-bit memory address, which limits available memory up to 2xx20 bytes or 1 MB. Later, improved versions of MS-DOS appeared and, accordingly, improved CPU processors 80286 and 80386, allowing access to cells located beyond the boundaries of the first MB of memory. However, the 1 MB limit has not yet been overcome (at least in version 3.3), which is one of the main disadvantages of the operating system.

Memory access is organized by connecting the contents of one of the segment registers with the contents of one of the remaining registers. The value of the segment register is called the segment address. The value of the remaining registers in this case is called the relative address of the memory cell (from the beginning of the segment) or its short address. Thus, the byte address is calculated by multiplying the segment address by 16, and adding the short address to the resulting value.

Segment registers Segment registers are used to identify a memory segment. A segment is a contiguous block of memory, 64 K long. Segment registers are used in combination with a pointer register or index registers and in this case identify a specific memory cell.

There are four segment registers in total. The CS register is usually used to identify the memory block in which the program code is stored. The DS register identifies the memory area in which the data of this program is located. The SS register is used to organize access to the stack. (A stack is a temporarily distributed memory area that provides the “MS-DOS-application program” interface). Register ES - additional (or spare) segment register. It is assigned a variety of functions, some of which are discussed below.

Stack registers There are two stack registers. They are used in combination with the SS register and determine the location of the stack. The SP register is called the start of stack pointer, and in combination with the SS register identifies the first byte of the stack. The BP register is called the stack base pointer and, in combination with the SS register, identifies the last byte of the stack.

Index registers There are also two index registers. The SI and DI registers are used in combination with one of the segment registers and determine the location of a specific memory cell. The SI register is usually combined with the DS register, the DI register with the ES register.

General purpose registers General purpose registers include registers AX, BX, CX and DX (there are four of them). These are multifunctional registers.

The IP instruction pointer register is usually used in combination with the CS register and specifies the address of the next instruction.

Status flag register

The flags register usually contains nine processor status flags (each flag occupies 1 bit). These flags determine the result of specific operations performed under MS-DOS. Memory Registers A memory register contains 2 bytes of data (or 16 bits). In reality, general-purpose registers are single-byte. Thus, the AX register includes the AH register (which makes up the high byte of the AX register) and the AL register (which makes up the low byte of the AX register). Similarly, the BH, BL, CH, CL, DH and DL registers are single-byte.

MSDOS Drivers The two most important components of a computer's electronic hardware are its central processing unit (CPU) and its memory. The remaining components (disk drives, keyboard, displays, printers, etc.) are external to the computer. These external components of electronic equipment are called PERIPHERAL DEVICES or simply DEVICES.

The connection between the machine and the peripheral device is carried out in a strictly defined order. Each peripheral device in the operating system has a corresponding program that is responsible for its contact with the computer. These programs are called DRIVERS.

Application of drivers One of the main functions of the operating system is to provide a group of functional drivers available to system and application programs. If a running program needs contact with a peripheral device, it tells the operating system which device it needs, and MS-DOS provides it with the appropriate driver.

Character-by-character and block-by-block data transmission devices Character-by-character data transmission devices transmit information one character at a time. These devices include serial and parallel adapter ports and displays. In MS-DOS, each of these devices has a specific name (name). The MS-DOS driver can control only one character-by-character device. Block-by-block data transmission devices send information across blocks. Each block is typically 512 bytes. These devices include disk drives for floppy disks, hard disk drives and other storage devices. Block transfer devices do not have a specific name. The MS-DOS driver can serve several devices block by block

Interrupts An interrupt is a signal coming from software programs or generated by electronic equipment. An interrupt signal alerts the processor (CPU) to perform certain functions. For example, when you press any key, an interrupt signal is generated from the keyboard (i.e., from the electronic equipment), warning the processor about entering data from the keyboard.

Each type of interrupt corresponds to a specific serial number (a keyboard interrupt, for example, is designated number 9). Using this number, the processor distinguishes which handler needs to be called to process the interrupt signal. By convention, interrupt numbers are presented in hexadecimal format.

Interrupts numbered 20Н-2FH are reserved for system use. This means that application programs designed to interact with the system software can access these interrupts only in special cases that are defined by the operating system. Most often, the 21H interrupt is used programmatically - the function manager.

Function Manager Interrupt 21H is called “function manager”. The function manager is responsible for doing most of the work in MS-DOS. His responsibilities include providing access to system functions. Each function performs a specific task, such as opening a file, displaying a character string on the display screen, allocating a block of memory, or displaying the running version of MS-DOS. The functions are also differentiated by numbers.

To programmatically access a system function, you must do the following: (1) write the number of the corresponding function in the AN register; (2) write the parameters necessary for the function to operate in the appropriate registers; (3) cause interruption of 21H. When accessing interrupt 21H, control is transferred to MS-DOS. The operating system uses the value of the AH register to determine which function should be executed. Then the parameter values ​​are read from the remaining (completely defined for each function) registers, after which the required function is executed. MS-DOS places the parameters returned by the function into the appropriate registers and returns control to the calling program. The program looks at the registers and analyzes the result of the function.

Reserved functions Some functions are marked as “reserved for system use.” These functions are used by the operating system, but IBM and Microsoft refuse to consider them in the official literature. Thanks to the efforts of programmers, the purpose of some of them became known. Users who use these functions often refer to them as “officially undocumented” rather than “reserved”.

Error code Many functions of MS-DOS versions set the current processor flag and return an error code in the AX register if an error occurred while calling the function. From special tables you can find out the cause of the error.

The concept of system, current and logical disks; DOS prompt.

Logical drive or volume (English volume) - Part long-term memory computer, considered as a single whole for ease of use.

When DOS is ready to interact with the user, it displays invitation, for example A> or C:\>. This means that DOS is ready to receive commands. When the user is interacting with a program other than DOS, then there is no DOS prompt. However, most programs communicate with the user not using commands, but through menus, requests, pressing certain key combinations, etc. The DOS prompt usually contains information about the current directory. But sometimes it also includes information about the current time of day. You can change the invitation type using DOS commands Prompt.

The concept of the DOS kernel, the main functions of kernel modules;

The MS DOS kernel implements the MS DOS system, it is a special program supplied by Microsoft, which includes a set of hardware-independent utility programs called system functions. These include: 1. File and record management. 2. Memory management. 3. Character-oriented input/output device. 4. Generation of other tasks. 5. Access to real time clock. The MS DOS kernel is read into memory during system initialization from the MSDOS.SYS file located on the boot disk; this file is distinguished by the hidden and system attributes.

Purpose of files config.sys And autoexec.bat;

The config.sys and autoexec.bat files play a major role in establishing the DOS configuration. When DOS boots, it reads the config.sys and autoexec.bat files from the root directory of the boot disk and executes the commands contained there. The config.sys file is a text file that contains special commands for setting up the DOS configuration: connecting various drivers, determining the size of the DOS system tables, etc. The commands specified in the config.sys file are executed during the DOS boot process.

When the config.sys file completes, the autoexec.bat command file is automatically executed if it exists in the root directory of the boot disk. As a rule, the autoexec.bat file contains commands for launching resident programs and other programs that are advisable to run every time DOS boots, as well as commands for setting DOS environment variables, specifying the list of directories in which programs to be launched are searched, and setting the DOS prompt format.