home *** CD-ROM | disk | FTP | other *** search
/ Explore the World of Soft…ids, Adults, Educational / RocelcoInc-ExploreTheWorldOfSoftware-KidsAdultsEducational-Vol2-Shareware.iso / educate / disk160 / config.tut next >
Encoding:
Text File  |  1989-04-03  |  33.9 KB  |  753 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                  Your CONFIG.SYS and AUTOEXEC.BAT
  7.  
  8.                             Barry Simon
  9.  
  10.  
  11.  
  12. Copyright (c) 1989, by Barry Simon
  13.  
  14. Written expressly for and posted on Compuserve's IBM Forum.  May
  15. only be reproduced commercially with the author's permission.  May
  16. only be distributed with this copyright notice intact.
  17.  
  18.  
  19.                            Introduction
  20.  
  21.  
  22. During the startup of an IBM or IBM compatible computer, the
  23. operating system looks for two files of user supplied commands
  24. which allow you to customize your system in various ways.  This
  25. article will attempt to explain some of the options available to
  26. you when you make these basic files.  While I have written it for
  27. the relative novice, I hope it may provide some useful new tricks
  28. even to the more experienced user.
  29.  
  30.  
  31. These two files whose names must be CONFIG.SYS and AUTOEXEC.BAT
  32. should reside in the root directory of your boot diskette or of
  33. your hard disk if you have a bootable hard disk (i.e. if you can
  34. start your system from your hard disk without placing a diskette
  35. in drive A).  Actually, there is a method for placing the
  36. AUTOEXEC.BAT file in a subdirectory but despite the fact that I
  37. tend to be fanatical about keeping my root directory lean, I don't
  38. recommend using this option.
  39.  
  40.  
  41. When you turn on your computer, the CPU is setup to begin a
  42. program in the ROM (read only memory) that all IBM compatible
  43. machines have.  This ROM is distinct from and in addition to the
  44. working RAM (random access memory).  When you are sold a machine
  45. with 256K of memory, that figure refers to the RAM.  There is an
  46. additional 16K-32K of ROM.  RAM is cleared whenever you turn off
  47. your machine or reboot while the ROM is permanently burned in and
  48. should not change.
  49.  
  50.  
  51.  
  52.  
  53.                           Booting Up
  54.  
  55.  
  56. The program that is automatically run from ROM begins with a brief
  57. test (POST="power on self test") of various components of your
  58. computer.  If you have an XT or AT, the most noticeable part is the
  59. memory(RAM) test accompanied by counting up the memory on your
  60. screen as the test progresses.  This test is skipped when you do a
  61. warm reboot by hitting Ctrl-Alt-Del.  You may also notice your
  62. drives and printer "burping" as they get tested.
  63.  
  64.  
  65. After this test, the machine searches for various "ROM extensions"
  66. that is additional ROM that can come with a hard disk or EGA card
  67. for example.  The program then searches first drive A and then a
  68. hard disk if you have a bootable hard disk for a diskette or disk
  69. program to transfer control to.  It transfers control to the very
  70. first sector on the disk which is called the boot sector.  When
  71. you format a diskette, a little program is placed in the boot
  72. sector which will display the message "non system disk, replace
  73. and hit any key".  When you transfer the operating system to the
  74. disk with the SYS command or via FORMAT/S, this boot sector
  75. program is changed to transfer control to a program which must be
  76. in the position immediately following the boot sector.
  77.  
  78.  
  79. If the disk has the system on it, control is transferred
  80. successively to two hidden files which load the BIOS ("basic
  81. input/output system" part of which is in ROM) and the DOS ("Disk
  82. operating system").  When most users think of DOS they think of
  83. the familiar prompt and copy,.... commands.  These parts of the
  84. DOS are only loaded later; the part in the hidden file involves
  85. services provided by DOS to programmers rather than directly to
  86. users.  The two hidden files are called "IBMBIOS.COM" and
  87. "IBMDOS.COM" in PC-DOS and may have different names on other
  88. computers although surprisingly, the names persist even on some
  89. non-IBM brands!
  90.  
  91.  
  92. Parenthetically, I want to note that there isn't really much
  93. hidden about hidden files.  As you may know, the DIRectory you are
  94. used to display gets its information from a special file also
  95. called the directory.  This file is essentially a little database
  96. with information about each file including the filename,
  97. extension, date and time of creation.  One byte in the record for
  98. each file is called the attribute byte and contains eight
  99. "switches" to keep track of things like whether the file is a
  100. volume label, read only, etc.  One of these switches is whether
  101. the file is "hidden".  To anyone with any programming experience
  102. or with any of a large number of public domain or commercial
  103. programs, these files are not in any sense hidden.  The basic DOS
  104. services like DIR and COPY are specially set up to ignore hidden
  105. files and that is the only sense in which these files are hidden.
  106. The two system files are hidden because their location is critical
  107. for a successful boot-up and they are less likely to be moved by
  108. accident if they are hidden.
  109.  
  110.  
  111. After the second hidden file is mainly loaded, it looks for a
  112. special file called "CONFIG.SYS" and processes the commands in it.
  113. Then control is passed to the third file in the operating system,
  114. COMMAND.COM.  As the final step in booting up, COMMAND.COM looks
  115. for a file names AUTOEXEC.BAT and if found it loads it and runs
  116. it.  If not found, COMMAND.COM exits with the DATE and TIME
  117. commands.
  118.  
  119.  
  120. Except for its special status as a bootup file, the AUTOEXEC.BAT
  121. file is an ordinary BATch file with the usual rules of syntax.
  122. The CONFIG.SYS file has a special syntax with a limited number of
  123. allowed commands.  Both must be pure ASCII files, that is without
  124. any special formatting codes that some word processors add.  Many
  125. word processors which have special codes have a "non-document"
  126. mode for preparing ASCII files.  These files have separate lines
  127. which must be ended with carriage return/line feed pairs.  If you
  128. have any doubts about whether the file is "pure ASCII" you can use
  129. the TYPE command to display it on the screen and see if it just
  130. has ordinary letters and numbers.
  131.  
  132.  
  133.  
  134.  
  135.                What goes in your root directory
  136.  
  137.  
  138. When a subdirectory fills up, it adds another cluster of disk
  139. space to increase its size but the size of the root directory is
  140. fixed at the time the diskette or disk is formatted.  It is not
  141. merely because of the size restriction  that I recommend that you
  142. keep your root directory slight.  Since the files in the root are
  143. likely to be of diverse type, it will be difficult to keep track
  144. of things if you put too much there.  I mainly put subdirectories
  145. there and mainly subdirectories which have no files but only
  146. subsubdirectories.  For example, I have a words subdirectory with
  147. my word processor, outliner, thesaurus, etc in subsubdirectories.
  148. Generally, there are only three files that I recommend go into the
  149. root: COMMAND.COM, CONFIG.SYS and AUTOEXEC.BAT.  As I mentioned,
  150. one can put AUTOEXEC.BAT elsewhere and even COMMAND.COM but I feel
  151. that is carrying things too far.  In fact, I even have a
  152. startup.bat file of the type I'll describe there but the point is
  153. to keep that directory thin and to complain bitterly about
  154. software so inconsiderate that it forces you to place it in the
  155. root directory.  My point in mentioning this here is that I'm
  156. about to discuss device drivers which many people put in the root
  157. directory.  If you like to be organized, I recommend you make a
  158. directory for device drivers (mine is called \bin\devices).
  159. Another option is to put the drivers in different directories with
  160. each driver in with related files so, for example, the drivers
  161. that come with DOS are kept in the same directory as the other DOS
  162. programs or the mouse driver is with the other mouse software.
  163.  
  164.  
  165.  
  166.  
  167.                        Device drivers
  168.  
  169.  
  170. There are a group of programs which are made permanently resident
  171. and which are loaded as part of the CONFIG.SYS.  Virtually any
  172. resident program can be produced in this format but certain ones
  173. must be of this form.  Typically, console drivers and any program
  174. which controls "a device" must be loaded now.  Most virtual disks
  175. and print spoolers also are loaded as device drivers.  While
  176. device drivers are programs, they need not have the extension
  177. "com" or "exe".  In fact, so far as I can tell their extension can
  178. be anything that you wish.  Nevertheless virtually all
  179. commercially available device drivers have the extension "sys".
  180. Some drivers are available with the extension "dev".  The syntax
  181. for loading a device driver in your CONFIG.SYS is
  182.   device=<path><name><parameters>
  183. so if you have a device foo.sys in the directory \bin\devices of
  184. drive C: and it will take a numeric parameter to set the size of
  185. some buffer, you might load it with
  186.   device=C:\bin\devices\foo.sys 128
  187. Note that it is essential to include the extension "sys" or else
  188. you will get an error message "bad or missing foo".  The drive
  189. letter C: is not required but it can't hurt and I know of one
  190. person who claimed the device driver on her machine couldn't be
  191. found without it.  The question of which parameters a given device
  192. driver allows or whether it allows any at all depends on the
  193. driver and should be dealt with in the documentation for the
  194. program in question.  For the drivers ANSI.SYS and VDISK.SYS which
  195. come with DOS, I note that the former takes no parameters while
  196. the later takes parameters explained in the DOS manual.  DOS 3.2
  197. comes with a third driver called DRIVER.SYS while some versions of
  198. MSDOS 3.2 comes with an alternate ram disk called RAMDRIVE.SYS.
  199. Both take parameters.
  200.  
  201.  
  202.  
  203.  
  204.         Examples of Device Drivers: the default drivers
  205.  
  206.  
  207. I will not attempt to describe all available device drivers since
  208. there are so many.  For example, Chris Dunford, one of the sysops
  209. of Compuserve has written public domain programs which installs
  210. "devices" to control screen blanking (BURNDEV) and another
  211. allowing you to send control sequences easily to your speaker
  212. (SPKR).  These represent examples where a real "device" is
  213. installed.  A device is a virtual file which can typically be
  214. written too and read from.  The most common example is "con" which
  215. you typically read from when you issue the command "copy con
  216. filename".  Devices can only be installed via the CONFIG.SYS.
  217. Despite the name, the device command can load other programs which
  218. do not control devices and physical "devices" may not be devices
  219. in the sense of setting up a virtual file.  A mouse is a good
  220. example of something which is not a device in this technical
  221. sense.
  222.  
  223.  
  224. The hidden file IBMDOS sets up several devices even if you have no
  225. CONFIG.SYS: con, prn, aux, lpt1, lpt2, lpt3, com1, com2.  Con,
  226. short for console is a combined keyboard/monitor device, prn for
  227. printer is by default a name for lpt1 and aux a name for com1.
  228. The DOS mode command allows reassignment of these devices.  LPTn
  229. and COMn are names for the parallel and serial ports on the
  230. computer.  These device names are assigned even if you don't have
  231. the full complement of ports.
  232.  
  233.  
  234.  
  235.  
  236.              Examples of Device Drivers:Console Drivers
  237.  
  238.  
  239. The most common device driver to install is a console driver which
  240. replaces the default console driver.  Some of these replacements
  241. attempt to address the notoriously slow display speed of the
  242. monitors and/or the annoying flicker on the color graphics
  243. display.  In addition some of the escape sequences of the 1977
  244. console standard of the American National Standards Institute
  245. (ANSI) are implemented.  These sequences include ways of
  246. controlling colors, cursor position and some DOS level keyboard
  247. macros.  (They are described in my article ANSI.ART).  One
  248. console driver of this type called ANSI.SYS is supplied with DOS
  249. and takes about 2K of resident memory.  It does not address the
  250. speed of display issue but it does implement several ANSI escape
  251. sequences.  There are numerous programs which assume the ANSI.SYS
  252. is installed to operate properly (as well as a few that don't work
  253. properly if ANSI.SYS is installed!) so it is wise to install ANSI
  254. or an equivalent driver even if you do not want to use its
  255. features yourself.  Actually, it is not hard to use the driver at
  256. the DOS level to set colors, set up a fancy prompt or redefine
  257. keys.
  258.  
  259.  
  260. There are several alternatives available to ANSI.SYS which you
  261. might want to consider.  NANSI.SYS is a public domain program
  262. which speeds up scrolling (when combined with RAW mode by a factor
  263. of about 2) and provides some additional ANSI escape commands at a
  264. cost of only 3K of RAM.  FANSI CONSOLE and TALL SCREEN are two
  265. commercial programs (listing for $75 and $49 respectively) taking
  266. much more memory (around 60K with a reasonable amount of screen
  267. save memory) providing many more services: faster scrolling (FANSI
  268. only), screen blanking (FANSI only), DOS command line editing and
  269. recall (TALL SCREEN ONLY), screen memory and keyboard
  270. enhancements as well as additional features.  While it is most
  271. natural to control scrolling by a device driver, there is at least
  272. one commercial com program which takes over the console by a
  273. different method and speeds up scrolling my a factor of six or
  274. more (FLICKER FREE).  I am quite happy with FANSI but I have
  275. friends whose computer taste I trust using both NANSI and TALL
  276. SCREEN so the choice is not clear.  And FLICKER FREE is an
  277. intriguing program whose second release (which will support the
  278. EGA) I eagerly await.
  279.  
  280.  
  281.  
  282.  
  283.             Examples of Device Drivers:Other drivers
  284.  
  285.  
  286. If you have a Lotus/Intel/Microsoft EMS board or AST EEMS board,
  287. you will need to load a device driver to access this extended
  288. memory.  Often the command will require various parameters to
  289. specify the amount of memory being set aside and various items
  290. like the region of conventional memory used for swapping and the
  291. port number to use.  Be warned if you are setting up a CONFIG.SYS
  292. file for the first time that you may already have a CONFIG.SYS
  293. file which was made for you when you installed the EMS software
  294. that came with your board.  Since this likely has the correct
  295. parameters, you should make your own CONFIG.SYS file by starting
  296. with this one and continuing from there.  It is possible that you
  297. will need to load the EMS driver before anything else.   I can
  298. report that if I try to load FANSI-CONSOLE on my AT before the EMS
  299. driver that Intel supplies with my Above Board AT, the EMS driver
  300. refuses to load and gives me the error message that my machine is
  301. "not a close enough AT compatible"!  Also be warned that while
  302. there is an EMS "standard", this refers to the way EMS works once
  303. the driver that comes with your board is installed.  More likely
  304. than not, drivers from different companies are incompatible and if
  305. you need a second EMS board, it will have to come from the company
  306. that supplied your first (this warning does not apply to extended
  307. memory on the AT but only to expanded EMS memory).
  308.  
  309.  
  310. Some older hard disks are not self booting and require a device
  311. driver loaded in your CONFIG.SYS but that is not so common any
  312. more.  DOS 3.2 has a program called DRIVER.SYS which is a device
  313. driver to initialize external 3.5 inch drives if you have one on
  314. an XT or AT.  By far the most common drive device driver is to
  315. operate a RAM disk, that is a segment of RAM set aside as a fast
  316. virtual disk.  There are com files loaded after the CONFIG.SYS
  317. which set up such drives but generally it is more sensible to use
  318. a device driver for this.  DOS 3.x comes with a program VDISK.SYS
  319. to set up a RAM disk.  This disk can operate in conventional or AT
  320. extended memory.  It will not set up a RAM disk in EMS memory but
  321. most EMS boards come with device drivers to set up RAM disks in
  322. EMS.  In addition Microsoft WINDOWS comes with a RAM disk device
  323. driver (which can be run independently of WINDOWS) and which can
  324. be set up in conventional, AT extended or EMS memory.  Given
  325. Microsoft's experience and the care they have lavished on WINDOWS,
  326. I'd recommend using the WINDOWS RAM disk driver if you have it in
  327. preference to alternatives and, in particular to VDISK which also
  328. comes from Microsoft.  However, if you are loading other programs
  329. that use AT extended memory, you may want to stick with VDISK
  330. because the specification that IBM uses to access AT extended
  331. memory is published while that of Microsoft is not and so other
  332. programs may clobber the Window's RAM DISK driver.  If you want to
  333. set up more than one RAM disk, you can include more than one line
  334. loading a RAM disk driver in your CONFIG.SYS file.  You can
  335. normally load the same driver twice or use different driver if you
  336. prefer.  Be warned that there is typically a few K overhead in
  337. conventional memory to load a RAM disk and you will pay this
  338. overhead more than once if you load more than one RAM disk.
  339.  
  340.  
  341. Print spoolers set aside some memory to receive printer output and
  342. then send that output to your printer as a background process.  I
  343. regard them as a tremendous productivity tool.  While there exist
  344. print spoolers loading as com files, many are loaded as device
  345. drivers.
  346.  
  347.  
  348. The Microsoft Mouse requires software to install it so your system
  349. will recognize the mouse.  The mouse comes with two versions of
  350. this software: MOUSE.SYS which is loaded as a device driver in
  351. your CONFIG.SYS and MOUSE.COM which is loaded later, typically in
  352. your AUTOEXEC.BAT.  I do not believe there is any particular
  353. reason to prefer one over the other.  Microsoft recommends using
  354. the device driver on all systems but the 3270 machines.  If you
  355. are using Software Carousel, you'll want to use the com file in
  356. various partitions rather than the device driver.
  357.  
  358.  
  359. As you may know you can place remarks in your BATch files and in
  360. particular in your AUTOEXEC.BAT.  This is useful if you want to
  361. temporarily run your system without some resident program that is
  362. usually loaded in your AUTOEXEC.BAT file.  You need only "remark
  363. it out", i.e. add the phrase "REM " at the beginning of the line
  364. including it.  Technically, remarks are not allowed in CONFIG.SYS
  365. files.  If you insert the word "REM" at the start of a line in
  366. your CONFIG.SYS file you will get the message
  367.  
  368.    Unrecognized command in CONFIG.SYS
  369.  
  370. However, since the rest of the line is not acted on, this
  371. procedure will have the desired effect of "commenting out" the
  372. line in question so you should not hesitate to use it.
  373.  
  374.  
  375. ECHO also doesn't work in CONFIG.SYS so there is no direct way of
  376. placing messages on the screen during the loading of the
  377. CONFIG.SYS  However, there is a public domain program called
  378. COMMENT.SYS which allows you to echo comments to the screen via
  379.    device=path\comment.sys <message>
  380. There is no stay resident part of comment.sys so you don't waste
  381. memory, only time, by using it.  If you are a color freak, you can
  382. first load an ANSI compatible console driver and then use
  383. COMMENT.SYS to send color setting escape sequences to the screen
  384. and so see most of your bootup in living color!
  385.  
  386.  
  387.  
  388.  
  389.                        The FILES command
  390.  
  391.  
  392. DOS is a prisoner of its past.  Original IBM PC's came with only
  393. 16K of memory (!) so when DOS boots up it sets aside memory for
  394. various purposes in an incredibly frugal manner.  The defaults
  395. for three regions of memory set aside for file handles, disk
  396. buffers and environment are woefully inadequate.  If you know what
  397. you are doing, it is easy to change these defaults but it's
  398. unfortunate that the novice gets stuck with these small values.
  399. In any event, FILES and BUFFER commands are among the most
  400. important for you to include in your CONFIG.SYS.  When DOS opens a
  401. file, it keeps certain information in memory to be able to quickly
  402. access the file.  This information is called a file handle.
  403. During bootup, memory is put aside for these file handles so a
  404. limit is placed on the number of files that can be open at one
  405. time.  The default is eight which may seem adequate since programs
  406. normally close files when they are done allowing the file handles
  407. to be reused.  However, eight is often not adequate.  DOS uses
  408. four of the handles itself for "files" like con and prn.  Thus
  409. there are four available for your programs.  Some resident
  410. programs leave files open and even the ones that don't, may need
  411. to open a file for an initial access at the same time that an
  412. application program have several files open.  Database programs
  413. often have separate index and data files and typically may want to
  414. have more than four open files.  If DOS is asked to open a file
  415. and a handle is not available, DOS issues an error message and the
  416. running program may even abort.  I strongly recommend that you
  417. place the line
  418.  
  419.                         FILES=20
  420.  
  421. in your CONFIG.SYS file.  Indeed since the cost of increasing
  422. files is less than 40 bytes per handle, you could even use a
  423. number larger than 20.  For most purposes 20 should suffice but
  424. ever since it wasn't enough for me in a rather specialized
  425. situation, I've taken files=30 myself.
  426.  
  427.  
  428.  
  429.  
  430.                           BUFFERS
  431.  
  432.  
  433. You may have heard of disk caching.  As you've noticed, diskette
  434. access is very slow and even a hard disk has access times 100 fold
  435. grater than RAM access times.  Disk caching sets aside some RAM to
  436. keep a copy of the most recently accessed disk information so, for
  437. example, if a database is continually accessing a disk, the first
  438. time the disk is really read but the next time the copy in cache
  439. memory will be read instead.  This is not the place to discuss the
  440. pros and cons of commercial disk caching software but you should
  441. know that DOS comes with some free rudimentary disk caching
  442. included.  It keeps N buffers of 512 bytes each with the copies of
  443. the last N disk sectors accessed.  By default N is only two (three
  444. on the AT).  You should certainly make this number larger by
  445. including the line
  446.  
  447.                           BUFFERS=N
  448.  
  449. in your CONFIG.SYS where recommended values of N are between 10
  450. and 25.
  451.  
  452.  
  453. Let me tell you an anecdote to show how dramatic a difference this
  454. number can make.  The first time that I ran my tape backup drive
  455. to backup my 30 meg hard disk, I was bitterly disappointed.
  456. Despite what I'd been told by the salesman, it took over 45
  457. minutes!  The next day, when I thought about it and tried again,
  458. it took only 8 minutes!  What had happened?  The first time I had
  459. been nervous about the effect my many resident programs might have
  460. so I put an original write protected DOS disk in drive A and
  461. rebooted before running the backup software.  This disk had no
  462. CONFIG.SYS so I was running with the default three buffers.  The
  463. next day, I used my regular hard disk boot with buffers=20 and
  464. that made the difference.  I have done some time tests comparing
  465. something as simple as copying a directory from a hard disk to a
  466. floppy and I've found that using extra buffers can decrease times
  467. by 30 or 40 percent.  So USE YOUR FREE DISK CACHING.
  468.  
  469.  
  470. The issue of precisely how many buffers to take is not an easy
  471. one.  Increasing the number of files handles has little effect on
  472. memory or efficiency so you can freely take files=99 if the mood
  473. strikes you.  This is not so with buffers.  Each buffer takes .5K
  474. of RAM so buffers add up.  Moreover at some point it will take DOS
  475. longer to check through all its buffers looking to see if a file
  476. is there than it would take it to access it directly.  I've seen
  477. the number 25 given as a dividing line but I would like to do some
  478. tests to check this out.  I can only say that I've settled on
  479. buffers=20 myself and that with a floppy based system, you should
  480. take a higher figure than you might with a hard disk.
  481.  
  482.  
  483.  
  484.  
  485.                 Increasing your environment
  486.  
  487.  
  488. DOS sets up a special section of memory called the environment
  489. which has a default size of 160 bytes.  This area must hold your
  490. path, your prompt, the place that COMMAND.COM can be found and
  491. various other strings.  Programs can communicate with you by
  492. asking you to place information in the environment with the SET
  493. command.  In addition you can keep global variables in the
  494. environment to pass between BATch files.  If you attempt to place
  495. more there than it has room for you'll get a message "Out of
  496. environment space".  With DOS 3.1 and later there is a CONFIG.SYS
  497. command allowing you to increase the amount of space reserved for
  498. your environment.  There are known patches for earlier versions
  499. DOS which are listed for example in my article on ANSI.SYS.  The
  500. procedure is documented in DOS 3.2 and so presumably it will be
  501. a permanent feature of DOS.  It is undocumented in DOS 3.1.  The
  502. syntax is
  503.  
  504.                 shell=C:\command.com /P /E:nnn
  505.  
  506. where n is the number of bytes you want to set aside for the
  507. environment.  For DOS 3.1 nnn represents the number of 16 byte
  508. paragraphs you want to set aside.  So for a 512 byte environment
  509. take nnn=32 in DOS 3.1 and 512 in DOS 3.2.  Obviously with a
  510. floppy based system, replace C: by A:
  511.  
  512.  
  513. How much space do you need for your environment?  That depends on
  514. your path, applications and how fancy a prompt you make.  My
  515. advice is to do nothing until you have a problem at which point
  516. you should remember that there is something that you can do.
  517.  
  518.  
  519. For more advanced users, I note that the environment is not as
  520. benign as you might think.  I know of several programs which
  521. crashed if there was too much in the environment (most of the ones
  522. I know about have been fixed) and one that crashed if the PATH was
  523. the last thing set in the environment.  I have occasionally been
  524. baffled at what could be causing a conflict only to discover the
  525. culprit was the environment.
  526.  
  527.  
  528.  
  529.  
  530.              Miscellaneous CONFIG.SYS commands
  531.  
  532.  
  533. There are some other commands that can go in your CONFIG.SYS:
  534.  
  535.   -You can turn BREAK ON that is have the operating system check
  536.   for control C more often than just during disk I/O.  This slows
  537.   down certain processing but gives you more safety from certain
  538.   kinds of dead ends.  The syntax is a line saying
  539.  
  540.                       BREAK=ON
  541.  
  542. Unlike any other CONFIG.SYS command, this one can also be issued
  543.   from the DOS command line or in your AUTOEXEC.BAT file.
  544.  
  545.   -In addition to file handles, DOS has something call file
  546.   control blocks which in DOS 3.x can be changed by an FCBS
  547.   command.  These are needed only if you have a LAN (local area
  548.   network) and the parameters to take should be discussed by your
  549.   LAN software.
  550.  
  551.   -DOS 3.2 has a STACK command.  From what I've read this is a
  552.   real cludge and the manual seems to suggest that it was added at
  553.   the last minute to solve a problem connected with a new way that
  554.   DOS3.2 treats the stack.  In any event, if you use DOS 3.2 and
  555.   seem to have unexplained crashes, try adding
  556.  
  557.                             STACK=20
  558.  
  559. to your CONFIG.SYS.
  560.  
  561.   -DOS 3.1 and later allows you to use the SUBST command to assign
  562.   drive letters to directories.  In addition, with several RAM
  563.   disks you may want to assign a letter beyond the default last
  564.   drive of E.  DOS 3.x allows you to add a command
  565.  
  566.                             LAST DRIVE =  ?
  567.  
  568. where ? is a letter and then you can assign any drive up to and
  569.   including that letter.  Even a last drive=z only takes about 1K
  570.   of RAM.
  571.  
  572.   -There is a COUNTRY command to control things like the time
  573.   format.  The default is USA.
  574.  
  575.  
  576. One final remark about your CONFIG.SYS.  The order of the commands
  577. is irrelevant except to the extent that certain device drivers
  578. like to be loaded before others (and if you are loading two RAM
  579. disks of different sizes you may care which is assigned which
  580. letter).  As with most DOS commands the syntax is not case
  581. sensitive.
  582.  
  583.  
  584. As a review of what a CONFIG.SYS can contain, let me list the
  585. CONFIG.SYS from one of my machines which is running DOS 3.2:
  586.  
  587.    break=on
  588.    buffers=20
  589.    device=C:\bin\intel\emm.sys M3 I5 D
  590.    device=C:\bin\devices\fconbeta.dev /C=1/S=2000/H=0/V=0/R=200/L=1/W=1
  591.    device=C:\bin\devices\ramdrive.sys 1024 512 128 /A
  592.    device=C:\bin\devices\ramdrive.sys 1300 512 64 /E
  593.    device=C:\bin\devices\atqlpt1.sys 1644,1,3
  594.    device=C:\bin\devices\mouse.sys
  595.    files=30
  596.    lastdrive=z
  597.    shell=C:\command.com /P /E:512
  598.  
  599.  
  600.  
  601.  
  602.  
  603.                 What should your AUTOEXEC.BAT contain?
  604.  
  605.  
  606. Most of my AUTOEXEC.BAT file loads my own particular blend of
  607. resident programs.  This is not the place for me to advise you on
  608. what resident programs you might want to put into your system but
  609. I would like to make some comments about DOS and general aspects
  610. of what goes into your AUTOEXEC.BAT file.
  611.  
  612.  
  613. First, if you have very many resident programs, they may have
  614. conflicts and you must be prepared to permute the order of
  615. loading which often cures some or all of the conflicts.  For
  616. technical reasons I won't go into here it really does pay to
  617. listen to SIDEKICK's demand to be loaded last although you need
  618. not take all the other Borland program demands quite so seriously.
  619.  
  620.  
  621. In addition to loading a stable of resident programs your
  622. AUTOEXEC.BAT can contain some of the following:
  623.  
  624.    -a VERIFY ON command.  This slows down copying because DOS
  625.    checks that the copy at least has consistent CRCs; this is not
  626.    the same as comparing after copying but it is a fairly good check.
  627.    Only several compensating errors could pass this test after an
  628.    incorrect copy.
  629.  
  630.    -set a PROMPT.  At a minimum use
  631.  
  632.                        prompt=$p$g
  633.  
  634.    Mine uses ANSI.SYS to set colors and place the path and date on
  635.    the bottom line of my screen
  636.  
  637.    -set a PATH.  If possible, keep your path short since every
  638.    time you type in a bad command, DOS will have to read every
  639.    directory in the path before responding "Bad command or
  640.    filename".  Also try to list the path in the order of how many
  641.    times you expect to access a given directory.  That is place
  642.    the directories you call most often early in your path.  If
  643.    you have a RAM disk, place its directories first in the path.
  644.    If you have a relatively large RAM disk, think about copying
  645.    your BATch file directory and the programs you call often to
  646.    that RAM disk and place that RAM disk first in your path.
  647.  
  648.    -If you have a large RAM disk, consider copying COMMAND.COM to
  649.    it and placing the command
  650.  
  651.                    SET comspec=D:\command.com
  652.  
  653.    in your AUTOEXEC.BAT (assuming D: is your RAM disk).  Even
  654.    without a large RAM disk, it is worthwhile to do this on a
  655.    floppy based system.  What the command does is tell DOS to look
  656.    there when it needs to reload COMMAND.COM (large programs will
  657.    overwrite a part of COMMAND.COM and when they exit, DOS will
  658.    try to reload COMMAND.COM.  With the above command, you'll no
  659.    longer get "Place a disk with command.com in drive A: and hit
  660.    any key to continue".)
  661.  
  662.    -It really is important to put the proper date and time in your
  663.    system.  Be sure to include the DATE and TIME commands or else
  664.    be sure to get a clock and place the appropriate commands
  665.    setting the system time from the clock into your AUTOEXEC.BAT
  666.    file.
  667.  
  668.    -if you want to keep track of how often you boot, keep a record
  669.    in a convenient directory.  Make a file called junk consisting
  670.    only of a carriage return line feed and include the lines
  671.      date >>directory\logon <junk
  672.      time >>directory\logon <junk
  673.    You will then get the lines
  674.      Current date is Wed  7-23-1986
  675.      Enter new date (mm-dd-yy):
  676.      Current time is 16:29:22.70
  677.      Enter new time:
  678.    for each time you bootup.  With CED, EBL or some other programs
  679.    you can get this record in a more elegant fashion without the
  680.    "Enter new ..." lines.
  681.  
  682.  
  683.  
  684.                     Speed and Memory tips
  685.  
  686.  
  687. Some final remarks about tricks to minimize memory usage and speedup
  688. your bootup procedure.  When DOS loads any program it saves a
  689. copy of the current environment in memory, one copy for each
  690. program.  It doesn't force the copy to be as large as the empty
  691. space that you've set aside via a shell command but only to keep
  692. in full the present value of all environmental variables.  Thus
  693. you can save memory by keeping the environment small while your
  694. AUTOEXEC.BAT file is loading your resident programs.  Two
  695. variables  are always present: path and comspec.  I start my
  696. AUTOEXEC.BAT file with a line
  697.  
  698.                             Path=A
  699.  
  700. This is incorrect syntax and gets ignored when the path is needed.
  701. I have to be sure to put down full path names of all the programs
  702. that I load but that speeds processing any ways.  I reset the path
  703. and set the prompt at the end of my AUTOEXEC.BAT after I've loaded
  704. my resident programs.  Given my fancy prompt, I save almost 200
  705. bytes per resident program  from what would happen if I set my
  706. path and prompt at the beginning of my AUTOEXEC.BAT.  In total I
  707. save several K of RAM: not a lot but every little byte helps.
  708.  
  709.  
  710. BATch files are read by DOS a line at a time so BATch files really
  711. do get processed much faster from a RAM disk than from a floppy.
  712. There is a smaller difference between a hard disk and a RAM disk.
  713. If you have a RAM disk and a floppy based system, it is well worth
  714. your while to place what would have been your AUTOEXEC.BAT in a
  715. file called startup.bat and have your AUTOEXEC.BAT read:
  716.  
  717.                      copy startup.bat C:
  718.                      C:startup.bat
  719.  
  720. assuming your RAM disk is C:.  To conserve space, you can have the
  721. last line in startup.bat say
  722.  
  723.                      erase C:startup.bat
  724.  
  725. You'll get a "batch file missing" error message but other than
  726. that the method will work perfectly.  This procedure can also be
  727. used on a hard disk.  The savings when I did it on my hard disk
  728. was two seconds out of about 65 so you may not feel it is worth
  729. your while.
  730.  
  731.  
  732. You can slightly speed up processing of BATch files especially
  733. from floppies by using the FOR...IN...DO command to combine
  734. several commands in one line.  For example, if you want to copy
  735. \bin\batfiles, \bin\dump and \bin\opsys to your RAM disk you might
  736. try
  737.  
  738.   for %%a in (\bin\batfiles \bin\dump \bin\opsys) do copy %a C:\ >nul
  739. if C: is your RAM disk.  This can actually cut about 10% off a
  740. long AUTOEXEC.BAT file.  Several warnings are in order.  First,
  741. FOR...IN...DO parse the list at spaces so you can't combine
  742. commands which have parameters in this way.  Secondly, I strongly
  743. recommend against using this device to load resident programs
  744. particularly if you plan to use Kokkenen's MARK/RELEASE package.
  745.  
  746.  
  747.  
  748.  
  749.                             Summary
  750.  
  751.  
  752. By using your CONFIG.SYS and AUTOEXEC.BAT files you can
  753. personalize many aspects of your PC.