home *** CD-ROM | disk | FTP | other *** search
/ Big Blue Disk 18 / bbd18new.zip / BITS&PCS.TXT < prev    next >
Text File  |  1988-02-02  |  5KB  |  88 lines

  1. |D╔══════════════════╗════════════════════════════════════════════════════════════
  2. |D║ |5The Happy Hacker |D║════════════════════════════════════════════════════════════
  3. |D╚══════════════════╝════════════════════════════════════════════════════════════
  4.  
  5. ^C^1Bits 'N PC's
  6. ^Cby
  7. ^CGeorge Leritte
  8.  
  9.    This month's column is for those who've wondered about what MS-DOS does when
  10. you turn your computer on.  You've probably heard the words "Boot DOS" when
  11. talking about powering up your computer.  "Boot" is short for "bootstrap," which
  12. comes from the phrase "pull yourself up by your bootstraps."  (If you knew that
  13. already, give yourself 3 points.)  Your PC literally does this every time you
  14. turn it on.
  15.  
  16.    There are three major sections of MS-DOS, signified by the files, IO.SYS,
  17. MSDOS.SYS and COMMAND.COM.  (In earlier versions of PC-DOS, the first two files
  18. were named IBMBIO.COM and IBMDOS.COM.)
  19.  
  20.    IO.SYS handles the most basic of system functions like screen display,
  21. printing, keyboard input/output, date and time, and disk input/output.  In most
  22. PC's, the major portion of these functions is located in ROM (read only memory).
  23. That's why it's called ROM-BIOS.  These routines are hardware specific, that is,
  24. each type of machine has its own set of routines, and they are not necessarily
  25. compatible with each other.  For example, the PC-AT and the PC-jr both have
  26. several ROM-BIOS functions not available to the standard PC.  The file IO.SYS is
  27. read from disk and then calls what is known as the MS-DOS kernel, MSDOS.SYS.
  28.  
  29.    The file MSDOS.SYS is really what is known as MS-DOS.  It is a proprietary
  30. program supplied by Microsoft to computer manufacturers.  It provides a group
  31. of functions that are hardware independent.  These functions include file
  32. management, memory management, date and time, and character input and output
  33. and running application programs. This file is read into memory and after
  34. execution, calls the command processor, COMMAND.COM.
  35.  
  36.    COMMAND.COM is your interface to the computer.  It parses and carries out the
  37. commands sent to it by you.  "GO" is the command you entered to begin BIG BLUE
  38. DISK, and was processed by COMMAND.COM, which discovered it to be a batch file
  39. on the disk.
  40.  
  41.    When your computer is turned on, the boot begins at the very high end of the
  42. one megabyte memory space.  It contains a jump instruction to the bootstrap
  43. program in ROM.  On floppy disk systems, this is also in high memory.  On hard
  44. disk systems, this is in the disk controller card ROM.  This bootrap program
  45. reads the first sector of the root directory and checks to see if there is a
  46. copy of the MS-DOS files present.  If the files are there, it loads them into
  47. memory and transfers control to IO.SYS.
  48.  
  49.    IO.SYS is actually two separate sections.  The first is BIOS, which is the
  50. linked set of device drivers for the machine.  The second section is the SYSINIT
  51. module, supplied by Microsoft and linked to the BIOS into the IO.SYS file.
  52. SYSINIT is called by the BIOS initialization section.  It determines the amount
  53. of memory in the system and then relocates itself to high memory.  It then
  54. relocates MSDOS.SYS from its original load location to its final location in
  55. memory.  Then it jumps to the initialization section of MSDOS.
  56.  
  57.    MSDOS initializes its internal tables and work areas, sets up the software
  58. interrupts, and initializes the disk drive parameters, including disk sector
  59. buffer.  The MS-DOS copyright message is displayed and it returns control to
  60. SYSINIT.
  61.  
  62.    SYSINIT now has use of the normal MS-DOS file services and opens the
  63. CONFIG.SYS file if present.  The CONFIG.SYS file contains commands used to
  64. customize your MS-DOS environment.  The most common use of the CONFIG.SYS file
  65. is to add more disk buffers, allow more than the MS-DOS default 8 files to be
  66. open, to install a new console driver (ANSI.SYS), and to change the drive
  67. parameters for one of the disk drives (a 3.5" disk drive).  You can even choose
  68. to have SYSINIT load in your own command processor.  Sysinit now loads in your
  69. command processor (this is also known as a shell, but I don't let anyone with a
  70. glass or a gun near my computer, and without water, I don't see where you can
  71. get a shell.)
  72.  
  73.    COMMAND.COM is broken into three parts, a resident portion, an initialization
  74. portion, and a transient portion.  The resident portion is loaded in lower
  75. memory.  It contains the routines to process breaks, errors, program exits, and
  76. reload the transient portion of itself if necessary.  The initialization section
  77. is loaded above the resident portion.  It processes the AUTOEXEC.BAT file if it
  78. is present and the memory it occupies is released.  The transient portion is
  79. loaded at the high end of memory and its memory can be used by application
  80. programs.  It issues the user prompt, reads commamds from the keyboard or a
  81. batch file and causes them to be executed.  When a program terminates, the
  82. resident portion checks the transient portion and reloads it from disk if
  83. necessary.  (Now you single disk users know why you have to keep inserting a DOS
  84. disk after running some programs.)
  85.  
  86.    That's it for now.  If any of you have specific questions about DOS or about
  87. your systems, send them in and we'll try to answer them in future issues.
  88.