home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Big Blue Disk 18
/
bbd18new.zip
/
BITS&PCS.TXT
< prev
next >
Wrap
Text File
|
1988-02-02
|
5KB
|
88 lines
|D╔══════════════════╗════════════════════════════════════════════════════════════
|D║ |5The Happy Hacker |D║════════════════════════════════════════════════════════════
|D╚══════════════════╝════════════════════════════════════════════════════════════
^C^1Bits 'N PC's
^Cby
^CGeorge Leritte
This month's column is for those who've wondered about what MS-DOS does when
you turn your computer on. You've probably heard the words "Boot DOS" when
talking about powering up your computer. "Boot" is short for "bootstrap," which
comes from the phrase "pull yourself up by your bootstraps." (If you knew that
already, give yourself 3 points.) Your PC literally does this every time you
turn it on.
There are three major sections of MS-DOS, signified by the files, IO.SYS,
MSDOS.SYS and COMMAND.COM. (In earlier versions of PC-DOS, the first two files
were named IBMBIO.COM and IBMDOS.COM.)
IO.SYS handles the most basic of system functions like screen display,
printing, keyboard input/output, date and time, and disk input/output. In most
PC's, the major portion of these functions is located in ROM (read only memory).
That's why it's called ROM-BIOS. These routines are hardware specific, that is,
each type of machine has its own set of routines, and they are not necessarily
compatible with each other. For example, the PC-AT and the PC-jr both have
several ROM-BIOS functions not available to the standard PC. The file IO.SYS is
read from disk and then calls what is known as the MS-DOS kernel, MSDOS.SYS.
The file MSDOS.SYS is really what is known as MS-DOS. It is a proprietary
program supplied by Microsoft to computer manufacturers. It provides a group
of functions that are hardware independent. These functions include file
management, memory management, date and time, and character input and output
and running application programs. This file is read into memory and after
execution, calls the command processor, COMMAND.COM.
COMMAND.COM is your interface to the computer. It parses and carries out the
commands sent to it by you. "GO" is the command you entered to begin BIG BLUE
DISK, and was processed by COMMAND.COM, which discovered it to be a batch file
on the disk.
When your computer is turned on, the boot begins at the very high end of the
one megabyte memory space. It contains a jump instruction to the bootstrap
program in ROM. On floppy disk systems, this is also in high memory. On hard
disk systems, this is in the disk controller card ROM. This bootrap program
reads the first sector of the root directory and checks to see if there is a
copy of the MS-DOS files present. If the files are there, it loads them into
memory and transfers control to IO.SYS.
IO.SYS is actually two separate sections. The first is BIOS, which is the
linked set of device drivers for the machine. The second section is the SYSINIT
module, supplied by Microsoft and linked to the BIOS into the IO.SYS file.
SYSINIT is called by the BIOS initialization section. It determines the amount
of memory in the system and then relocates itself to high memory. It then
relocates MSDOS.SYS from its original load location to its final location in
memory. Then it jumps to the initialization section of MSDOS.
MSDOS initializes its internal tables and work areas, sets up the software
interrupts, and initializes the disk drive parameters, including disk sector
buffer. The MS-DOS copyright message is displayed and it returns control to
SYSINIT.
SYSINIT now has use of the normal MS-DOS file services and opens the
CONFIG.SYS file if present. The CONFIG.SYS file contains commands used to
customize your MS-DOS environment. The most common use of the CONFIG.SYS file
is to add more disk buffers, allow more than the MS-DOS default 8 files to be
open, to install a new console driver (ANSI.SYS), and to change the drive
parameters for one of the disk drives (a 3.5" disk drive). You can even choose
to have SYSINIT load in your own command processor. Sysinit now loads in your
command processor (this is also known as a shell, but I don't let anyone with a
glass or a gun near my computer, and without water, I don't see where you can
get a shell.)
COMMAND.COM is broken into three parts, a resident portion, an initialization
portion, and a transient portion. The resident portion is loaded in lower
memory. It contains the routines to process breaks, errors, program exits, and
reload the transient portion of itself if necessary. The initialization section
is loaded above the resident portion. It processes the AUTOEXEC.BAT file if it
is present and the memory it occupies is released. The transient portion is
loaded at the high end of memory and its memory can be used by application
programs. It issues the user prompt, reads commamds from the keyboard or a
batch file and causes them to be executed. When a program terminates, the
resident portion checks the transient portion and reloads it from disk if
necessary. (Now you single disk users know why you have to keep inserting a DOS
disk after running some programs.)
That's it for now. If any of you have specific questions about DOS or about
your systems, send them in and we'll try to answer them in future issues.