home *** CD-ROM | disk | FTP | other *** search
/ PC-Test Pro / PCTESTPRO.iso / disktool / cfg / entp / cfg.doc < prev    next >
Encoding:
Text File  |  1995-07-14  |  211.7 KB  |  4,508 lines

  1.      
  2.                                         
  3.                                         
  4.                                         
  5.                                         
  6.                                        CFG
  7.                                         
  8.                                   Version 2.43
  9.                                         
  10.                                         
  11.                                         
  12.                                         
  13.                                         
  14.                                         
  15.                   Copyright  Special Enhancements  1992 - 1995
  16.                                All Rights Reserved
  17.                                         
  18.                                         
  19.                                         
  20.                                         
  21.                                  Software Manual
  22.                                         
  23.                                         
  24.                                         
  25.                                         
  26.                             -- Shareware Version --
  27.                                         
  28.                                         
  29.                                         
  30.                                         
  31.                                  Mark Treadwell
  32.                              4 Mumford Avenue, Apt A
  33.                         Newport, Rhode Island  02840-1719
  34.                                        USA
  35.                                         
  36.                                         
  37.                              CompuServe: 73700,3344
  38.                                 Prodigy:  WNBH41A
  39.                        Internet: 73700.3344@compuserve.com
  40.                                         
  41.  
  42.  
  43.                                     Contents
  44.                                         
  45.                                         
  46.  
  47.  
  48. CONTENTS                                                                                 2
  49.  
  50.  
  51. CHAPTER 1:   INTRODUCTION                                                                4
  52.   
  53.   1.1  Basic Operation                                                                  4
  54.   
  55.   1.2  System Requirements                                                              4
  56.   
  57.   1.3  Disk Files Included with CFG                                                     5
  58.   
  59.   1.4  Documentation                                                                    5
  60.   
  61.   1.5  Acknowledgments                                                                  6
  62.  
  63.  
  64. CHAPTER 2:  REGISTRATION - WHY AND HOW                                                   7
  65.   
  66.   2.1  Definition of Shareware                                                          7
  67.   
  68.   2.2  Disclaimer - Agreement                                                           7
  69.   
  70.   2.3  What You Get                                                                     8
  71.   
  72.   2.4  How To Register                                                                  8
  73.  
  74.  
  75. CHAPTER 3:  INSTALLATION                                                                10
  76.   
  77.   3.1  Procedure                                                                       10
  78.   
  79.   3.2  Locations                                                                       10
  80.   
  81.   3.3  Quick Help                                                                      10
  82.  
  83.  
  84. CHAPTER 4:  USE                                                                         11
  85.   
  86.   4.1  Command Line Syntax                                                             11
  87.   
  88.   4.2  Global Switches                                                                 11
  89.   
  90.   4.3  Switch Usage                                                                    12
  91.   
  92.   4.4  MultiCommand Mode                                                               13
  93.   
  94.   4.5  Number Base                                                                     13
  95.   
  96.   4.6  Return ErrorLevel                                                               13
  97.   
  98.   4.7  Messages                                                                        14
  99.   
  100.   4.8  Notes                                                                           14
  101.      4.8.1  Usage From CONFIG.SYS and the Command Line                                 14
  102.      4.8.2  On Loading High                                                            15
  103.      4.8.3  Case on the Command Line                                                   15
  104.      4.8.4  DOS Environment                                                            15
  105.      4.8.5  Undocumented DOS                                                           17
  106.  
  107.  
  108. CHAPTER 5:  COMMANDS                                                                    19
  109.  
  110.  
  111. APPENDIX A:  PROBLEMS AND SOLUTIONS                                                     69
  112.  
  113.  
  114. APPENDIX B:  BIBLIOGRAPHY                                                               70
  115.  
  116.  
  117. APPENDIX C:  REVISION HISTORY                                                           71
  118.  
  119.  
  120. APPENDIX D:  BACKGROUND DISCUSSION                                                      78
  121.  
  122.  
  123. APPENDIX E:  ERROR MESSAGES                                                             80
  124.  
  125.  
  126. APPENDIX F:  SAMPLE CONFIG.SYS FILE                                                     83
  127.  
  128.  
  129. INDEX                                                                                   87
  130.  
  131.  
  132.                             Chapter 1:   Introduction
  133.                                         
  134.                                         
  135. Thank you for using CFG Version 2.43.  CFG is a program that provides multiple
  136. utilities for use during CONFIG.SYS device driver installation and from the DOS
  137. command line and batch files.  The program does not remain resident and releases
  138. all memory on termination.  Suggestions for additions or modifications to CFG
  139. are welcome.
  140.  
  141. CFG really is many programs combined into one.  Each CFG command, or even
  142. subcommand, could be one entire command line utility.  One of CFG's benefits is
  143. combining all these small utility programs into one package.  Your hard disk is
  144. not littered with dozens or even hundreds of small, space consuming files.  If
  145. you only use something occasionally, CFG probably has an option for it
  146. somewhere.
  147.  
  148. Getting in touch with me is very easy.  I can be contacted via CompuServe Mail
  149. at 73700,3344.  CompuServe Mail may be accessed via the Internet using the
  150. address:
  151.                             73700.3344@compuserve.com
  152.  
  153. I can be reached via Prodigy Mail at UserID WNBH41A.  I may also be contacted
  154. via surface mail at the address shown on the title page.
  155.  
  156. Since I am an officer in the United States Navy, I travel frequently as a part
  157. of my job.  I carry my portable computer and access CompuServe when possible, so
  158. your inquiries will be answered quickly.  I currently have a job ashore and am
  159. readily accessible.  The only time things may be delayed is when I am at sea.
  160.  
  161.  
  162.  
  163. 1.1  Basic Operation
  164.  
  165.  
  166.                                                                                    [Return]
  167. CFG functions similar to many of the standard utilities included with DOS.  CFG
  168. depends on its command line being formatted in accordance with the Syntax
  169. section below and any additional information given for each command.  CFG
  170. processes the command line from left to right and each command is executed in
  171. order.  Many commands return a DOS ErrorLevel that can be used in a batch file.
  172. The Commands section below provides detailed information on each command and its
  173. options.
  174.  
  175.  
  176.  
  177. 1.2  System Requirements
  178.  
  179.  
  180.                                                                                    [Return]
  181. CFG requires an IBM compatible computer with approximately 160 kilobytes of free
  182. low memory to run.  Most commands require DOS Version 3.0 or later.  If a
  183. command requires a later version of DOS, it is specifically noted in its
  184. description in the Commands section below.  The CFG screen browser will work
  185. with all standard video display systems:  MDA, CGA, EGA, VGA and SVGA.
  186.  
  187.  
  188.  
  189. 1.3  Disk Files Included with CFG
  190.  
  191.  
  192.                                                                                    [Return]
  193.    Files Included with CFG
  194. File Name            File Description
  195. ---------------------------------------------
  196. CFG.COM              Main executable file
  197. CFG.HLP              Short description help file
  198. CFG.DOC              Main documentation and long description help file (ASCII)
  199. CFG.WW6              WinWord 6 version of CFG.DOC (registered version only)
  200. CFG.REG              Shareware registration order form
  201. CFG.NEW              Info on changes/bug fixes since the last major version
  202. INSTALL.BAT          Installation batch file for CFG
  203. CFG.INS              INSTALL.BAT renamed in the installation directory
  204. README.CFG           CFG read me file
  205. FILE_ID.DIZ          Program identification file for BBS SYSOPs
  206.  
  207.  
  208.  
  209. 1.4  Documentation
  210.  
  211.  
  212.                                                                                    [Return]
  213. I maintain the main documentation file for CFG in Microsoft Word for Windows
  214. 6.0c.  This file includes color, special formatting, hypertext DocCruiser jumps
  215. and special performance macros.  You get the most recent version of this WinWord
  216. file on disk as a registered user.
  217.  
  218. The printed version of this file provided to registered users is made by running
  219. this file through the Two by Four (2x4) printing macro that is part of Woody's
  220. Office POWER Pack (WOPR).  The result is a fully formatted and easy-to-read
  221. booklet, giving you an excellent reference to the complexities and many commands
  222. included with CFG.  Here are some special features of the electronic version:
  223.  
  224.   *  Cruising around this WinWord file is very easy.  All CommandNames are
  225.       referenced jumps and will take you to the command definition section.
  226.       This is a useful way to get to a specific command from Appendix C Revision
  227.       or from a cross-reference under another command.
  228.   *  A custom toolbar gives you rapid access to the CFG DocCruiser macro.  The
  229.       macro provides a dialog box that allows you to choose exactly where you
  230.       want to jump around in the document.  Don't worry.  Your regular toolbar
  231.       will reappear when you close this file.
  232.   *  To improve readability, several choices available under the WinWord Tools
  233.       Options View tab are reset.  These changes are reset once you exit the
  234.       file.
  235.   *  Each command section has some numbers to the right of the command line
  236.       definition that are also jumps.  The numbers refer to the version of CFG
  237.       that the individual command was first added or subsequently changed.
  238.       Double clicking these jump numbers will take you to the applicable version
  239.       history section.
  240.   *  Each short command description line has a red "[Return]" jump button at its
  241.       end.  If you used a DocCruiser jump to get there, double clicking on the
  242.       red "[Return]" button will take you back to where you came from.
  243.   *  Double clicking on a page number in the Table of Contents will take you to
  244.       that page.
  245.   *  While this document is loaded in WinWord, some keyboard reassignments are
  246.       temporarily made.  The following table lists these:
  247.  
  248.        Alt + Ctrl + G          Executes the CFG DocCruiser macro.
  249.        
  250. Text colors in this document are used as follows:
  251.   *  Blue is used for notes, warnings, cautions and other information that needs
  252.       to stand out.  There should be some other material nearby in the file
  253.       which is also highlighted.
  254.   *  Green is used to highlight anything involving the CFG command line or its
  255.       parameters.
  256.   *  Red indicates a jump button.  Double clicking on the red text will take you
  257.       to the indicated subject.
  258.  
  259.  
  260.  
  261. 1.5  Acknowledgments
  262.  
  263.  
  264.                                                                                    [Return]
  265. CFG is written entirely in assembly language and compiled using the Microsoft
  266. Macro Assembler Version 6.11c.  There are no external code libraries involved.
  267.  
  268. CFG was initially inspired by Michael Mefford's BatchMan utility.  BatchMan only
  269. works from the command line or batch files and does not have all that many
  270. options.  Unfortunately, that is not quite what I wanted...
  271.  
  272. My thanks to:
  273.   *  Woody Leonhard for WOPR 6 [Woody's Office POWER Pack 6.0c].  It is an
  274.       outstanding addition to WinWord.  Woody's DocCruiser extra, that also
  275.       originated with WOPR, makes life *so* much easier...
  276.   *  Eileen Wharmby for her authoring of and help with WOPR 2x4.  Some times a
  277.       document stresses macro programs in just such a way....
  278.   *  Ed Ruth for testing, suggestions and endurance Beyond the Call of Duty.
  279.   *  Rod Pullman for his DEVICE.COM utility that was essential for testing of
  280.       CFG versions 1.0 and 1.1.
  281.   *  Sande Nissen for her excellent suggestions.
  282.   *  ... and the many others whose comments have helped make CFG a better
  283.       program!
  284.  
  285.  
  286.                      Chapter 2:  Registration - Why and How
  287.                                         
  288.                                         
  289.  
  290.  
  291.  
  292. 2.1  Definition of Shareware
  293.  
  294.  
  295.                                                                                    [Return]
  296. Shareware distribution gives users a chance to try software before buying it.
  297. If you try a Shareware program and continue using it, you are expected to
  298. register.  Individual programs differ on details -- some request registration
  299. while others require it, some specify a maximum trial period.  With
  300. registration, you get anything from the simple right to continue using the
  301. software to an updated program with printed manual.
  302.  
  303. Copyright laws apply to both Shareware and commercial software, and the
  304. copyright holder retains all rights, with a few specific exceptions as stated
  305. below.  Shareware authors are accomplished programmers, just like commercial
  306. authors, and the programs are of comparable quality.  The main difference is in
  307. the method of distribution.  The author specifically grants the right to copy
  308. and distribute the software, either to all and sundry, or to a specific group.
  309. For example, some authors require written permission before a commercial disk
  310. vendor may copy their Shareware.
  311.  
  312. Shareware is a distribution method, not a type of software.  You should find
  313. software that suits your needs and pocketbook, whether it's commercial or
  314. Shareware.  The Shareware system makes fitting your needs easier, because you
  315. can try before you buy.  And because the overhead is low, prices are low also.
  316. Shareware has the ultimate money-back guarantee -- if you do not use the
  317. product, you do not pay for it.
  318.  
  319.  
  320.  
  321. 2.2  Disclaimer - Agreement
  322.  
  323.  
  324.                                                                                    [Return]
  325. Users of CFG must accept this disclaimer of warranty: "CFG is supplied as is.
  326. The author disclaims all warranties, expressed or implied, including, without
  327. limitation, the warranties of merchantability and of fitness for any purpose.
  328. The author assumes no liability for damages, direct or consequential, which may
  329. result from the use of CFG."
  330.  
  331. CFG is a "shareware program" and is provided at no charge to the user for
  332. evaluation.  Feel free to share it with your friends, but please do not give it
  333. away altered or as part of another system.  The essence of "user-supported"
  334. software is to provide personal computer users with quality software without
  335. high prices, and yet to provide incentive for programmers to continue to develop
  336. new products.
  337.  
  338. If you find CFG is useful and that you are using it regularly after a reasonable
  339. trial period, you must make a registration payment of $25 to Special
  340. Enhancements.  The $25 registration fee will license one copy for use on any one
  341. computer at any one time.  There is a $5 shipping and handling fee for orders
  342. outside the United States.  You must treat this software just like a book.  An
  343. example is that this software may be used by any number of people and may be
  344. freely moved from one computer location to another, so long as there is no
  345. possibility of it being used at one location while it is being used at another.
  346. Just as a book cannot be read by two different persons at the same time.
  347.  
  348. Commercial users of CFG must register and pay for their copies of CFG within 30
  349. days of first use or their license is withdrawn.  Site-License arrangements may
  350. be made by contacting Special Enhancements.
  351.  
  352. Anyone distributing CFG for any kind of remuneration must first contact Special
  353. Enhancements at the address below for authorization.  This authorization will be
  354. automatically granted to distributors recognized by the Association of Shareware
  355. Professionals (ASP) as adhering to its guidelines for shareware distributors,
  356. and such distributors may begin offering CFG immediately.  (However Special
  357. Enhancements must still be advised so that the distributor can be kept
  358. up-to-date with the latest version of CFG.)
  359.  
  360. You are encouraged to pass a copy of CFG along to your friends for evaluation.
  361. Please encourage them to register their copy if they find that they can use it.
  362. All registered users receive a copy of the latest version of CFG.
  363.  
  364.  
  365.  
  366. 2.3  What You Get
  367.  
  368.  
  369.                                                                                    [Return]
  370. The registration fee is paid once and gives you the right to use all future
  371. versions.  You get a disk and laser-printed user guide, and are notified
  372. whenever a major revision is released.  Also on the disk is a Microsoft Word for
  373. Windows 6.0 version of this documentation that includes color, special
  374. formatting and hypertext-like jumps for cruising around easily.  Upgrades are
  375. free for the download, but I will ship a new disk and printed documentation to
  376. registered users for $10 at your request.  There is a $5 shipping and handling
  377. fee for orders outside the United States.  Just send a message via CompuServe
  378. Mail, and I will ship the order and invoice.
  379.  
  380.  
  381.  
  382. 2.4  How To Register
  383.  
  384.  
  385.                                                                                    [Return]
  386. There are two ways to register CFG.  The file CFG.REG is an order form.  Please
  387. print it and send the form with payment to:
  388.  
  389.                               Special Enhancements
  390.                                  Mark Treadwell
  391.                                 4 Mumford Avenue
  392.                              Newport, RI  02840-1719
  393.                                        USA
  394.  
  395. Another way to register is via CompuServe's on-line SWREG service.  SWREG is a
  396. CompuServe service that easily allows you to register Shareware.  The price of
  397. the program is charged to your CompuServe account.  To register CFG through
  398. SWREG:
  399.  
  400.   *  Run your communications program to logon to CompuServe interactively.
  401.   *  Type "GO SWREG" [Enter] to get the SWREG menu and follow the menus to
  402.       register CFG.  When prompted for the program identification, type 3508,
  403.       which is CFG's identification number.  You'll receive the CFG package in a
  404.       few days.  The program will be on a double-sided, 3.5 inch diskette.  If
  405.       you prefer a 5.25 inch diskette, just send me a note via CompuServe Mail
  406.       [73700,3344].
  407.  
  408. If you have any enhancements, problems, suggestions, comments or complaints,
  409. please send them to me via CompuServe Mail or a written letter to the above
  410. address.  Even if you have not decided to keep CFG, feel free to get in touch
  411. with me.  I generally reply within 48 hours.  Send via CompuServe Mail to Mark
  412. Treadwell 73700,3344.
  413.  
  414.  
  415.                             Chapter 3:  Installation
  416.                                         
  417.                                         
  418.  
  419.  
  420.  
  421. 3.1  Procedure
  422.  
  423.  
  424.                                                                                    [Return]
  425. Installation is very easy.  Extract the files from the compressed archive into
  426. the desired disk subdirectory.  Alternately, extract them onto a floppy disk and
  427. run the included INSTALL.BAT file.  The necessary files will be copied to the
  428. drive and directory you specify.  I recommend installing to your DOS directory
  429. or a general utility directory that is specified in your DOS PATH statement.
  430.  
  431.  
  432.  
  433. 3.2  Locations
  434.  
  435.  
  436.                                                                                    [Return]
  437. The absolute minimum files for full operation are CFG.COM, CFG.HLP and CFG.DOC.
  438. CFG.COM expects to find CFG.HLP and CFG.DOC in the same directory that it was
  439. executed from.  If you do not execute a Help command, only CFG.COM itself is
  440. required.  If the installation directory is specified in your DOS PATH, you are
  441. not required to specify the full drive and directory when executing CFG, just
  442. like any other command.
  443.  
  444.  
  445.  
  446. 3.3  Quick Help
  447.  
  448.  
  449.                                                                                    [Return]
  450. "CFG /?" gets you a syntax description and a summary of commands in a scrollable
  451. window.  "CFG Help CommandName" gets you this file opened to the appropriate
  452. CommandName entry in a scrollable window.
  453.  
  454.  
  455.                                  Chapter 4:  Use
  456.                                         
  457.                                         
  458.  
  459.  
  460.  
  461. 4.1  Command Line Syntax
  462.  
  463.  
  464.                                                                                    [Return]
  465. From CONFIG.SYS:
  466.           
  467.           DEVICE=[d:][path]Cfg.Com CommandName [Options] [;CommandName [Options]
  468.                     [; ... ]]
  469.  
  470. From the DOS command line or batch file:
  471.           
  472.           [d:][path]Cfg CommandName [Options] [;CommandName [Options] [; ... ]]
  473.  
  474. Parameters:
  475.  
  476.       [d:][path]
  477.       Specifies the location of the CFG.COM file.
  478.  
  479.       CommandName
  480.       The valid CommandNames are given below.  The CommandNames must be fully
  481.           spelled out exactly as shown.
  482.  
  483.       [Options]
  484.       CommandName related options and SubCommandNames are detailed below for
  485.           each command.  SubCommandNames may be abbreviated as desired, but must
  486.           remain unique from each other to be parsed correctly.
  487.  
  488.  
  489.  
  490. 4.2  Global Switches
  491.  
  492.  
  493.                                                                                    [Return]
  494.    Global Switch Descriptions
  495. Switch            Description
  496. ---------------------------------------------
  497. /Bn               Base Switch:  Selects the number base to use.  Some commands
  498.                   specifically require decimal or hexadecimal input.  The
  499.                   default number system is base 10.  The "n" specifies the
  500.                   _decimal_ number representing the new number base.  Valid
  501.                   values for "n" are between 2 and 16.  (Example: /B16)
  502. /Dn               Divisor Switch:  Selects an optional block size for ErrorLevel
  503. reporting of
  504.                   commands.  The default block size is 1 unless a different
  505.                   default is given in the specific command section.  This allows
  506.                   returning a valid ErrorLevel for a value that is greater than
  507.                   255.  The "n" specifies the decimal number by which the result
  508.                   is divided.  Valid values for "n" range from 1 to 65535.
  509.                   (Example: /D8192)
  510. /E[+][@][!][E]    ErrorLevel Switch:  The "+" option will display extended
  511. ErrorLevel
  512.                   information including the command and subcommand being
  513.                   executed.  The "@" option places the output ErrorLevel in the
  514.                   environment variable "EL".  By default, this will be in the
  515.                   master environment.  Use the /2 switch to place it in the
  516.                   environment of a secondary command processor.  Use the "!"
  517.                   option to specify which of the possible ErrorLevels to return
  518.                   in MultiCommand.  Use the "E" option with "@" if you want the
  519.                   basic ErrorLevel displayed with environment output.  The order
  520.                   of the options does not matter.  See the Return section below
  521.                   for more explanation.
  522. /Q                Quiet Switch:  Commands will not display character output if
  523. this is used.
  524.                   This switch may be used with the /@EnVar switch, but has no
  525.                   effect on the /E and /E+ switch output or error output.
  526. /1[A|B]           Environment Switch, Primary or Master:  Instructs CFG to
  527. search for and
  528.                   update the environment of the primary command processor.  This
  529.                   is the default.  See the DOS section for an explanation of the
  530.                   "A" and "B" options for this switch and a discussion of
  531.                   environments in general.
  532. /2                Environment Switch, Secondary or Parent:  Instructs CFG to
  533. search for and
  534.                   update the environment of a secondary command processor.  Use
  535.                   this switch if you think your batch file will be run under
  536.                   Windows.  Under Windows 95, there is only one environment, so
  537.                   the /1 and /2 switches have identical output.  See the DOS
  538.                   section for a discussion of environments in general.
  539. /@[=]EnVar        Environment Output Switch:  Place ASCII command result in the
  540.                   DOS variable "EnVar".  No spaces are allowed between the "@",
  541.                   the "=" (if used) and the environment variable name.  The
  542.                   rules for environment variables are the same as for the DOS
  543.                   SET command except that mixed case is permitted for the
  544.                   variable name by default.  The "=" option forces CFG to
  545.                   capitalize "EnVar" to ensure compatibility with the DOS SET
  546.                   command.  See the DOS section for further details.  Each
  547.                   command that supports this switch is indicated below.  The
  548.                   variable name should be followed by at least one space to
  549.                   prevent following command line text from being included in the
  550.                   name.
  551. /,                Comma Switch:  Insert commas every three places in decimal
  552. numbers
  553.                   displayed on the screen.
  554. /?                Help Switch:  Display an abbreviated command summary.
  555. Available from
  556.                   command line only.  Not available in MultiCommand.
  557.  
  558. See the individual commands for additional switches.
  559.  
  560.  
  561.  
  562. 4.3  Switch Usage
  563.  
  564.  
  565.                                                                                    [Return]
  566. The command line is scanned for any switches before CommandName parsing.  If a
  567. valid switch is found, a program variable is set and the switch is blanked from
  568. the command line by replacing it with spaces.  This includes text and numbers
  569. appearing after the /@, /B, /D and /E switches.  A switch may be placed anywhere
  570. on the command line and still be found.  Switches will not be found in
  571. _*quoted*_ text strings (such as in Cecho, Echo and EchoPause) as long as there
  572. are closing quotes.  Note that _*all*_ possible switches are scanned for each
  573. command since CFG does not know the CommandName when switch parsing occurs.
  574.  
  575. If you use the MultiCommand syntax, the switches are scanned only between the
  576. MultiCommand separators.  This allows each individual command on the command
  577. line to have its own different set of switches.
  578.  
  579. If both the /1 and /2 switches are used, CFG will update both the master and
  580. parent environments.  If the two refer to the same segment, CFG will only update
  581. it once.  If both are used with an Env command information subcommand, master
  582. environment data is returned.  See the DOS section for the gory details.  If the
  583. switches are used singly, only the designated environment is updated.
  584.  
  585.  
  586.  
  587. 4.4  MultiCommand Mode
  588.  
  589.  
  590.                                                                                    [Return]
  591. CFG's MultiCommand mode allows more than one CommandName on the command line.
  592. The standard separator between commands is the semi-colon.  CFG treats each
  593. section in MultiCommand mode completely independent of any other.
  594.  
  595. All switches and variables are reset, but environment changes are cumulative.
  596. It is just like running the program again.  See the Sample section for examples.
  597. Help is not available in MultiCommand mode.
  598.  
  599. Be aware that DOS will strip semi-colons from passed parameters (%1, %2, etc.)
  600. in a batch file if that is how you build CFG's command line.  DOS does this
  601. because it treats a semi-colon as white space.
  602.  
  603.  
  604.  
  605. 4.5  Number Base
  606.  
  607.  
  608.                                                                                    [Return]
  609. The /Bn switch allows you to specify the number base used by CFG.  All
  610. subsequent number input and output for that command is with the specified base.
  611. If the value of "n" is not between 2 and 16, the switch is ignored without an
  612. error message.  In this case, the default base 10 is used.  The command must
  613. specifically support this switch for it to be in effect.  No error is generated
  614. if the switch is present for a command that does not support it (it is just
  615. ignored).
  616.  
  617.  
  618.  
  619. 4.6  Return ErrorLevel
  620.  
  621.  
  622.                                                                                    [Return]
  623. Generally, the exit ErrorLevel is 0 for off/invalid/disabled/etc. and 1 for
  624. on/valid/enabled/etc.  Specific values are given for each command.  An
  625. ErrorLevel of 255 or similar high number generally indicates that an error
  626. occurred.  Commands with no particular exit ErrorLevel will always return 0.  A
  627. decimal output of the number may be placed in the environment variable "EL" if
  628. the /E@ switch is used.
  629.  
  630. To amplify the Global section description:
  631.   *  /E displays the basic ErrorLevel as a decimal number.
  632.   *  /E+ displays the ErrorLevel with the CommandName and SubCommandName.
  633.   *  /E@ places the ErrorLevel in the environment variable "EL".  It will not
  634.       display the basic ErrorLevel.
  635.   *  /EE@ (or /E@E) displays the basic ErrorLevel with environment output also.
  636.   *  The "+" option overrides the "E" option if both are used.
  637.   *  A "!" may be used in conjunction with any of these to tell CFG which
  638.       ErrorLevel of a MultiCommand command line to return.
  639.   *  Clear as mud?
  640.  
  641.  
  642.  
  643. 4.7  Messages
  644.  
  645.  
  646.                                                                                    [Return]
  647. CFG's information messages contain the following elements:
  648.   *  Program name
  649.   *  Program version
  650.   *  CommandName
  651.   *  SubCommandName (if applicable)
  652.   *  Command number (for a MultiCommand command line)
  653.   *  Error warning (if an error occurred)
  654.   *  Message text
  655.   *  ErrorLevel (for error messages)
  656.  
  657. CFG provides numerous error messages to make problems easier to diagnose and
  658. correct.  This is useful in CONFIG.SYS since rebooting multiple times to get
  659. things right can be tedious.  ErrorLevel reporting is available from both
  660. CONFIG.SYS and the command line although it can only be acted on from a batch
  661. file.
  662.  
  663.  
  664.  
  665. 4.8  Notes
  666.  
  667.  
  668.  
  669. The following general notes pertain to many aspects program operation.
  670.  
  671.  
  672. 4.8.1  Usage From CONFIG.SYS and the Command Line
  673.  
  674.                                                                                    [Return]
  675. CFG is a dual-mode program that will run both as a non-resident device driver
  676. from CONFIG.SYS and as a command line/batch file utility.  The title line of
  677. each command below specifies whether it can be used from CONFIG.SYS, from a
  678. BATCH file (command line) or from both.
  679.  
  680. The standard requirements for running CONFIG.SYS device drivers apply.  Section
  681. 4.1 Commandabove gives you the details.  Briefly, each line begins with
  682. "Device=" to tell the DOS system initialization routine to load a device driver.
  683. This is followed by the full Path to the CFG executable.  This is required since
  684. DOS has not yet read the Path statement in your AUTOEXEC.BAT file.  Next comes
  685. the CFG executable name and the command line parameters you desire.  DOS handles
  686. the Device= line to the left of CFG's name, CFG handles the rest.
  687.  
  688. CFG is compatible with other device drivers and may be executed as many times as
  689. desired.  I personally place a KeyPause command after every device driver
  690. installation line to allow me to pause the display.
  691.  
  692.  
  693. 4.8.2  On Loading High
  694.  
  695.                                                                                    [Return]
  696. Do *NOT* try to load CFG into an Upper Memory Block.  Since unpredictable errors
  697. may occur, CFG determines its load location at program start.  If CFG is running
  698. above the 640KB boundary, it terminates immediately with the error"Unable to run
  699. in upper memory."
  700.  
  701. This error is normal.  To correct it in CONFIG.SYS, remove the "DeviceHigh" from
  702. the start of the CFG command line and substitute "Device."  From a batch file,
  703. remove the "LoadHigh" or "LH" from the start of the CFG command line and run the
  704. program normally.  Running high is not allowed for your sanity.
  705.  
  706.  
  707. 4.8.3  Case on the Command Line
  708.  
  709.                                                                                    [Return]
  710. Case does not matter in CONFIG.SYS since DOS capitalizes everything in the file
  711. during its parsing scans.  Using mixed case in your CONFIG.SYS file may actually
  712. make things easier to read and understand.  See the Sample section below for an
  713. example.  This shift to all upper case is pertinent when using the Cecho, Echo
  714. or EchoPause commands in CONFIG.SYS.  I provide a toggle to shift the echoed
  715. line to/from lower case to enhance readability.
  716.  
  717. CFG does the same shift internally when parsing the command line, so you may use
  718. any mixture of case you desire on the CFG input line.
  719.  
  720.  
  721. 4.8.4  DOS Environment
  722.  
  723.                                                                                    [Return]
  724. The DOS command interpreter COMMAND.COM maintains an area of memory called the
  725. environment in which it stores specially formatted information that is globally
  726. available to all programs and batch files.  The environment block contains a
  727. list of ASCIIZ strings (strings of ASCII characters, each terminated by a zero
  728. byte) that store various information.  You may view the contents of the
  729. environment by typing "SET" at the command line prompt.
  730.  
  731. The DOS environment size for the resident command processor is specified with
  732. the SHELL command in CONFIG.SYS.  The COMMAND.COM /E:nnnnn switch specifies the
  733. environment size, where "nnnnn" must be in the range 160 through 32768.  DOS
  734. rounds this number up to a multiple of 16 bytes.  If "nnnnn" is less than 160 or
  735. greater than 32768, DOS uses the default size of 256 bytes and displays a
  736. "Parameter value not in allowed range" error (actually just a warning).  The
  737. environment size can only be changed by editing CONFIG.SYS and rebooting the
  738. system under most circumstances.  See the Sample section below for an example
  739. SHELL line.
  740.  
  741. Each environment string is of the form "NAME=value", where NAME is capitalized
  742. and may be of reasonable length and "value" can be almost anything.  The only
  743. thing that cannot be in an environment string is an equals sign (since it
  744. separates the NAME and "value") and a zero byte (since it is the string
  745. terminator).
  746.  
  747. The environment is accessible via the DOS SET command.  DOS automatically
  748. capitalizes all NAME variables.  The CFG Env Set command and /@EnVar switch will
  749. allow you to specify exactly the case of the NAME.  See below how you can change
  750. this behavior.  Environment variables with lower case letters may be displayed
  751. by the DOS SET command, but they cannot be changed.
  752.  
  753. Each program receives a copy of the DOS environment for its local use on
  754. execution.  The size of this local environment is always rounded up to the next
  755. largest number divisible by 16 based on the total length of strings currently in
  756. the environment.  This is due to the way DOS allocates blocks of memory in
  757. paragraph (16 byte) amounts.  This leaves little or no room for further
  758. expansion and storage.
  759.  
  760. CFG manipulates the DOS environment(s) directly.  I normally dislike doing stuff
  761. like this, but it ended up being just too useful an ability to pass up.  CFG
  762. output is _much_ easier to use by stuffing it into the environment and allowing
  763. DOS to do the string manipulations and concatenations.  Note that a batch file
  764. line that invokes environment variables will be processed by DOS using the
  765. active environment -- CFG will never know environment variables were involved
  766. (and for my sanity, I do not want to know!).
  767.  
  768. Note that DOS will automatically extend the size of the active environment if it
  769. is adjacent to a free memory block and environment variables are entered from
  770. the command line.  As soon as a batch file or a program is loaded into memory,
  771. the size of the environment is constrained.  In the case of a secondary command
  772. processor, it will be cut off at the start of the next paragraph of memory.
  773. This is what causes the environment of a secondary command processor to only
  774. have between 0 and 15 bytes of free space.
  775.  
  776. There are several methods to locate the master environment.  The pros and cons
  777. of each method are discussed in detail in Andrew Schulman's (et al) excellent
  778. book _Undocumented DOS_ (Second Edition) [highly recommended!].  I refer you
  779. there for the detailed discussion.  Suffice it to say that the first method I
  780. used to locate the environment was to walk the chain of Memory Control Blocks to
  781. locate COMMAND.COM.
  782.  
  783. I had a problem with assumptions when I ran into 386^Max version 7 and its
  784. DOSMAX utility, which can load the COMMAND.COM stub into a UMB.  I (and many
  785. others) had never expected this (silly us), so the routine failed.
  786.  
  787. I fixed this by linking in the UMB memory chain.  This, however, assumes that
  788. the memory manager involved supports the standard DOS UMB link and strategy
  789. commands.  Due to the possibility of faking this test out, it is now the
  790. secondary option available via the /1B switch.  The new default method uses the
  791. DOS Interrupt 1EH vector.  This method is available via the /1 or /1A switch.
  792. Normally, you need just specify /1 on the command line for the master
  793. environment.  Neither /1 or /2 is required unless you need to specify the
  794. specific environment.  Even this method is not infallible if you are playing
  795. around with some resident debuggers.
  796.  
  797. As a side note to all of this, PC Magazine published a DOS Debug script in their
  798. January 25, 1994 issue that created UMB.COM.  This small utility changed the DOS
  799. memory strategy at the end of CONFIG.SYS execution so that the UMB area was the
  800. preferred load location when COMMAND.COM was initially executed and going
  801. resident.  As you may expect, the master environment followed it into a UMB and
  802. CFG had a problem again.  This one is also fixed by the changes noted above.
  803.  
  804. Windows 95 changes everything.  Under Windows 95, there is only one environment
  805. in a DOS window, so the /1 and /2 switches have identical output.  A standard
  806. DOS box behaves the same as running straight DOS did previously.
  807.  
  808. Several people asked to change the default CFG uses for /@EnVar to always
  809. capitalizing the "EnVar".  I did not because that may break systems that depend
  810. on this behavior.  Changing the default would change the way batch files are
  811. processed.  I added the "=" option to /@ to give CFG this ability without
  812. changing the default.  Since "=" cannot be in an environment name or value, it
  813. is perfect for this application.
  814.  
  815.  
  816. 4.8.5  Undocumented DOS
  817.  
  818.                                                                                    [Return]
  819. An unfortunate fact of life is that documentation is often terrible.  [NOTE:
  820. This does _*not*_ apply to me since I try to believe that *my* documentation is
  821. superb.  <VBG!>]
  822.  
  823. One of the things the Microsoft does not document, but many people use, is a
  824. special DOS data area.  The data area goes by several popular names:  List of
  825. Lists, SysVars, SysInitVars.  Whatever you call it, DOS cannot exist without
  826. this group of variables.  Neither can CFG.
  827.  
  828. I note in each section of this file if the particular command uses undocumented
  829. information.  In most cases, this use of undocumented DOS starts with that
  830. special DOS data area.  This is a relatively minor use of undocumented DOS, as
  831. such things go, but I feel compelled to admit its use since I am providing a
  832. general utility program that is intended to be reliable under all versions of MS-
  833. DOS.  [Note that I say _MS-DOS_.  Please do not hold me responsible for
  834. DR/Novell/PC DOS or 4DOS/NDOS.]
  835.  
  836. Andrew Schulman is the master of undocumented DOS.  That said, I recommend
  837. Andrew's _Undocumented DOS_, Second Edition as a basic source for an explanation
  838. of undocumented DOS calls and behavior.  There are several other texts that also
  839. pertain and are listed in the Bibliography section.  I recommend all of them as
  840. a basic reference library if you are trying to program for DOS.  You can
  841. certainly accomplish much using only documented functions, but the use of
  842. undocumented functions and data structures is the only way to accomplish some
  843. tasks.  Witness some of the functions that CFG provides.
  844.  
  845. If you have any undocumented DOS questions, I will be happy to answer them.
  846. Alternatively, I recommend the "Undocumented Corner" (Section 4) of the Doctor
  847. Dobbs Journal Forum on CompuServe (GO CIS:DDJFORUM) as the ultimate source.
  848. Andrew Schulman, Jim Kyle, Geoff Chappell, Max Pietrek and many other notables
  849. of undocumented programming hang out there (I lurk, I do not consider myself a
  850. notable).
  851.  
  852.  
  853.                               Chapter 5:  Commands
  854.                                         
  855.                                         
  856. The commands below are generally in alphabetical order except for those which
  857. are closely related by function.  The leading "###" for each command is required
  858. for the search engine in the CFG Help command.
  859.  
  860. All command line formats and examples given below should be understood to begin
  861. with "Device=[d:][path]Cfg.Com " in the CONFIG.SYS file or "[d:][path]Cfg " from
  862. the command line unless specified otherwise.
  863.  
  864.  
  865. *### Add  ### Sub  ### Mul  ### Div  ### Mod                                        [BATCH]
  866. **### And  ### Xor  ### Not  ### Or**
  867. *
  868. Perform various arithmetic operations on the arguments.  [Return]
  869.  
  870.       Add [/@EnVar] [/Q] [/Bn] a b c ...                                           2.3  2.4
  871.       Sub [/@EnVar] [/Q] [/Bn] a b c ...                                           2.3  2.4
  872.       Mul [/@EnVar] [/Q] [/Bn] a b c ...                                           2.3  2.4
  873.       Div [/@EnVar] [/Q] [/Bn] a b                                                 2.3  2.4
  874.       Mod [/@EnVar] [/Q] [/Bn] a b                                                 2.3  2.4
  875.  
  876.       And [/@EnVar] [/Q] [/Bn] a b                                                 2.3  2.4
  877.       Or  [/@EnVar] [/Q] [/Bn] a b                                                 2.3  2.4
  878.       Xor [/@EnVar] [/Q] [/Bn] a b                                                 2.3  2.4
  879.       Not [/@EnVar] [/Q] [/Bn] a                                                   2.3  2.4
  880.  
  881. CFG performs internal 64-bit arithmetic and returns a 32-bit result.  With this
  882. accuracy, the largest number CFG can handle is 2^^32-1, or 4,294,967,295.  This
  883. should be adequate for most purposes.  CFG performs unsigned operations so all
  884. values must be positive.  All commands support the /Bn Base switch.  Also see
  885. the Convert command for converting numbers between number bases.
  886.  
  887.   *  Add - Sums the numbers on the command line.  An overflow error is generated
  888.       if the result exceeds the 32-bit limit given above.
  889.   *  Sub - Subtracts the number "b", "c", etc. from "a".  An underflow error is
  890.       generated if the result goes negative.
  891.   *  Mul - Multiplies the numbers on the command line.  An overflow error is
  892.       generated if the result exceeds the 32-bit limit given above.
  893.   *  Div - Divides "a" by "b" and returns the quotient.  A divide by zero error
  894.       is generated if the divisor "b" is zero.
  895.   *  Mod - Divides "a" by "b" and returns the remainder.  A divide by zero error
  896.       is generated if the divisor "b" is zero.
  897.   *  And - Performs a bitwise AND of "a" and "b".
  898.   *  Or - Performs a bitwise OR of "a" and "b".
  899.   *  Xor - Performs a bitwise exclusive OR of "a" and "b".
  900.   *  Not - Takes the inverse of "a".
  901.  
  902.  
  903. *### ANSI                                                                    [CONFIG/BATCH]
  904. *
  905. Determine if the ANSI driver is loaded in memory.  [Return]
  906.       
  907.       ANSI                                                                         2.0  2.1
  908.  
  909.    ANSI Exit ErrorLevels
  910. ---------------------------------------------
  911. 0          ANSI is not installed
  912. 1          ANSI is installed
  913.  
  914. Determines if any ANSI driver is installed by writing an ANSI cursor positioning
  915. string to the screen.
  916.  
  917.  
  918. *### ASCII                                                                          [BATCH]
  919. *
  920. Read input numbers and write the corresponding ASCII characters.  [Return]
  921.       
  922.       ASCII [/Bn] a b c ...                                                        2.0  2.3
  923.  
  924. where "a b c ..." represent numbers.  The command reads the numbers and writes
  925. the corresponding ASCII characters to DOS StdOut, allowing the output to be
  926. redirected as desired.  This is a very useful way of creating short temporary
  927. files or sending printer control characters.  The quantity of input numbers is
  928. limited only by DOS command line length.  The /Bn Base switch specifies the
  929. number base to be used for command line numbers.  The /Q switch has no affect on
  930. this command.  Numbers greater than 255 are ignored.
  931.  
  932. Example command use:
  933.  
  934.       Cfg RandomFile /@RETURN %TEMP%
  935.       Cfg ASCII 64 67 68 32 > %TEMP%\%RETURN%.BAT
  936.       CD >> %TEMP%\%RETURN%.BAT
  937.  
  938. This example creates a unique random file name in the system TEMP directory,
  939. writes "@CD " to the temporary batch file and adds the current directory.
  940. Executing %TEMP%\%RETURN%.BAT will return you to the current directory.
  941.  
  942.  
  943. *### Batch
  944.  
  945.                                                                                 **[BATCH]**
  946. *
  947. Return information concerning the currently running batch file.  [Return]
  948.       
  949.       Batch SubCommandName [/Q] [/@EnVar]                                              2.42
  950.  
  951. NOTE:  Uses undocumented information.
  952.  
  953. The following are valid SubCommandNames: Call, Command, Drive, FullName, Name,
  954. Params, Path, Reset.  Each SubCommandName may be abbreviated as desired.  All
  955. returned strings are in capitals, except for the Params SubCommand, which
  956. returns the 1-25 parameters with the case as entered.  Place the result of
  957. individual string commands into the desired environment using the /@EnVar
  958. switch.  This command displays the output strings by default.  Suppress this
  959. display with the /Q Quiet switch.  An error message is generated if this command
  960. is run from the command line vice a batch file.  This command requires DOS
  961. Version 3.3 or higher.
  962.  
  963.   *  Call:  Determines if the batch file was executed from the command line or
  964.       was CALL-ed from another batch file.  If the currently running batch file
  965.       was started without a CALL from another batch file, it completely replaces
  966.       the previously running batch file, although prior CALL-s remain in effect.
  967.       There is no way to tell if this happened without reading through the batch
  968.       file itself.
  969.  
  970.    Batch Call Exit ErrorLevels
  971. ---------------------------------------------
  972. 0        Top level batch file.  It has not been CALL-ed.
  973. Else     Nesting level of the CALL-s.
  974.  
  975.   *  Command:  Returns the full string used to launch the running batch file
  976.       from either the command line or a CALL-ing batch file.  This may be almost
  977.       anything.  It may be as simple as just the name.  It may include the .BAT
  978.       ending.  It may have a full or partial path specification.  It also
  979.       includes any command line parameters that were passed (input prior to any
  980.       SHIFT commands).  Note that DOS strips out "white space", so what you get
  981.       back is without the extra spaces, equal signs, semi-colons, etc.
  982.   *  Drive:  The drive the batch file is executing from.  This returned in the
  983.       form "d:".
  984.   *  FullName:  The fully-qualified file name used to execute the batch file.
  985.       This includes the drive letter, full path and file name with .BAT ending.
  986.   *  Name:  The name of the executing batch file.  The name includes the .BAT
  987.       ending.
  988.   *  Params [/1 | /2]:  An extremely useful command if you need to access more
  989.       than nine command line parameters at the same time.  Does not require the
  990.       use of the DOS SHIFT command.  This option takes the command line
  991.       parameters for the currently running batch file and places them into
  992.       environment variables with names "0" through "25".  Any previously
  993.       existing values are deleted.  Thus, using %0%, %1%, %2%, ..., %25% instead
  994.       of the regular %0, %1, %2, ..., %9 will give you access to up to 26
  995.       command line parameters vice the normal DOS maximum of 10.  You should
  996.       expressly specify which environment you want the variables created in,
  997.       although the command defaults to the master environment.  The /@EnVar
  998.       switch is ignored by this command.  Run the Reset SubCommand to clean up.
  999.       (There is no programming reason that limits CFG to 0-25.  It just seemed
  1000.       like a reasonable number.)
  1001.   *  Path:  The drive letter and full path of the executing batch file without
  1002.       the trailing "\" or the Name.
  1003.   *  Reset:  Removes the environment strings created by the Params SubCommand.
  1004.       These strings may also be removed using DOS SET commands.  This command
  1005.       searches for the "0" variable and deletes all further _sequential_
  1006.       variables it finds.  The /@EnVar switch has no meaning for this command.
  1007.  
  1008.  
  1009. *### Beep                                                                    [CONFIG/BATCH]
  1010. *
  1011. Beep the speaker.  [Return]
  1012.       
  1013.       Beep [m n [, m n] ... ] [/Bn] [/N]                                      1.0  2.0  2.2
  1014.  
  1015. where "m" corresponds to a frequency in Hertz and "n" corresponds to the number
  1016. of 1/18 second increments that comprise the duration.  The /N switch tells CFG
  1017. to not flush the keyboard buffer prior to executing the command.  If nothing is
  1018. specified, the default sound is a C note for 1/6 of a second (1046,3).  By
  1019. separating the argument pairs with commas, a series of tones may be produced
  1020. with the same command.  Pressing any key while playing ends the command.  Commas
  1021. are strictly interpreted as separators.
  1022.  
  1023.  
  1024. *### Blink                                                                   [CONFIG/BATCH]
  1025. *
  1026. Enable blinking screen characters.  [Return]
  1027.       
  1028.       Blink                                                                        2.0  2.3
  1029.  
  1030. Calls Interrupt 10H Function 10H Subfunction 3 to enable blinking characters on
  1031. EGA and above.  Any characters with intense backgrounds will start blinking.
  1032.  
  1033.  
  1034. *### Boot                                                                          [CONFIG]
  1035. *
  1036. Modify CONFIG.SYS in memory during execution.  [Return]
  1037.       
  1038.       Boot SubCommandName                                                               2.2
  1039.  
  1040. NOTE:  Uses undocumented information.
  1041.  
  1042. The following are valid SubCommandNames: NoError.  Each SubCommandName may be
  1043. abbreviated as desired.  Error messages are displayed if the routine fails.
  1044.  
  1045.   *  NoError:  Scans the tokenized CONFIG.SYS file in memory and changes any
  1046.       lines which will display an "Unknown command" error to a Remark.  This
  1047.       effectively hides errors from the DOS parser.  This option currently works
  1048.       under DOS version 5.0 only. It will report the number of errors which it
  1049.       cleared.  It is important to note that this only works on DEVICE
  1050.       statements in CONFIG.SYS since general parameters (such as FILES, BUFFERS
  1051.       or SHELL) are evaluated prior to loading device drivers.
  1052.  
  1053.  
  1054. *### Border                                                                  [CONFIG/BATCH]
  1055. *
  1056. Set the screen border color.  [Return]
  1057.       
  1058.       Border [Color]                                                                    2.0
  1059.  
  1060. The notes on colors for the Cls command apply to the Border command except as
  1061. noted here.
  1062.  
  1063. If no color is given or an invalid color is specified, the current screen
  1064. background color at the cursor location is used.  If anything appears after the
  1065. CommandName that cannot be parsed as a color, an error message is displayed.
  1066.  
  1067.  
  1068. *### Break                                                                          [BATCH]
  1069. *
  1070. Determine status of DOS extended Break checking.  [Return]
  1071.       
  1072.       Break                                                                             2.0
  1073.  
  1074.    Break Exit ErrorLevels
  1075. ---------------------------------------------
  1076. 0        Break is off
  1077. 1        Break is on
  1078.  
  1079.  
  1080. *### CanCopy                                                                        [BATCH]
  1081. *
  1082. Determine if there is enough room to copy files to a disk.  [Return]
  1083.       
  1084.       CanCopy FileSpec [d:]                                                             2.0
  1085.  
  1086.    CanCopy Exit ErrorLevels
  1087. ---------------------------------------------
  1088. 0         No room to copy files or DOS file error
  1089. 1         Room to copy files
  1090.  
  1091. where FileSpec can use any DOS wildcards and "d:" corresponds to a valid DOS
  1092. drive.  If "d:" is omitted, the default drive is used.  The FileSpec search is
  1093. not recursive.  It will examine only the directory specified.
  1094.  
  1095.  
  1096. *### Cecho                                                                   [CONFIG/BATCH]
  1097. *
  1098. Echo text to the screen with the specified colors.  [Return]
  1099.       
  1100.       Cecho [/I | /K] [/C | /N] "Fore [on] Back" String                  2.0  2.1  2.3  2.4
  1101.  
  1102. The desired screen color for String must be enclosed in double quotes.  The
  1103. notes for the Cls command use of colors apply.  The /C switch is used to output
  1104. a carriage return only at the end of the String, returning the cursor to the
  1105. first column for overwriting the previous output.  The /I switch calls the
  1106. Intense command to enable intense backgrounds on EGA and above.  The /K switch
  1107. calls the Blink command to enable blinking characters on EGA and above.  The /N
  1108. switch is used to eliminate the final carriage return/line feed, leaving the
  1109. cursor at the end of the String just displayed.  /I takes precedence over /K and
  1110. /N takes precedence over /C if all are included.
  1111.  
  1112. The displayed String starts with the first character after the closing double
  1113. quote of the color, leading spaces are included.  The Echo command line format
  1114. applies to the String.  The /Q switch has no affect on this command.
  1115.  
  1116.  
  1117. *### Cls                                                                     [CONFIG/BATCH]
  1118. *
  1119. Clear the screen with a choice of foreground and background colors.  [Return]
  1120.       
  1121.       Cls [Foreground [on] Background]                                        1.0  1.1  2.0
  1122.  
  1123.    Cls Colors
  1124. ---------------------------------------------
  1125. Black         Gray
  1126. Blue          Bright Blue
  1127. Green         Bright Green
  1128. Cyan          Bright Cyan
  1129. Red           Bright Red
  1130. Magenta       Bright Magenta
  1131. Yellow        Bright Yellow
  1132. White         Bright White
  1133.  
  1134. If any bright color in the right column is chosen for a background, the video
  1135. display is reprogrammed to show intense background colors vice blinking text.
  1136. Programs may reset this, causing all text on the screen to start blinking.
  1137.  
  1138. If ANSI is not installed, the screen is cleared using a BIOS window scroll.  The
  1139. screen colors may not remain permanent depending on the behavior of the video
  1140. adapter.  If ANSI is installed before CFG is run, CFG will detect it and use
  1141. ANSI escape sequences to change system colors.
  1142.  
  1143. If no colors are given or if an invalid combination is used, the current screen
  1144. colors at the cursor location are used.  If anything appears after the
  1145. CommandName that cannot be parsed as a color, an error message is displayed with
  1146. a three second WaitFor pause prior to continuing with the clear screen.
  1147.  
  1148. Cls sets the screen border (overscan register) to the same color as the
  1149. background.  Use the Border command if you want to change this.  It also
  1150. restores the cursor size to what it was initially since some ANSI clear screen
  1151. routines change the cursor size.
  1152.  
  1153. NOTE:  The "Bright ..." colors are scanned on the command line with only a
  1154.       single space between the words. Otherwise, CFG will accept any number of
  1155.       spaces between words.
  1156.  
  1157.  
  1158. *### CodePage                                                                       [BATCH]
  1159. *
  1160. Determine the current system code page table.  [Return]
  1161.       
  1162.       CodePage [/Q] [/@EnVar]                                                           2.2
  1163.  
  1164.    CodePage Exit ErrorLevels
  1165. ---------------------------------------------
  1166. 0         Code Page 437  [English-United States]
  1167. 1         Code Page 850  [Multilingual (Latin I)]
  1168. 2         Code Page 852  [Slavic (Latin II)]
  1169. 3         Code Page 860  [Portugal]
  1170. 4         Code Page 861  [Iceland]
  1171. 5         Code Page 863  [French Canadian]
  1172. 6         Code Page 865  [Norway/Denmark]
  1173. 254       Unknown Code Page
  1174. 255       Invalid DOS version
  1175.  
  1176. The code page number is displayed.  This command requires DOS version 3.3 or
  1177. higher.
  1178.  
  1179.  
  1180. *### ColdBoot                                                                       [BATCH]
  1181. *
  1182. Perform equivalent of a power-on system reset.  [Return]
  1183.       
  1184.       ColdBoot SubCommandName [/V]                                2.0  2.1  2.3  2.32  2.42
  1185.  
  1186. The following are valid SubCommandNames:  WaitFor, WaitTo, Verify.  Each
  1187. SubCommandName may be abbreviated as desired.  Error messages are displayed if
  1188. the routine fails.
  1189.  
  1190. All disk buffers that may not yet be written are flushed to disk via Interrupt
  1191. 21H Function 0DH (Disk Reset) prior to system reset.  EMM386 is shut down prior
  1192. to system restart.  For 8086/8088 processors only, the command jumps to
  1193. FFFF:0000 after clearing the warm boot flag in the BIOS data area.  For 80286+
  1194. processors, the system is reset via the keyboard controller for reliability.
  1195. The /V Verify switch is available for use with the WaitFor and WaitTo
  1196. subcommands.  Use the WarmBoot command to simulate a keyboard Ctrl-Alt-Delete
  1197. reset.
  1198.  
  1199.   *  WaitFor:  Executes the WaitFor command first.  All command line options of
  1200.       the WaitFor command are available.
  1201.   *  WaitTo:  Executes the WaitTo command first.  All command line options of
  1202.       the WaitTo command are available.
  1203.   *  Verify:  Prompt before rebooting.
  1204.  
  1205.  
  1206. *### Color                                                                   [CONFIG/BATCH]
  1207. *
  1208. Set screen color for future output using ANSI escape sequences without clearing
  1209. the screen.  [Return]
  1210.       
  1211.       Color Foreground [on] Background                                                  1.1
  1212.  
  1213. The notes on colors for the Cls command apply to the Color command except as
  1214. noted here.
  1215.  
  1216. ANSI must be installed.  If it is not installed, the command is aborted with an
  1217. error message.  If no colors are given or if an invalid combination is used, an
  1218. error message is displayed.
  1219.  
  1220. The Color command is designed to be used immediately after ANSI has been loaded
  1221. into memory to set its default colors from gray on black to what you desire.  It
  1222. may also be used to highlight the output of a specific program or group of
  1223. programs that do not use the BIOS for output.  Note that Color will not repaint
  1224. the screen.  It only sets the color of any _future_ output made via DOS.  A
  1225. program that writes to the screen via direct BIOS calls specifies its own
  1226. colors.  Use the Cls command to reset the entire screen.
  1227.  
  1228.  
  1229. *### Cols                                                                           [BATCH]
  1230. *
  1231. Determine the number of displayed columns.  [Return]
  1232.       
  1233.       Cols                                                                              2.0
  1234.  
  1235. The returned ErrorLevel is based on the value stored in the BIOS data area.
  1236.  
  1237.  
  1238. *### ComBaud                                                                 [CONFIG/BATCH]
  1239. *
  1240. Returns the baud rate of the indicated serial port.  [Return]
  1241.       
  1242.       ComBaud n [/Q] [/@EnVar]                                                          2.4
  1243.  
  1244.    ComBaud Exit ErrorLevels
  1245. ---------------------------------------------
  1246. 0         Error         7         4800 baud
  1247. 1         110 baud      8         9600 baud
  1248. 2         150 baud      9         14,400 baud
  1249. 3         300 baud      10        19,200 baud
  1250. 4         600 baud      11        38,400 baud
  1251. 5         1200 baud     12        57,600 baud
  1252. 6         2400 baud     13        115,200 baud
  1253.  
  1254. where "n" is the serial port to be tested.  Valid numbers are 1, 2, 3 and 4.  An
  1255. error message is given if the port is missing or invalid.
  1256.  
  1257. The exact baud rate is displayed.  An intermediate rate will return the
  1258. ErrorLevel of the faster rate.
  1259.  
  1260.  
  1261. *### ComHide                                                                       [CONFIG]
  1262. *
  1263. Hide and restore the serial port base addresses.  [Return]
  1264.       
  1265.       ComHide SubCommandName                                                            1.0
  1266.  
  1267. The following are valid SubCommandNames:  Hide, Restore.  Each SubCommandName
  1268. may be abbreviated as desired.  Error messages are displayed if the routine
  1269. fails.
  1270.  
  1271.   *  Hide:  Hides the serial port base addresses by copying them to a high
  1272.       memory location.
  1273.   *  Restore:  Command verifies the signature and checksum stored with the port
  1274.       addresses to ensure that they were not accidentally over-written while
  1275.       hidden.  The command then copies the base addresses back to their normal
  1276.       location.
  1277.  
  1278. The default location for the hidden data is 7001:0000 for DOS versions before
  1279. 5.0.  This is below the 512 KB boundary in the event that the machine only has
  1280. that much base memory available, and high enough to keep it from being over-
  1281. written during execution of other device drivers while the data is hidden.  For
  1282. DOS Version 5.0+, the location will vary depending on what the SysInit loader
  1283. module reports as the maximum available memory in the device driver header.
  1284. This prevents interference with the larger memory requirements in the upper
  1285. areas around the 640 KB point that can occur under DOS 6.0+ with large multiple-
  1286. configuration CONFIG.SYS files.
  1287.  
  1288. Example command lines:
  1289.  
  1290.       CFG.COM ComHide Hide
  1291.       MANGLE.SYS
  1292.       CFG.COM ComHide Restore
  1293.  
  1294.  
  1295. *### Compare                                                                        [BATCH]
  1296. *
  1297. Compare two strings.  [Return]
  1298.       
  1299.       Compare [/C] String1 String2                                                      2.0
  1300.  
  1301.    Compare Exit ErrorLevels
  1302. ---------------------------------------------
  1303. 0         Strings are not the same
  1304. 1         Strings are the same
  1305.  
  1306. String1 and String2 must be a single group of characters, containing no
  1307. separators.  The comparison is case sensitive.  The /C switch makes the
  1308. comparison case insensitive.
  1309.  
  1310.  
  1311. *### ComSet                                                                  [BATCH/CONFIG]
  1312. *
  1313. Sets the serial port base addresses to a default or specified value.  [Return]
  1314.       
  1315.       ComSet a [b]                                                                      2.4
  1316.  
  1317. CAUTION:  This command changes values established by the BIOS on system startup.
  1318.       Be very careful with its use.
  1319.  
  1320. Where "a" corresponds to the desired port base address to set: 1, 2, 3 or 4.
  1321. The "b" corresponds to an optional hexadecimal value to set the port base
  1322. address to.  No checking is performed to warn of values being overwritten.
  1323.  
  1324. This command places a default port base address value (or the specified value)
  1325. in the appropriate location in the low memory DOS data area.  The default values
  1326. used for the ports are 3F8H, 2F8H, 3E8H and 2E8H.  If your system uses different
  1327. values, you must specify them as "b" on the command line.
  1328.  
  1329. You can set multiple base addresses to the same value to access the same
  1330. physical port using different DOS port names.  Note that this command does not
  1331. address any changes with the IRQ associated with a specific hardware port.
  1332.  
  1333.  
  1334. *### ComSwap                                                                 [CONFIG/BATCH]
  1335. *
  1336. Swap the serial base port addresses for the two serial ports specified.
  1337. [Return]
  1338.       
  1339.       ComSwap a b                                                                       1.0
  1340.  
  1341. where "a" and "b" are the numbers of the serial ports to be swapped.  Valid
  1342. numbers are 1, 2, 3 and 4.  An error message is given if one of the ports is
  1343. missing or invalid.
  1344.  
  1345. ComSwap switches the two ports as far as DOS is concerned.  This is useful if
  1346. you need to shift the port addresses around prior to loading software device
  1347. drivers.  This command may not have any effect for programs that use hard-coded
  1348. port addresses.  This command can not shift hardware IRQ values.  The contents
  1349. of the port addresses are not checked during the swap.
  1350.  
  1351. Example command line:
  1352.  
  1353.       ComSwap 4 2
  1354.  
  1355.  
  1356. *### Convert                                                                        [BATCH]
  1357. *
  1358. Changes numbers between number base systems.  [Return]
  1359.       
  1360.       Convert a b [/Bn]                                                                 2.3
  1361.  
  1362. where "a" is in the base specified by the /Bn switch (or the default decimal
  1363. system) and "b" is a decimal number specifying the base to convert "a" to.
  1364.  
  1365.  
  1366. *### CoProc                                                                         [BATCH]
  1367. *
  1368. Determine the Intel CoProcessor installed.  [Return]
  1369.       
  1370.       CoProc [/Q]                                                             2.0  2.2  2.3
  1371.  
  1372.    CoProc Exit ErrorLevels
  1373. ---------------------------------------------
  1374. 0         No coprocessor installed
  1375. 1         8087
  1376. 2         80287
  1377. 3         80387DX or 80387SX
  1378. 4         80486DX or 80487SX
  1379. 5         Pentium
  1380.  
  1381. This routine uses the Intel recommended techniques for properly determining what
  1382. type of coprocessor is installed in the system.  Use the CPU command to
  1383. determine which processor is present.
  1384.  
  1385.  
  1386. *### Country                                                                        [BATCH]
  1387. *
  1388. Determine the country code or return country specific information.  [Return]
  1389.       
  1390.       Country [n] [/Q] [/@EnVar]                                                  2.2  2.42
  1391.  
  1392. where "n", if present, is a decimal value between 0 and 9 that returns the
  1393. following information:
  1394.  
  1395.    Country Exit ErrorLevels and Meanings
  1396. n       ErrorLevel    String                 Description
  1397. ---------------------------------------------
  1398. None    ?             Decimal number         Country code
  1399. 0       0             Decimal number         Date: USA, mm dd yy
  1400. 0       1             Decimal number         Date: Europe, dd mm yy
  1401. 0       2             Decimal number         Date: Japan, yy mm dd
  1402. 1       0             Currency symbol
  1403. 2       0             Thousands separator
  1404. 3       0             Decimal separator
  1405. 4       0             Date separator
  1406. 5       0             Time separator
  1407. 6       0             Decimal number         Currency: Symbol before value
  1408. 6       1             Decimal number         Currency: Symbol follows value
  1409. 6       2             Decimal number         Currency: Symbol replaces decimal
  1410. point
  1411. 7       ?             Decimal number         Digits after currency decimal
  1412. 8       0             Decimal number         Time: 12-hour clock
  1413. 8       1             Decimal number         Time: 24-hour clock
  1414. 9       0             Data-list separator
  1415.  
  1416. The "n" values 1, 2, 3, 4, 5 and 9 are also valid for the Now command to include
  1417. in its output.  See the Now command for use.
  1418.  
  1419.  
  1420. *### CPU                                                                            [BATCH]
  1421. *
  1422. Determine the Intel microprocessor installed.  [Return]
  1423.       
  1424.       CPU                                                               2.0  2.2  2.3  2.41
  1425.  
  1426.    CPU Exit ErrorLevels
  1427. ---------------------------------------------
  1428. 0         8086/8088
  1429. 1         80286
  1430. 2         80386DX or 80386SX
  1431. 3         80486SX
  1432. 4         80486DX or 80487SX
  1433. 5         Pentium
  1434.  
  1435. This routine uses the Intel recommended techniques for properly determining what
  1436. type of CPU is installed in the system.  If an 486 class microprocessor has been
  1437. recognized, CFG will determine if the CPU has a floating point unit (486 DX CPU,
  1438. 487 SX MCP) or not (486 SX CPU).  For Pentium processors, the vendor
  1439. identification returned by the chip is displayed.  For Intel Pentium processors,
  1440. the stepping level, model and family numbers are also displayed.
  1441.  
  1442. Use the CoProc command to determine which math coprocessor is present.  See the
  1443. P5 command for details on the Pentium FDIV bug and the stepping levels it is
  1444. corrected in.
  1445.  
  1446.  
  1447. *### Cursor                                                                  [CONFIG/BATCH]
  1448. *
  1449. Change the size of the text mode screen cursor.  [Return]
  1450.       
  1451.       Cursor {SubCommandName | a b}                                                     2.0
  1452.  
  1453. where "a" and "b" are decimal numbers of the start and stop screen scan lines
  1454. for the cursor.  The following are valid SubCommandNames:  Default, Hide,
  1455. Restore.  Each SubCommandName may be abbreviated as desired.  If the routine
  1456. fails, error messages are displayed and the cursor size is not changed.
  1457.  
  1458.   *  Default:  Returns the cursor to the default values given below.
  1459.   *  Hide:  Sets the "invisible" bit code using Interrupt 10H Function 1.
  1460.   *  Restore:  Sets the "normal" bit code.  Some programs may modify this on
  1461.       their own.  There are known bugs in these functions in some EGA BIOS 43
  1462.       line modes.
  1463.  
  1464. The start and stop scan lines are numbered with line 1 at the bottom and
  1465. increasing towards the top.  Using this convention, the following cursor values
  1466. apply:
  1467.  
  1468.    Cursor Scan Line Values
  1469. Adapter           25 Line Default      43/50 Line Default    Maximum
  1470. ---------------------------------------------
  1471. CGA               1 2                  --                    8
  1472. EGA               2 3                  2 2                   1 4
  1473. VGA+              2 3                  2 2                   1 6
  1474.  
  1475. This numbering scheme is a little more consistent than what the BIOS expects and
  1476. lets the program calculate the values required by the BIOS.  If a number greater
  1477. than the maximum number of scan lines is entered, it is truncated to the
  1478. maximum.
  1479.  
  1480. Note that after a mode reset the cursor will be returned to its default size by
  1481. the BIOS.  You will need to issue the appropriate command to set it to the
  1482. desired shape.
  1483.  
  1484. Video adapter BIOS' implement the cursor functions differently.  You may not get
  1485. the results you expect when you specify scan lines, depending on your adapter.
  1486. Keep trying until you end up with a shape you like.
  1487.  
  1488. Example command lines:
  1489.  
  1490.       Cursor Hide
  1491.       Cursor 2 2
  1492.  
  1493.  
  1494. *### Day   ### WeekDay   ### Month                                                  [BATCH]
  1495. **### Year  ### FullYear  ### AM      ### PM**
  1496. **### Hour  ### Minute    ### Second**
  1497. *
  1498. Determine the return value for the appropriate time/date command.  [Return]
  1499.  
  1500.    CommandName     ErrorLevel Range    Updates
  1501. ---------------------------------------------
  1502. WeekDay [n]        0-6   *             2.0  2.1
  1503. Day [n]            1-31  *             2.0  2.1
  1504. Month [n]          1-12  *             2.0  2.1
  1505. Year               0-119               2.0
  1506. FullYear           0-99                2.0  2.2
  1507. Hour [n]           0-23  *             2.0  2.1
  1508. Minute [n]         0-59  *             2.0  2.1
  1509. Second             0-59                2.0
  1510. AM                 0-1                 2.0
  1511. PM                 0-1                 2.0
  1512.  
  1513. For WeekDay, an ErrorLevel of 0 corresponds to Sunday.  For Year, the ErrorLevel
  1514. corresponds to the number of years since 1980.  FullYear gives the last two
  1515. digits of the current year.  For AM and PM, an ErrorLevel of 1 is True, 0 is
  1516. False.
  1517.  
  1518. The commands with an asterisk also accept a single decimal number after the
  1519. CommandName and compare it to the ErrorLevel that would be generated for the
  1520. standard command.  If the values are equal, the return ErrorLevel is 1,
  1521. otherwise it is 0.  This allows comparisons to be done by CFG vice using
  1522. convoluted If ErrorLevel batch file structures.
  1523.  
  1524.  
  1525. *### DESQview                                                                       [BATCH]
  1526. *
  1527. Determine if Quarterdeck's DESQview is running.  [Return]
  1528.       
  1529.       DESQview                                                                          2.0
  1530.  
  1531.    DESQview Exit ErrorLevels
  1532. ---------------------------------------------
  1533. 0         DESQview is not running
  1534. Else      DESQview version [(32 * major) + minor]
  1535.  
  1536. Version 1.x identifies itself as version 1.0.
  1537.  
  1538.  
  1539. *### Device                                                                  [CONFIG/BATCH]
  1540. *
  1541. Determine if the specified device driver is resident in memory, rename it or
  1542. display a list of installed drivers.  [Return]
  1543.       
  1544.       Device SubCommandName {Options}                                              2.2  2.3
  1545.  
  1546.    Device Exit ErrorLevels
  1547. ---------------------------------------------
  1548. Exist      0         Not installed (also format error)
  1549.            1         Installed
  1550. Rename     0         Not renamed (also format error)
  1551.            1         Renamed
  1552.  
  1553. NOTE:  Uses undocumented information.
  1554.  
  1555. The following are valid SubCommandNames:  Exist, List, Rename.  Each
  1556. SubCommandName may be abbreviated as desired.  An error message is displayed if
  1557. there is a format error.
  1558.  
  1559.   *  Exist DeviceName:  This command scans the linked list of device drivers and
  1560.       checks if the requested DeviceName is in the chain.  It is important to
  1561.       note that this command searches for the *DOS* driver name, not the name of
  1562.       the file on disk.  For example, SmartDrive's driver name is SMARTAAR,
  1563.       EMM386's is EMMXXXX0 and Symantec's Ncache2 is @CACHE-X.  Some drivers
  1564.       hook in multiple driver headers and names for compatibility (Ncache2 also
  1565.       hooks SMARTAAR into the chain).
  1566.   *  List:  The DOS names of the installed device drivers are displayed.  _All_
  1567.       device names are displayed (including block devices which often contain
  1568.       garbage) but sometimes have a name in their last seven places.  Characters
  1569.       below ASCII 032 are replaced with ASCII 176 for display purposes.
  1570.   *  Rename DeviceName1 DeviceName2:  DeviceName1 is changed to DeviceName2.  An
  1571.       error is displayed if the DeviceName1 is not found, the DeviceName2 is
  1572.       omitted or if DeviceName2 is longer than eight characters.  Use this
  1573.       function with care since system operation may change as a result.
  1574.  
  1575.  
  1576. *### Dir                                                                            [BATCH]
  1577. *
  1578. Get the current drive and directory.  [Return]
  1579.       
  1580.       Dir [/Q] [/@EnVar] [Path]                                                         2.2
  1581.  
  1582.    Dir Exit ErrorLevels
  1583. ---------------------------------------------
  1584. 0         Successful
  1585. Else      DOS error number
  1586.  
  1587. The resultant directory path includes the current drive.  A final "\" is not
  1588. appended.  If anything is included on the command line, it is assumed to be a
  1589. request for a canonicalized name of the supplied Path.  The input path need not
  1590. actually exist.  If the Path is on a JOINed drive, the returned name is the one
  1591. that would be needed if the drive were not JOINed; similarly for a SUBSTed,
  1592. ASSIGNed or network drive letter.  For this reason, it is possible to get a
  1593. qualified name that is not legal under the current combination of SUBSTs,
  1594. ASSIGNs, JOINs and network redirections.
  1595.  
  1596. If the requested Path starts with ".." or ".", they are resolved to the parent
  1597. directory and current directory, including drive letter, using DOS Function 60H.
  1598. See the FileDir command for extracting the directory path from a supplied file
  1599. name.
  1600.  
  1601.  
  1602. *### DirExist                                                                       [BATCH]
  1603. *
  1604. Determine if the requested directory exists on disk.  [Return]
  1605.       
  1606.       DirExist [d:][path]DirectoryName                                                  2.0
  1607.  
  1608.    DirExist Exit ErrorLevels
  1609. ---------------------------------------------
  1610. 0         Directory does not exist
  1611. 1         Directory exists
  1612.  
  1613.  
  1614.  
  1615. *### Display                                                                        [BATCH]
  1616. *
  1617. Determine the display combination code.  [Return]
  1618.       
  1619.       Display                                                                           2.0
  1620.  
  1621.    Display Exit ErrorLevels
  1622. ---------------------------------------------
  1623. 1         MDA            7          VGA mono
  1624. 2         CGA            8          VGA color
  1625. 4         EGA color      11         MCGA mono
  1626. 5         EGA mono       12         MCGA color
  1627. 6         PGS
  1628.  
  1629.  
  1630. *### DosKey                                                                         [BATCH]
  1631. *
  1632. Determine if the DOSKEY command line editing and recall program is installed or
  1633. input/retrieve previous command lines.  [Return]
  1634.       
  1635.       DosKey [/I] [/M] [/@EnVar]                                                        2.2
  1636.  
  1637.    DosKey Exit ErrorLevels for /I
  1638. ---------------------------------------------
  1639. 0         Not installed or invalid DOS version
  1640. 1         Installed
  1641.  
  1642. The /I Installation switch overrides all others.  All previous command line
  1643. entries are accessible via the cursor keys.  All of the normal DOS editing keys
  1644. available with DOSKEY installed are accessible via this command except for F7
  1645. Redisplay Commands.
  1646.  
  1647. DOSKEY macros are available via this command.  If a macro name or a command with
  1648. DOSKEY special parameters may be entered, the /M Macro switch must be specified.
  1649. Since DOSKEY automatically displays its string on screen, the /Q switch is
  1650. permanently in effect.  Note that DOSKEY does not append a carriage return/line
  1651. feed to its string.  This must be provided, if desired, in the batch file.  This
  1652. command requires DOS version 5.0 or higher.
  1653.  
  1654. DOSKEY has only one buffered input function besides its installation check. When
  1655. this function returns, an output buffer identical to that required for DOS
  1656. Interrupt 21H Function 0AH is filled with the user input.  If the user input a
  1657. DOSKEY macro name or a string with special DOSKEY parameters, this buffer is
  1658. empty and the function must be called again to obtain the expansion.  This is
  1659. what the /M Macro switch checks for.  One side effect of this check is that if a
  1660. carriage return is input on a blank line, DOSKEY returns the same information
  1661. when it signals a macro expansion is pending.  Since CFG cannot tell the
  1662. difference between DOSKEY's output in these two situations, the program is
  1663. written to assume that a macro/special parameter has been entered and loop back
  1664. to retrieve the expansion of the macro/special parameter.  The result is that
  1665. with /M specified, a carriage return on a blank line will loop.  At least one
  1666. character must be entered to break out of the loop.
  1667.  
  1668. If a macro expands to several commands (i.e. commands separated by the "$t"
  1669. special character), each must be removed individually from DOSKEY's buffer.
  1670. Assigning each to a unique EnVar will keep them straight.  Executing the EnVar
  1671. will execute the command line as if it had been typed from the DOS command line.
  1672.  
  1673.  
  1674. *### DOSlocation                                                                    [BATCH]
  1675. *
  1676. Determine the location of the DOS kernel.  [Return]
  1677.       
  1678.       DOSlocation SubCommandName                                                        2.3
  1679.  
  1680.    DOSlocation Exit ErrorLevels
  1681. ---------------------------------------------
  1682. 0         False
  1683. 1         True
  1684.  
  1685. The following are valid SubCommandNames:  RAM, ROM, High, Low.  Each
  1686. SubCommandName may be abbreviated as desired, but must be unique.
  1687.  
  1688.  
  1689. *### DOSstartup                                                                     [BATCH]
  1690. *
  1691. Determine the drive from which DOS was booted.  [Return]
  1692.       
  1693.       DOSstartup [/Q] [/@EnVar]                                                         2.3
  1694.  
  1695. This command uses DOS Function 33H Subfunction 5 to determine the boot drive.
  1696. This command requires DOS version 4.0 or higher.  If DOS is in ROM, the command
  1697. returns the drive CONFIG.SYS is on.  The drive letter is also written.
  1698.  
  1699.  
  1700. *### DOSversion  ### DOSmajor  ### DOSminor                                         [BATCH]
  1701. *
  1702. Determine the DOS version.  [Return]
  1703.  
  1704.    CommandName      ErrorLevel Range            Updates
  1705. ---------------------------------------------
  1706. DOSmajor            2 - 6                       2.0
  1707. DOSminor            0 - 99                      2.0
  1708. DOSversion [/T]     (32 * major) + minor        2.0  2.2
  1709.  
  1710. For DOSminor, the return ErrorLevel is 22 for DOS 6.22, 31 for DOS 3.31, etc.
  1711. Note that DOS 4.01 reports itself as 4.00.  The /T True Version switch executes
  1712. the DOS 5.0+ Interrupt 21H Function 33H Subfunction 06H.  The regular DOS
  1713. version function is used if the true version call fails.
  1714.  
  1715.  
  1716. *### Drive                                                                          [BATCH]
  1717. *
  1718. Determine the current default drive.  [Return]
  1719.       
  1720.       Drive [/Q] [/@EnVar]                                                              2.0
  1721.  
  1722.    Drive Exit ErrorLevels
  1723. ---------------------------------------------
  1724. 1-26        Drive Number (A=1)
  1725.  
  1726. The default drive is displayed.
  1727.  
  1728.  
  1729. *### DriveExist                                                                     [BATCH]
  1730. *
  1731. Determine if the requested drive letter is a valid DOS drive.  [Return]
  1732.       
  1733.       DriveExist d:                                                               2.0  2.32
  1734.  
  1735.    DriveExist Exit ErrorLevels
  1736. ---------------------------------------------
  1737. 0         Invalid
  1738. 1         Valid
  1739.  
  1740. where "d:" corresponds to the drive to be tested.
  1741.  
  1742.  
  1743. *### DriveID                                                                        [BATCH]
  1744. *
  1745. Identify the type of drive specified.  [Return]
  1746.       
  1747.       DriveID d: [/F|/P]                                                                2.4
  1748.  
  1749.    DriveID Exit ErrorLevels
  1750. ---------------------------------------------
  1751. Physical drive ID     0         320K/360K disk
  1752.                       1         1.2M disk
  1753.                       2         720K disk
  1754.                       3         Single-density 8-inch disk
  1755.                       4         Double-density 8-inch disk
  1756.                       5         Fixed disk
  1757.                       6         Tape drive
  1758.                       7         1.44M disk
  1759.                       8         Read/write optical disk
  1760.                       9         2.88M disk
  1761.                       13        RAM disk
  1762.                       14        CD-ROM
  1763.                       15        Unidentified
  1764. Drive type flags      0         Physical
  1765. (added to above)      16        SUBST
  1766.                       32        JOIN
  1767.                       64        Remote
  1768.                       128       Invalid
  1769. Other                 253       /P specified on non-physical drive (no error
  1770. message)
  1771.                       254       Invalid drive designation
  1772.                       255       Invalid DOS version
  1773.  
  1774. NOTE:  Uses undocumented information. There are quite a number of possible
  1775.       return ErrorLevels depending on exactly what drive you test.  All
  1776.       ErrorLevels greater than 127 indicate an invalid drive.
  1777.  
  1778. This command identifies the type of drive specified on the command line by
  1779. examining the DOS Current Directory Structure.  If the flags identify the drive
  1780. as a physical one, Interrupt 21H Function 44H Subfunction 0DH is called to
  1781. identify the drive type. This command requires DOS version 5.0+.
  1782.  
  1783. If the flags indicate a CD-ROM drive, the flag ErrorLevel is cleared and the CD-
  1784. ROM ErrorLevel is returned.  If the drive is unidentified, and the RamDrive
  1785. command tests are satisfied, the flag ErrorLevel is cleared and the RamDrive
  1786. ErrorLevel is returned.
  1787.  
  1788. The /F Flags switch returns an ErrorLevel according to the drive type flags.
  1789. The /P Physical switch returns an ErrorLevel according to the physical drive ID.
  1790. The /F switch overrides the /P switch if both are specified.  With no switch
  1791. specified, the drive type flag ErrorLevel and physical drive ID ErrorLevels are
  1792. additive.
  1793.  
  1794.  
  1795. *### DriveReady                                                                     [BATCH]
  1796. *
  1797. Determine if a drive is ready for access.  [Return]
  1798.       
  1799.       DriveReady d:                                                               2.0  2.32
  1800.  
  1801.    DriveReady Exit ErrorLevels
  1802. ---------------------------------------------
  1803. 0         Drive not ready
  1804. 1         Drive ready
  1805.  
  1806. where "d:" corresponds to any single drive letter.  The DriveExist command is
  1807. called first.  The command then installs a replacement DOS Critical Error
  1808. Handler to trap the resultant error if the drive is not ready when Interrupt 21H
  1809. Function 1CH (Get Allocation Information for Specific Drive) is executed.
  1810.  
  1811.  
  1812. *### DriveSize                                                                      [BATCH]
  1813. *
  1814. Determine the size of the specified or default drive.  [Return]
  1815.       
  1816.       DriveSize [/Dn] [d:]                                                              2.0
  1817.  
  1818.    DriveSize Exit ErrorLevels
  1819. ---------------------------------------------
  1820. 0           Invalid drive error
  1821. 1-255       Blocks of space on the drive
  1822.  
  1823. where "d:" corresponds to the drive desired.  If the drive is omitted, the
  1824. default drive is used.  The command returns the number of full and partial
  1825. blocks on the drive.  The default block size is 100 kilobytes.  A different
  1826. block size may be specified with the /Dn switch.  The /Dn switch "n" value for
  1827. this command is measured in kilobytes.  If more than 255 blocks are on the
  1828. drive, the returned ErrorLevel will be 255.
  1829.  
  1830.  
  1831. *### DriveSpace                                                                     [BATCH]
  1832. *
  1833. Determine the amount of free disk space on the specified or default drive.
  1834. [Return]
  1835.       
  1836.       DriveSpace [/Dn] [d:]                                                             2.0
  1837.  
  1838.    DriveSpace Exit ErrorLevels
  1839. ---------------------------------------------
  1840. 0           No blocks available or invalid drive error
  1841. 1-255       Blocks of space available
  1842.  
  1843. where "d:" corresponds to the drive desired.  If the drive is omitted, the
  1844. default drive is used.  The command returns the number of full blocks available.
  1845. Partial blocks are ignored.  The default block size is 100 kilobytes (102,400
  1846. bytes).  A different block size may be specified with the /Dn switch.  The /Dn
  1847. switch "n" value for this command is measured in kilobytes.  If more than 255
  1848. blocks are available, the returned ErrorLevel will be 255.
  1849.  
  1850.  
  1851. *### DriveVolume                                                                    [BATCH]
  1852. *
  1853. Determine if a particular disk volume exists on the named drive.  [Return]
  1854.       
  1855.       DriveVolume [d:]VolumeName                                             2.0  2.2  2.32
  1856.  
  1857.    DriveVolume Exit ErrorLevels
  1858. ---------------------------------------------
  1859. 0         Volume does not exist
  1860. 1         Volume exists
  1861.  
  1862.  
  1863. *### DS4                                                                            [BATCH]
  1864. *
  1865. Determine if a Toshiba portable computer is installed in a DeskStation IV desk
  1866. top unit.  [Return]
  1867.       
  1868.       DS4                                                                               2.1
  1869.  
  1870.    DS4 Exit ErrorLevels
  1871. ---------------------------------------------
  1872. 0         Not installed
  1873. 1         Installed
  1874.  
  1875. NOTE:  Uses undocumented information.
  1876.  
  1877.  
  1878. *### Echo                                                                    [CONFIG/BATCH]
  1879. *
  1880. Send a comment line to the screen.  [Return]
  1881.       
  1882.       Echo [/C | /N] [String]                                                      1.0  2.1
  1883.  
  1884. The /C switch is used to output a carriage return only at the end of the String,
  1885. returning the cursor to the first column for overwriting the previous output.
  1886. The /N switch is used to eliminate the final carriage return/line feed, leaving
  1887. the cursor at the end of the String just displayed.  /N takes precedence over /C
  1888. if both are included.  The /Q switch has no affect on this command.  Use Cecho
  1889. to output text in a specific color.  Used without String, Echo outputs a
  1890. carriage return/line feed sequence.
  1891.  
  1892. Since DOS capitalizes everything in CONFIG.SYS during its parsing scan, a carat
  1893. [^] is used as the default character to toggle between upper and lower case for
  1894. the displayed string.  If a carat is desired on the displayed line, two carats
  1895. [^^] should be used on the input line.  This format character is in effect only
  1896. during execution from CONFIG.SYS.
  1897.  
  1898. A tilde [~] is the default character for insertion of a carriage return/line
  1899. feed sequence in the displayed line.  If a tilde is desired on the displayed
  1900. line, two tildes [~~] should be used on the input line.  This format character
  1901. is in effect at all times.
  1902.  
  1903. If String is preceded by a double quote ["], the double quote is deleted but
  1904. leading separators are not removed.
  1905.  
  1906. Example command lines:
  1907.  
  1908.       Echo       S^tart ^DEVICE ^section...~
  1909.       Echo "     S^tart ^DEVICE ^section...~
  1910.  
  1911. The first command line would display "Start DEVICE section..." with two trailing
  1912. carriage return/line feeds.  The second command line would display "     Start
  1913. DEVICE section..." with two trailing carriage return/line feeds.
  1914.  
  1915.  
  1916. *### EchoPause                                                               [CONFIG/BATCH]
  1917. *
  1918. Suspend execution after printing a prompt message on the screen that is
  1919. specified on the command line.  [Return]
  1920.       
  1921.       EchoPause [/C | /N] [String]                                                 1.0  2.1
  1922.  
  1923. Pressing any key resumes execution.  See the Echo command for String formatting
  1924. and switches.  Use KeyPause for optional pausing, Pause for a standard pause
  1925. message or WaitFor for timed pausing.
  1926.  
  1927.  
  1928. *### EGA25                                                                   [CONFIG/BATCH]
  1929. *
  1930. Set a 25 line color EGA screen.  [Return]
  1931.       
  1932.       EGA25 [/C]                                                                   1.0  2.0
  1933.  
  1934. Performs a mode 3 reset of the display adapter using Interrupt 10H Function 0.
  1935. This works on EGA in a display independent way.  The /C switch clears the screen
  1936. after switching modes if ANSI is installed to set the screen color.
  1937.  
  1938.  
  1939. *### EGA43                                                                   [CONFIG/BATCH]
  1940. *
  1941. Set a 43 line EGA screen.  [Return]
  1942.       
  1943.       EGA43 [/C]                                                              1.0  2.0  2.4
  1944.  
  1945. Forces the use of the display adapter's internal 8x8 font.  Interrupt 10H
  1946. Function 11H Subfunction 12H performs an adapter mode reset when it executes.
  1947. This works on EGA in a display independent way.  The /C switch clears the screen
  1948. after switching modes if ANSI is installed to set the screen color.
  1949.  
  1950. This command is operable only for video modes 0-3.
  1951.  
  1952.  
  1953. *### Env                                                                            [BATCH]
  1954. *
  1955. Determine size and use of the DOS master environment and manipulate environment
  1956. strings.  [Return]
  1957.       
  1958.       Env SubCommandName [/Dn] [/1] [/2]                2.0  2.1  2.2  2.3  2.32  2.4  2.43
  1959.  
  1960. NOTE:  Uses undocumented information.  Environment variable names must be in
  1961.       capital letters for the DOS SET command to use them.
  1962.  
  1963. This command performs several functions relating to the DOS:  It either returns
  1964. information about the DOS or it manipulates the strings in that environment.
  1965. For information SubCommands, results are returned via ErrorLevel.  For string
  1966. SubCommands, CFG manipulates the environment of either the master command
  1967. processor (default, /1) or, the parent command processor (/2).  Under Windows
  1968. 95, there is only one environment, so the /1 and /2 switches have identical
  1969. output.
  1970.  
  1971. The following are valid SubCommandNames:  Caps, Clear, Fill, Free, Reset, Save,
  1972. Set, Strings, Total, Used.  Each SubCommandName may be abbreviated as desired.
  1973. The default block size for information SubCommands is 16 bytes.  A different
  1974. block size may be specified with the /Dn switch.  The /Dn switch "n" value for
  1975. this command is measured in bytes.  The /Dn switch has no meaning for string
  1976. SubCommands.  The /2 switch will locate the environment of the parent program
  1977. for examination vice the master environment.  If CFG is executed under a
  1978. secondary command processor, use of this switch will determine the
  1979. characteristics of the environment available to any other program executed under
  1980. that secondary command processor.  It also provides an alternate method of
  1981. locating the master environment when CFG is executed under the master command
  1982. processor.
  1983.  
  1984.   *  Caps:  Capitalizes the names of all environment variables.
  1985.   *  Clear:  Removes _*ALL*_ strings from the environment.  Use with _*EXTREME
  1986.       CAUTION*_.
  1987.   *  Fill:  Creates a series of environment strings named "CFGxxx" that
  1988.       completely use all available environment space.  "xxx" is a decimal number
  1989.       that ranges from 001 to as high as required.  This ensures that any
  1990.       spawned command processors are created with an environment that has the
  1991.       same size as the parent command processor.  Deleting these strings (either
  1992.       with the Reset SubCommand or multiple DOS SET commands) frees the
  1993.       environment space.  Each string uses a maximum of 80 bytes.
  1994.   *  Free:  Reports the number of blocks of space available for use.  This is
  1995.       equal to Total minus Used.
  1996.   *  Reset:  Removes the strings created by the Fill SubCommand.  These strings
  1997.       may also be removed using DOS SET commands.  This command may take several
  1998.       seconds on very large environments.  This command searches for the CFG001
  1999.       variable and deletes all further sequential variables it finds.
  2000.   *  Save [FileName]:  Copies the strings from the designated environment
  2001.       preceded by "@SET " or "SET ", as appropriate.  If the optional FileName
  2002.       is present, the strings are written to it.  Otherwise, they are written to
  2003.       DOS StdOut.  Only one environment (/1 or /2) should be specified.
  2004.   *  Set /@EnVar String:  The /@EnVar switch is required.  The String which
  2005.       follows is placed in the environment.  Environment variables in String are
  2006.       not processed by CFG, but by DOS prior to passing the command line to CFG.
  2007.       If String is preceded by a double quote ["], the double quote is deleted
  2008.       but leading separators are not removed.
  2009.   *  Strings:  Reports the number of strings currently defined in the
  2010.       environment.  This option has a unchangeable /Dn switch value of 1.
  2011.   *  Total:  Reports the number of blocks of space in the environment.  Because
  2012.       of the way DOS allocates memory, the size in bytes will always be a
  2013.       multiple of 16.
  2014.   *  Used:  Reports the total number of blocks of space currently in use.  This
  2015.       will be dependent on the number and length of existing environment
  2016.       variables.  This value includes the null bytes that terminate each string.
  2017.  
  2018.  
  2019. *### ErrorLevel                                                                     [BATCH]
  2020. *
  2021. Return a DOS ErrorLevel equal to the number on the command line.  [Return]
  2022.       
  2023.       ErrorLevel n                                                                2.3  2.42
  2024.  
  2025. where "n" is a number between 0 and 255 decimal.  Numbers greater than 255
  2026. return 255.  Non-numbers return 0.  The /Bn switch will allow input in other
  2027. number bases.
  2028.  
  2029.  
  2030. *### FileDir  ### FileDrive                                                         [BATCH]
  2031. **### FileExt  ### FileName**
  2032. *
  2033. Returns the requested portion of the given file name string.  [Return]
  2034.  
  2035.       FileDir Filename [/Q] [/@EnVar]                                                   2.2
  2036.       FileDrive Filename [/Q] [/@EnVar]                                                 2.2
  2037.       FileExt Filename [/Q] [/@EnVar]                                                   2.2
  2038.       FileName Filename [/Q] [/@EnVar]                                                  2.2
  2039.  
  2040. FileDir, FileDrive, FileExt and FileName are a group of related commands that
  2041. separate out portions of a supplied file name string.  This is best shown by
  2042. example.  Suppose CFG.COM exists in the current default directory of C:\CFG.
  2043. The above commands will return the following values given a command line of "CFG
  2044. CommandName CFG.COM":
  2045.  
  2046.       FileDir       \CFG
  2047.       FileDrive     C:
  2048.       FileExt       COM
  2049.       FileName      CFG
  2050.  
  2051. CFG uses DOS Interrupt 21H Function 60H to canonicalize the supplied path.
  2052. FileDir is almost the same as the Dir command except that you can specify other
  2053. than the current directory, if desired.
  2054.  
  2055.  
  2056. *### FileDTC                                                                        [BATCH]
  2057. *
  2058. Compare the date and time stamps of two files.  [Return]
  2059.       
  2060.       FileDTC [d:][path]File1 [d:][path]File2                               2.0  2.32  2.43
  2061.  
  2062.    FileDTC Exit ErrorLevels
  2063. ---------------------------------------------
  2064. 0         Command line error
  2065. 1         Date1 is older than Date2
  2066. 2         Date1 = Date2, but Time1 is older than Time2
  2067. 3         File1 DOS error on opening
  2068. 4         Date1 = Date2, and Time1 = Time2
  2069. 5         File2 DOS error on opening
  2070. 6         Date1 = Date2, but Time2 is older than Time1
  2071. 7         Date2 is older than Date1
  2072.  
  2073. FileDTC (File Date-Time Compare) compares the date and time stamps of two files.
  2074. FileDTC does not accept wildcards in the file names.  An ErrorLevel of 1, 2 or 3
  2075. indicates File1 either does not exist or is older than File2.  An ErrorLevel of
  2076. 5 or higher indicates that File2 either does not exist or is older than File1.
  2077. An error message is displayed if either file cannot be found.
  2078.  
  2079. FileDTC can be used as follows:
  2080.  
  2081. IfCopy.Bat
  2082.       @Echo Off
  2083.       If [%1]==[...] GoTo 1
  2084.       If [%2]==[] GoTo End
  2085.       For %%A In (%1) Do Call IfCopy ... %%A %2
  2086.       GoTo End
  2087. :1
  2088.       CFG FileDTC %2 %3%2
  2089.       If ErrorLevel 4 GoTo End
  2090.       Copy %2 %3%2 >Nul
  2091. :End
  2092.  
  2093. Issuing "IfCopy *.* A:" will copy all files from the current directory to the A:
  2094. drive that are older than those on the A: drive or do not exist.  This is a
  2095. little more discriminating than Xcopy /d since it also compares times.
  2096.  
  2097.  
  2098. *### FileExist                                                                      [BATCH]
  2099. *
  2100. Determine if the specified file exists.  [Return]
  2101.       
  2102.       FileExist [d:][path]FileName                                                      2.0
  2103.  
  2104.    FileExist Exit ErrorLevels
  2105. ---------------------------------------------
  2106. 0         File does not exist
  2107. 1         File exists
  2108.  
  2109. This command is similar to the DOS "IF EXIST" batch file command.
  2110.  
  2111.  
  2112. *### FileLines                                                                      [BATCH]
  2113. *
  2114. Determine the number of lines (records) in the specified file.  [Return]
  2115.       
  2116.       FileLines [d:][path]Filename [/Dn]                                                2.4
  2117.  
  2118.    FileLines Exit ErrorLevels
  2119. ---------------------------------------------
  2120. 0         Zero length file or file error
  2121. Else      Number of lines
  2122.  
  2123. This command counts the number of lines or records in an ASCII file by searching
  2124. for carriage return characters (ASCII 013).  The last line of a file will be
  2125. counted even if it does not end in a carriage return/line feed sequence.  A line
  2126. which ends a file and does end with a carriage return/line feed will not count
  2127. as an additional line.
  2128.  
  2129. This command has a /Dn block size of one, but I count using 32-bits (just in
  2130. case).
  2131.  
  2132.  
  2133. *### Files                                                                          [BATCH]
  2134. *
  2135. Determine size and use of the DOS System File Table.  [Return]
  2136.       
  2137.       Files SubCommandName                                                              2.0
  2138.  
  2139. NOTE:  Uses undocumented information.
  2140.  
  2141. This command returns information about the DOS System File Table (SFT) that is
  2142. created through the FILES command in CONFIG.SYS as well as third party
  2143. extenders.  All information is returned via ErrorLevel.  The following are valid
  2144. SubCommandNames:  Blocks, Free, Margin, Orphan, Previous, Total, Used.  Each
  2145. SubCommandName may be abbreviated as desired.  This command requires DOS 3.0+.
  2146.  
  2147.   *  Blocks:  Number of blocks the SFT is divided into.  A large number of
  2148.       blocks has little effect on performance, but may use up extra memory.
  2149.   *  Free:  Number of entries available for use.  This is equal to Total minus
  2150.       Used.
  2151.   *  Margin:  Minimum margin that existed at the "high water mark" of previous
  2152.       use.  This is equal to Total minus Previous.  This value is how close the
  2153.       system has gotten to a DOS file error due to no more file handles being
  2154.       available.
  2155.   *  Orphan: Number of entries that are orphaned, typically by redirecting the
  2156.       output of a resident program to the NUL device during installation.  This
  2157.       number is a subset of the Used files.
  2158.   *  Previous: Maximum number of files that had previously been open at any one
  2159.       time since the computer was last booted.  Since DOS reuses entries after
  2160.       they have been closed, this value may be looked at as the "high water
  2161.       mark" of SFT use.
  2162.   *  Total:  All entries available in the SFT, including any that may have been
  2163.       created by later programs such as Qemm's FILES or PC Magazine's UMBFILES.
  2164.   *  Used:  Number of entries currently in use.  Typically, this will be 3
  2165.       unless files have been orphaned or Windows is running.
  2166.  
  2167.  
  2168. *### FileSize                                                                       [BATCH]
  2169. *
  2170. Determine the size of the specified file.  [Return]
  2171.       
  2172.       FileSize [/Dn] [d:][path]Filename                                       2.0  2.1  2.2
  2173.  
  2174.    FileSize Exit ErrorLevels
  2175. ---------------------------------------------
  2176. 0           File error
  2177. 1-255       Blocks of the file
  2178.  
  2179. The command returns the number of full and partial blocks in the file.  The
  2180. default block size is 1024 bytes (1 kilobyte).  A different block size may be
  2181. specified with the /Dn switch.  The /Dn switch "n" value for this command is
  2182. measured in bytes.  If more than 255 blocks are in the file, the returned
  2183. ErrorLevel will be 255.  An error message is displayed if the file cannot be
  2184. found.
  2185.  
  2186.  
  2187. *### FileText                                                                       [BATCH]
  2188. *
  2189. Determine if the Text string exists in the specified file.  [Return]
  2190.       
  2191.       FileText [d:][path]Filename [/C] "String"                                   2.0  2.31
  2192.  
  2193.    FileText Exit ErrorLevels
  2194. ---------------------------------------------
  2195. 0         String not present
  2196. 1         String present
  2197.  
  2198. This command performs a case sensitive search of the designated file for the
  2199. text string.  If the /C Case switch is used, a case insensitive search is
  2200. performed.  An error message is displayed if the file cannot be found.
  2201.  
  2202.  
  2203. *### GamePort                                                                       [BATCH]
  2204. *
  2205. Determine if a game port is installed.  [Return]
  2206.       
  2207.       GamePort [/Q]                                                                     2.4
  2208.  
  2209.    GamePort Exit ErrorLevels
  2210. ---------------------------------------------
  2211. 0         Game port not installed
  2212. 1         Game port installed
  2213.  
  2214. A message is displayed with the results.
  2215.  
  2216.  
  2217. *### GetKey                                                                         [BATCH]
  2218. *
  2219. Get any keyboard input or limit the allowed keys to those specified on the
  2220. command line.  [Return]
  2221.       
  2222.       GetKey [/C] [/F] [/S] ["String"] [Al] [Cl] [D[:]t,p] [E] [Fn] [Sn] [m] 2.0  2.2  2.42
  2223.  
  2224.    GetKey Exit ErrorLevels
  2225. ---------------------------------------------
  2226. With list       Position of key n lit (1, 2, 3, etc.)
  2227. Without list    Scan code of key pressed
  2228. 255             Ctrl-Break/Ctrl-C pressed (if not specified)
  2229.  
  2230. where:
  2231.   *  /C - Comparison of characters in "String" is case sensitive.
  2232.   *  /F - Flushes the keyboard buffer prior to execution.
  2233.   *  /S - Causes the key pressed to be shown on screen.
  2234.  
  2235. These options may be placed in any order after the CommandName:
  2236.   *  "String" is a series of characters representing valid keyboard input.
  2237.       String must be enclosed in either single or double quotes.
  2238.   *  "Al" and "Cl" are Alt-letter and Ctrl-letter combinations.
  2239.   *  "D:t,p" represents a delay time "t" and default key position "p" to return
  2240.       if no choice is made after "t" seconds.  "t" can be between 1 and 3640.
  2241.       "p" cannot exceed the length of the provided list plus one.  The "list
  2242.       plus one" option allows the detection of no choice.
  2243.   *  "E" is the Escape key.
  2244.   *  "Fn" are function keys F1 through F12.  F0 represents the Return or Enter
  2245.       key.  Multiple function keys must be separated.
  2246.   *  "Sn" adds (shifts) "n" to the returned ErrorLevel.  This allows testing of
  2247.       multi-layered menus in one pass.  The maximum value is 254.  This option
  2248.       may be placed anywhere after the CommandName.
  2249.   *  "m" is for direct keyboard scan codes.
  2250.  
  2251. There may be multiple occurrences of "String" on the input line.  The number of
  2252. input keys is only limited by DOS command line length.
  2253.  
  2254. Used without options, GetKey returns the scan code of the key that was pressed.
  2255. GetKey's optional key list provides much greater functionality.  If you supply
  2256. the optional "String" or other arguments to GetKey, CFG will wait either until
  2257. one of those keys listed has been pressed or until you break out of the command
  2258. with Ctrl-Break or Ctrl-C.  All other keypresses are ignored.  A time limit may
  2259. be specified using the "D:t,p" option.  If no "p" option is specified, 1 is
  2260. used.
  2261.  
  2262. By default, the GetKey command is not case sensitive (i.e. if either "Y" or "y"
  2263. is pressed, the ErrorLevel will be the same) unless the /C switch is used.  If
  2264. you want the single quote included as a valid keypress, enclose it in double
  2265. quotes and vice versa.  Standard separators between the listed keys are parsed
  2266. out.
  2267.  
  2268. Example command line:
  2269.       
  2270.       GetKey "yn" F1 F2 F0 AC CC E "abc"
  2271.  
  2272. If F1 is now pressed, the returned ErrorLevel will be 3, since F1 is the third
  2273. entry in the list.  Ctrl-C will return 7 in this case vice 255 since it is
  2274. specified on the command line.
  2275.  
  2276.  
  2277. *### Help                                                                           [BATCH]
  2278. *
  2279. Display program scrollable help.  [Return]
  2280.       
  2281.       Help [String]                                                                2.1  2.4
  2282.  
  2283. Without the optional String, this command is the same as using the /? switch and
  2284. displays the CFG.HLP file.  With any String on the command line, CFG.DOC is
  2285. loaded and scanned (case insensitive) until String is found preceded by "###".
  2286. Command headers are formatted thus.
  2287.  
  2288. The CFG.DOC and CFG.HLP files must be in the same directory as CFG.COM in order
  2289. to be found.  This command is not available in MultiCommand mode.
  2290.  
  2291.  
  2292. *### IACAfill                                                                      [CONFIG]
  2293. *
  2294. Write up to 16 bytes to the Intra-Application Communication Area (IACA) for
  2295. communication between CONFIG.SYS and AUTOEXEC.BAT.  [Return]
  2296.       
  2297.       IACAfill String [/O]                                                         1.1  2.1
  2298.  
  2299. There are 16 bytes at address 0040:00F0 called the IACA.  These bytes can be
  2300. modified by any program, but few applications actually use them since they are
  2301. subject to change by any program and do not provide for much storage.
  2302.  
  2303. The IACAfill command moves the command line String to the IACA.  The String must
  2304. be a single word.  A space or carriage return will end the transfer.  The /O
  2305. Overwrite switch will unconditionally overwrite anything in the IACA.  By
  2306. default, IACAfill will not overwrite.  IACAfill fills the unused part of the
  2307. IACA with ASCII zeroes.
  2308.  
  2309. IACAfill allows communication between CONFIG.SYS and AUTOEXEC.BAT on pre-DOS 6.0
  2310. systems.  When managing multiple configurations, this will allow you to set a
  2311. variable in each separate CONFIG.SYS file for appropriate action in
  2312. AUTOEXEC.BAT.  Use the IACAread command to read the string from the IACA.
  2313.  
  2314. Example command line:
  2315.       
  2316.       IACAfill 386Max
  2317.  
  2318. This will store "386MAX" in the IACA.
  2319.  
  2320.  
  2321. *### IACAread                                                                       [BATCH]
  2322. *
  2323. Reads up to 16 bytes from the Intra-Application Communication Area.  [Return]
  2324.       
  2325.       IACAread [/Q] [/@EnVar] [/C] [String]                                   2.0  2.1  2.2
  2326.  
  2327.    IACAread Exit ErrorLevels
  2328. ---------------------------------------------
  2329. 0         No errors encountered
  2330. 1         No string present in the IACA
  2331.  
  2332. String may be any combination of characters that are desired to precede the
  2333. string read from the IACA.  The /C switch causes the old data to be cleared from
  2334. the IACA.  An error message will be displayed if there is no string in the IACA.
  2335.  
  2336. IACAread first checks the IACA for a string.  It then scans its command line and
  2337. writes anything it finds there and then writes the IACA.  The IACA is not
  2338. cleared after reading unless the /C switch is used.
  2339.  
  2340. Example command use:
  2341.  
  2342.       CFG IACAread @SET EnVar=>%TEMP%\IACA.BAT
  2343.       CALL %TEMP%\IACA.BAT
  2344.       DEL %TEMP%\IACA.BAT
  2345.  
  2346. where EnVar is the name of the environment variable to be set.  This will write
  2347. "@SET EnVar=String" to DOS StdOut.  Using CFG's ability (as of version 2.2) to
  2348. write directly to the master environment, the above can be shortened to:
  2349.       
  2350.          CFG IACAread /Q /@EnVar
  2351.  
  2352. If the SET command in the example IACA.BAT file does not work, you should have
  2353. received an "Out of environment space" error from DOS during execution.  Check
  2354. the free environment space using the Env Free command.  Environment space may be
  2355. increased by placing a larger number after the /E: switch on the CONFIG.SYS
  2356. SHELL line or adding such a line with a /E: switch to the file if none exists
  2357. and rebooting.  See the "Sample" section below.
  2358.  
  2359.  
  2360. *### Input                                                                          [BATCH]
  2361. *
  2362. Get a line of input.  [Return]
  2363.       
  2364.       Input [/Q] [/@EnVar]                                                              2.2
  2365.  
  2366. This command uses DOS Interrupt 21H Function 0AH (Buffered Input) to get a
  2367. string from the user.  This string may be stored in the environment using the
  2368. /@EnVar switch.  If /Q is used, the cursor remains at the left most screen
  2369. column.  If /Q is not used, the cursor is left at the end of the input line.
  2370. The maximum length line accepted is 254 characters.
  2371.  
  2372.  
  2373. *### Intense                                                                 [CONFIG/BATCH]
  2374. *
  2375. Enable intense background colors.  [Return]
  2376.       
  2377.       Intense                                                                           2.0
  2378.  
  2379. Interrupt 10H Function 10H Subfunction 3 is used to enable intense background
  2380. colors on EGA and above.  Any blinking characters will stop blinking and have
  2381. intense backgrounds.
  2382.  
  2383.  
  2384. *### Keyboard                                                                [CONFIG/BATCH]
  2385. *
  2386. Determine if an enhanced/standard keyboard is installed or enable/disable the
  2387. keyboard.  [Return]
  2388.       
  2389.       Keyboard SubCommandName [/Q]                                                2.1  2.43
  2390.  
  2391.   *  Disable:  Disables the keyboard.  No further keyboard input is accepted
  2392.       until the Enable subcommand is run.  CAUTION:  Use this command carefully
  2393.       since the only way to restore your keyboard if you forget to run the
  2394.       Enable subcommand from your batch file is by a hardware reset.  Use this
  2395.       as the first CONFIG.SYS command to keep people from breaking out of your
  2396.       startup files.  NOTES:  Some programs my perform the proper hardware reset
  2397.       and restore keyboard operation.  Test your setup.  This is not a resident
  2398.       function.  Do not try to invoke the GetKey command, since it too is
  2399.       disabled.  This subcommand disables the Ctrl-Alt-Delete reset and Ctrl-
  2400.       Break from the keyboard.
  2401.   *  Enable:  Enables the keyboard after using the Disable subcommand.  Use this
  2402.       as the last AUTOEXEC.BAT command.  CAUTION:  Ensure that this subcommand
  2403.       is executed in all possible startup configurations if you have multiple
  2404.       configurations.
  2405.   *  Status:  Examines  the keyboard status byte at 0040:0096 to see if bit 4 is
  2406.       set.  If it is, an enhanced keyboard is assumed to be attached to the
  2407.       system.  This subcommand has no meaning from CONFIG.SYS.
  2408.  
  2409.    Keyboard Status Exit ErrorLevels
  2410. ---------------------------------------------
  2411. 0         Standard keyboard is installed
  2412. 1         Enhanced keyboard is installed
  2413.  
  2414.  
  2415. *### KeyBuffer                                                                      [BATCH]
  2416. *
  2417. Adjust the DOS default keyboard buffer between 2 and 16 characters.  [Return]
  2418.       
  2419.       KeyBuffer SubCommandName                                                     2.1  2.4
  2420.  
  2421.    KeyBuffer Exit ErrorLevels
  2422. ---------------------------------------------
  2423. 0         Parsing error
  2424. Else      Number of bytes (with Set or Status)
  2425. Else      Number of blocks (with Status /Dn)
  2426.  
  2427. This command changes the size of the available DOS keyboard buffer.  The
  2428. following are valid SubCommandNames:  Set, Status.  Each SubCommandName may be
  2429. abbreviated as desired.
  2430.  
  2431.   *  Set n:  Requires a value for the new size.  Valid numbers for "n" range
  2432.       between 2 and 16.
  2433.   *  Status [/Dn]:  Returns the current buffer size in blocks as an ErrorLevel
  2434.       even if the buffer has been relocated.  The default block size is 1 byte.
  2435.       A different block size may be specified with the /Dn switch.  The /Dn
  2436.       switch "n" value for this command is measured in bytes and has meaning
  2437.       only with this SubCommand.
  2438.  
  2439. An error is displayed if the keyboard buffer has been shifted from the DOS
  2440. default location.  This command is intended for a young typist who may
  2441. improperly hit multiple keys to force an early keyboard buffer full beep from
  2442. the BIOS.
  2443.  
  2444.  
  2445. *### KeyFlush                                                                [CONFIG/BATCH]
  2446. *
  2447. Flush any waiting keys from the keyboard buffer.  [Return]
  2448.       
  2449.       KeyFlush                                                                          2.2
  2450.  
  2451. This command checks for available keys and repeatedly reads the keyboard until
  2452. they are all cleared from the keyboard buffer.
  2453.  
  2454.  
  2455. *### KeyPause                                                                [CONFIG/BATCH]
  2456. *
  2457. Suspend execution if any of the Shift, Alt or Ctrl keys are pressed.  [Return]
  2458.       
  2459.       KeyPause                                                                1.0  2.0  2.3
  2460.  
  2461.    KeyPause Exit ErrorLevels
  2462. ---------------------------------------------
  2463. 0         Pause not executed
  2464. 1         Pause executed
  2465.  
  2466. One of the shift keys must be held down before program execution.  Execution
  2467. resumes once the key is released.  Use EchoPause to display a customized pause
  2468. message, Pause for a standard pause message or WaitFor for timed pausing.
  2469.  
  2470.  
  2471. *### KeyPress                                                                       [BATCH]
  2472. *
  2473. Determine if there is a key waiting in the keyboard buffer.  [Return]
  2474.       
  2475.       KeyPress                                                                          2.2
  2476.  
  2477.    KeyPress Exit ErrorLevels
  2478. ---------------------------------------------
  2479. 0         No keys available
  2480. 1         Keys are available
  2481.  
  2482.  
  2483. *### KeyStuff                                                                [CONFIG/BATCH]
  2484. *
  2485. Place the command line characters into the BIOS keyboard buffer.  [Return]
  2486.       
  2487.       KeyStuff String                                                                   2.2
  2488.  
  2489.    KeyStuff Exit ErrorLevels
  2490. ---------------------------------------------
  2491. 0         No characters inserted
  2492. Else      Number of characters inserted
  2493.  
  2494. The characters appearing after the CommandName are placed in the buffer.
  2495. Leading spaces are parsed off.  No maximum buffer length or location is assumed.
  2496. The command will place one less than the full buffer of characters into the
  2497. buffer, preventing CFG from interfering with the BIOS buffer logic.
  2498.  
  2499.  
  2500. *### LastBoot                                                                       [BATCH]
  2501. *
  2502. Determine how the system was last booted.  [Return]
  2503.       
  2504.       LastBoot                                                                          2.2
  2505.  
  2506.    LastBoot Exit ErrorLevels
  2507. ---------------------------------------------
  2508. 0         Cold boot (Flag value = 0000H)
  2509. 1         Warm boot (Flag value = Else)
  2510. 2         Warm boot (Flag value = 1200H)
  2511. 3         Warm boot (Flag value = 1234H)
  2512.  
  2513. The command examines the BIOS boot flag at 0040:0072 to determine the method of
  2514. the last system boot.  A flag value of zero is assumed to be a cold boot.  The
  2515. normal flag value for a warm boot is 1234H.  Some BIOS versions overwrite the
  2516. lower byte of this with a zero, resulting in a flag value of 1200H for a warm
  2517. boot.  Any other non-zero flag value is also identified and assumed to be a warm
  2518. boot.
  2519.  
  2520.  
  2521. *### LastDrive                                                                      [BATCH]
  2522. *
  2523. Determine letter of last available drive.  [Return]
  2524.       
  2525.       LastDrive [/Q] [/@EnVar]                                                          2.1
  2526.  
  2527.    LastDrive Exit ErrorLevels
  2528. ---------------------------------------------
  2529. 0-255       Drive Number (A=0)
  2530.  
  2531. NOTE:  Uses undocumented information.
  2532.  
  2533. The lowest value this command can return is E:.
  2534.  
  2535.  
  2536. *### Left                                                                           [BATCH]
  2537. *
  2538. Return the left most "n" characters from String.  [Return]
  2539.       
  2540.       Left n String [/Q] [/@EnVar] [/C]                                           2.2  2.32
  2541.  
  2542. where "n" is a decimal number indicating the number of characters to return from
  2543. String, counting from the left.  The /C switch capitalizes the returned string.
  2544.  
  2545.  
  2546. *### Length                                                                         [BATCH]
  2547. *
  2548. Return the length of the input String.  [Return]
  2549.       
  2550.       Length String [/Q] [/@EnVar]                                                      2.2
  2551.  
  2552. If String is preceded by a double quote ["], the double quote is deleted but
  2553. leading separators are not removed.
  2554.  
  2555.  
  2556. *### Locate                                                                  [CONFIG/BATCH]
  2557. *
  2558. Set cursor position on active video page.  [Return]
  2559.       
  2560.       Locate r c                                                                        2.0
  2561.  
  2562.    Locate Exit ErrorLevels
  2563. ---------------------------------------------
  2564. 0         No errors
  2565. 255       Input parsing error
  2566.  
  2567. where "r" corresponds to the row number and "c" corresponds to the column
  2568. number.  The top row is row 1.  The furthest left column is column 1.  Decimal
  2569. numbers are required.
  2570.  
  2571.  
  2572. *### Lock                                                                           [BATCH]
  2573. *
  2574. Locks up the system after optionally displaying a fake error message.  [Return]
  2575.       
  2576.       Lock [SubCommandName] [/C]                                                        2.3
  2577.  
  2578. CAUTION:  This command requires a system reset after execution.
  2579.  
  2580. The following are valid SubCommandNames:  Disk, Net, None, Stack, System.  Each
  2581. SubCommandName may be abbreviated as desired.  No actual error occurs.  The /C
  2582. ColdBoot switch requires a hardware reset.  This command is Windows-aware if the
  2583. /C switch is used.
  2584.  
  2585.   *  Disk:  Displays "Not ready reading drive C; Abort, Retry, Fail?".
  2586.   *  Net:  Displays "Error accessing network".
  2587.   *  None:  Displays nothing.  Default if SubCommandName is omitted.
  2588.   *  Stack:  Displays "Internal stack overflow; System halted".
  2589.   *  System:  Displays "Internal error; System halted".
  2590.  
  2591.  
  2592. *### Lower                                                                          [BATCH]
  2593. *
  2594. Return String all in lower case.  [Return]
  2595.       
  2596.       Lower String [/Q] [/@EnVar]                                                       2.2
  2597.  
  2598. If String starts with a double quote ["], the double quote is deleted but
  2599. leading separators are not removed.
  2600.  
  2601.  
  2602. *### LptHide                                                                       [CONFIG]
  2603. *
  2604. Hide and restore the printer port base addresses.  [Return]
  2605.       
  2606.       LptHide SubCommandName                                                            1.0
  2607.  
  2608. The following are valid SubCommandNames: Hide, Restore.  Each SubCommandName may
  2609. be abbreviated as desired.  Error messages are displayed if the routine fails.
  2610.  
  2611.   *  Hide:  Hides the printer port base addresses by copying them to a high
  2612.       memory location.
  2613.   *  Restore:  On restoration, the command verifies the signature and checksum
  2614.       stored with the port addresses to ensure that they were not accidentally
  2615.       over-written during intervening device driver execution.  The command then
  2616.       copies the base addresses back to their normal location.
  2617.  
  2618. Example command sequence:
  2619.  
  2620.       CFG.COM LptHide Hide
  2621.       RCD.SYS /M0
  2622.       CFG.COM LptHide Restore
  2623.  
  2624. The specific program this was written for is the Iomega Bernoulli Box RCD.SYS
  2625. driver, though it may be useful at other times.  During RCD.SYS execution, it
  2626. interrogates the printer ports to determine if there are any parallel port
  2627. Bernoulli Boxes installed.  Unfortunately, some printers respond to this by
  2628. printing the interrogation sequence.
  2629.  
  2630. The default location for the hidden data is 7000:0000 for DOS versions before
  2631. 5.0.  This is below the 512 KB boundary in the event that the machine only has
  2632. that much base memory available, and high enough to keep it from being over-
  2633. written during execution of other device drivers while the data is hidden.  For
  2634. DOS Version 5.0+, the location will vary depending on what the SysInit loader
  2635. module reports as the maximum available memory in the device driver header.
  2636. This prevents interference with the larger memory requirements in the upper
  2637. areas around the 640 KB point that can occur under DOS 6.0+ with large multiple-
  2638. configuration CONFIG.SYS files.
  2639.  
  2640.  
  2641. *### LptSet                                                                  [CONFIG/BATCH]
  2642. *
  2643. Sets the parallel port base addresses to a default or specified value.  [Return]
  2644.       
  2645.       LptSet a [b]                                                                      2.4
  2646.  
  2647. CAUTION:  This command changes values established by the BIOS on system startup.
  2648.       Be _very careful_ with its use.
  2649.  
  2650. Where "a" corresponds to the desired port base address to set: 1, 2 or 3.  The
  2651. "b" corresponds to an optional hexadecimal value to set the port base address
  2652. to.  No checking is performed to warn of values being overwritten.
  2653.  
  2654. This command places a default port base address value (or the specified value)
  2655. in the appropriate location in the low memory DOS data area.  The default values
  2656. used for the ports are 3BCH, 378H and 278H.  If your system uses different
  2657. values, you must specify them as "b" on the command line.
  2658.  
  2659. You can set multiple base addresses to the same value to access the same
  2660. physical port using different DOS port names.  The IRQ associated with a
  2661. specific parallel port has no impact since they are generally all the same.
  2662.  
  2663.  
  2664. *### LptSwap                                                                 [CONFIG/BATCH]
  2665. *
  2666. Swap the printer base port addresses for the two printer ports specified.
  2667. [Return]
  2668.       
  2669.       LptSwap a b                                                                  1.0  2.4
  2670.  
  2671. where "a" and "b" are the numbers of the printer ports to be swapped.  Valid
  2672. numbers are 1, 2 and 3.  An error message will be given if one of the ports is
  2673. missing or invalid.
  2674.  
  2675. LptSwap switches the two ports as far as DOS is concerned.  This is useful if
  2676. you need to shift the printer ports around and are loading a software print
  2677. buffer as a device driver.  The contents of the port addresses are not checked
  2678. during the swap.
  2679.  
  2680. Example command line:
  2681.       
  2682.       LptSwap 1 3
  2683.  
  2684.  
  2685.  
  2686. *### MachineName                                                                    [BATCH]
  2687. *
  2688. Determine the network machine name.  [Return]
  2689.       
  2690.       MachineName [/Q] [/@EnVar]                                                   2.2  2.3
  2691.  
  2692. This command will display a name only if network software is loaded.  This
  2693. command requires DOS version 3.1 or higher.
  2694.  
  2695.  
  2696. *### Memory                                                                         [BATCH]
  2697. *
  2698. Determine amount of memory available.  [Return]
  2699.       
  2700.       Memory SubCommandName [k] [/Dn] [/Q] [/@EnVar]                          2.0  2.2  2.3
  2701.  
  2702.     Memory Exit ErrorLevels
  2703.  ---------------------------------------------
  2704.  With "k"     0        Requested amount of memory is not available or format
  2705.  error
  2706.               1        Requested amount of memory is available
  2707.  Without "k"  0        Requested memory is not available or format error
  2708.               Other    Number of blocks of memory available
  2709.  
  2710. where "k" is the number of kilobytes required.  Valid SubCommandNames are: Base,
  2711. Extended, Expanded, High, Main, UMB.  Each SubCommandName may be abbreviated as
  2712. desired, but must be unique.  A screen report is made (unless /Q is used) and
  2713. the exit ErrorLevel is set to the number of blocks of available memory.  The /Dn
  2714. switch "n" value for this command is measured in kilobytes.  The /@EnVar switch
  2715. will place the total number of kilobytes in the desired environment variable.
  2716. CFG scans the command line for a decimal number after the SubCommandName.  This
  2717. number is compared to the number of available kilobytes of the requested type of
  2718. memory.
  2719.  
  2720.   *  Base:  CFG executes BIOS Interrupt 12H to get the among of contiguous
  2721.       memory installed in the system.  The default block size is 16 kilobytes.
  2722.   *  Extended:  CFG checks for the presence of an XMS driver and calls it if
  2723.       present.  Interrupt 15H Function 88H is used otherwise.  The default block
  2724.       size is 64 kilobytes.
  2725.   *  Expanded:  CFG checks for the presence of an EMS driver and then executes
  2726.       Interrupt 67H Function 42H to get the number of free expanded memory
  2727.       pages.  The pages are converted to kilobytes for reporting.  The default
  2728.       block size is 64 kilobytes.
  2729.   *  High:  Under DOS version 5.0 or higher, CFG uses Interrupt 2FH Function 4AH
  2730.       Subfunction 01H to query free space in the High Memory Area.  The default
  2731.       block size is 1 kilobyte.
  2732.   *  Main:  CFG calculates available memory based on the location of its PSP and
  2733.       using Interrupt 12H.  The default block size is 16 kilobytes.
  2734.   *  UMB:  Under DOS version 5.0 and higher, CFG attempts to link the UMB chain
  2735.       with the low DOS memory chain to determine the largest free available
  2736.       block.  If this fails or an earlier DOS version is in use, the XMS
  2737.       provider is queried, if present.  The default block size is 1 kilobyte.
  2738.  
  2739. Example command lines:
  2740.  
  2741.       CFG Memory M 512 -- Test for 512 KB main memory
  2742.       CFG Memory Exp 2048 -- Test for 2 MB expanded memory
  2743.       CFG Memory Base /D64 -- Base memory in 64 KB blocks
  2744.  
  2745.  
  2746. *### Mid                                                                            [BATCH]
  2747. *
  2748. Return "n" characters from String starting at position "m".  [Return]
  2749.       
  2750.       Mid m n String [/Q] [/@EnVar] [/C]                                          2.2  2.32
  2751.  
  2752. where "m" and "n" are decimal numbers.  "m" is the starting position and "n" is
  2753. the number of characters to return.  The first letter of String is position 1.
  2754. If "m" is zero or past the end of String, nothing is returned.  "n" may extend
  2755. past the end of the line without an error.  The /C switch capitalizes the
  2756. returned string.
  2757.  
  2758.  
  2759. *### Mono                                                                    [CONFIG/BATCH]
  2760. *
  2761. Set a 25 line monochrome screen.  [Return]
  2762.       
  2763.       Mono                                                                              1.0
  2764.  
  2765. Performs a mode 7 reset of the display adapter using Interrupt 10H Function 0.
  2766. This works in a display independent way.  Use this command only if a monochrome
  2767. monitor is installed.
  2768.  
  2769.  
  2770. *### Mouse                                                                          [BATCH]
  2771. *
  2772. Determine if a mouse is present and reset both software and hardware for it.
  2773. [Return]
  2774.       
  2775.       Mouse                                                                        2.2  2.3
  2776.  
  2777.    Mouse Exit ErrorLevels
  2778. ---------------------------------------------
  2779. 0         Either hardware or driver are not installed
  2780. Else      Installed (number of buttons)
  2781.  
  2782. Performs an Interrupt 33H Function 0 reset to get the driver status.  This
  2783. command requires DOS version 3.0 or higher.
  2784.  
  2785.  
  2786. *### Now                                                                            [BATCH]
  2787. *
  2788. Display the current date.  [Return]
  2789.       
  2790.       Now DateFormat [/Q] [/@EnVar]                                               2.2  2.43
  2791.  
  2792. The DateFormat characters are given below.  This format is an extended version
  2793. of that used in WordPerfect date codes.  Non-number characters are transferred
  2794. directly.  The string is displayed using the current colors.
  2795.  
  2796.    Now Command Date Format Characters
  2797. Character               Meaning
  2798. ---------------------------------------------
  2799. 1                       Day of the Month
  2800. 2                       Month (number)
  2801. 3                       Month (word)
  2802. 4                       Year (all four digits)
  2803. 5                       Year (last two digits)
  2804. 6                       Day of the Week (word)
  2805. 7                       Hour (24-hour clock)
  2806. 8                       Hour (12-hour clock)
  2807. 9                       Minute
  2808. %  !  $                 Used before a number will:  Pad numbers < 10 with a
  2809. leading zero (!
  2810.                         or %) or space ($), or abbreviate either the month or
  2811.                         day of the week.
  2812. #                       Used before a number will display that number.
  2813. &1 &2 &3 &4 &5 &9       Insert country specific string separators.  See the
  2814. Country command
  2815.                         for the string inserted.
  2816.  
  2817. Examples (USA):
  2818.       3 1, 4              December 25, 1994
  2819.       !6 !3 1,4           Sun Dec 25, 1994
  2820.       !2/!1/5 (6)         01/01/95 (Sunday)
  2821.       $2/$1/5 (%6)         1/ 1/95 (Sun)
  2822.       8&5%9 0             10:55 am
  2823.       5!2!1!7.!9          94122510.55
  2824.  
  2825. If you desire the Day of Week or Month strings used in the Now command in
  2826. another language, contact the author for a customized version of CFG.
  2827.  
  2828.  
  2829. *### P5                                                                      [CONFIG/BATCH]
  2830. *
  2831. Return information about the Intel Pentium processor.  [Return]
  2832.       
  2833.       P5 SubCommandName                                                          2.41  2.43
  2834.  
  2835. The following are valid SubCommandNames:  FDIV, Model, Off, On, Step.  Each
  2836. SubCommandName may be abbreviated as desired.  An ErrorLevel of 0 is returned on
  2837. non-Pentium processors.  Test for a Pentium using the CPU command first.
  2838.  
  2839.   *  FDIVFDIVF:  Performs the following calculation using floating point math:
  2840.       ((X/Y)*Y)-X, with X=4,195,835 and Y=3,145,727 (the two most notorious
  2841.       "magic numbers").  Returns an ErrorLevel of 1 for an error-free Pentium
  2842.       and 2 for a Pentium with the FDIV bug.
  2843.   *  Model:  Returns an ErrorLevel equal to the model number reported by the
  2844.       Pentium processor, using the CPUID instruction.  The table below is the
  2845.       current estimation of what this SubCommand will return.  If the "Verified"
  2846.       column is "Yes", then I have confirmed the result is correct.  Please let
  2847.       me know if you have an update to this table.
  2848.   *  Off/On:  Enables and disables the Pentium floating point unit (FPU).  Use
  2849.       this as a temporary work-around for early Pentiums that have the FDIV bug.
  2850.       The method used clears and sets status bits in both DOS low memory and on
  2851.       the processor itself.  Significantly, this method may fail if the
  2852.       processor is already in Virtual 8086 Mode due to emulation.  If you use
  2853.       the Off SubCommand, place the appropriate DEVICE line in CONFIG.SYS before
  2854.       all other DEVICE lines, including _*all*_ memory managers.
  2855.   *  Step:  Returns an ErrorLevel equal to the stepping level reported by the
  2856.       Pentium processor using the CPUID instruction.
  2857.  
  2858.    P5 Command Stepping Information
  2859. Model Number      Processor       Verified      Stepping Level With FDIV Fixed
  2860. ---------------------------------------------
  2861. 0                 Unknown         N/A           N/A
  2862. 1                 P60/P66         No            7
  2863. 2                 P90             Yes           4
  2864. 3                 P100            No            Unknown
  2865. 4                 P75             No            Unknown
  2866.  
  2867.  
  2868.  
  2869. *### Page                                                                    [CONFIG/BATCH]
  2870. *
  2871. Select/determine the active video display page.  [Return]
  2872.       
  2873.       Page [n]                                                                          2.0
  2874.  
  2875. where "n" corresponds to the desired video display page.  If "n" is omitted, no
  2876. page change occurs.  This command always returns an ErrorLevel corresponding to
  2877. the current display page.  For modes 0 and 1, pages 0-7 are valid.  For modes 2
  2878. and 3, pages 0-3 are valid.  If anything else is specified on the command line,
  2879. no page change occurs.
  2880.  
  2881. Note that some programs write by default to page zero.
  2882.  
  2883.  
  2884. *### Pause                                                                   [CONFIG/BATCH]
  2885. *
  2886. Suspend execution after printing a prompt message on the screen.  [Return]
  2887.       
  2888.       Pause                                                                             1.0
  2889.  
  2890. Pressing any key resumes execution.  The standard prompt is "CFG 2.43 Pause -
  2891. Press any key to continue...".  Use EchoPause to display a customized pause
  2892. message, KeyPause for optional pausing or WaitFor for timed pausing.
  2893.  
  2894.  
  2895. *### Print                                                                          [BATCH]
  2896. *
  2897. Determine if the DOS Print command has been installed.  [Return]
  2898.       
  2899.       Print                                                                             2.2
  2900.  
  2901.    Print Exit ErrorLevels
  2902. ---------------------------------------------
  2903. Else      Number of files in print queue
  2904. 253       Error in PRINT.COM
  2905. 254       Not installed, but not OK to install
  2906. 255       Not installed
  2907.  
  2908. This command requires DOS version 3.0 or higher.
  2909.  
  2910.  
  2911. *### PrintEcho                                                               [CONFIG/BATCH]
  2912. *
  2913. Controls DOS print echo operation.  [Return]
  2914.       
  2915.       PrintEcho SubCommandName                                                          2.4
  2916.  
  2917.    PrintEcho Exit ErrorLevels
  2918. ---------------------------------------------
  2919. 0         Disabled
  2920. 1         Enabled
  2921.  
  2922. NOTE:  Uses undocumented information.
  2923.  
  2924. Valid SubCommandNames are: Off, On, Status, Toggle.  Each SubCommandName may be
  2925. abbreviated as desired, but must be unique.
  2926.  
  2927.   *  Off and On:  Turn the DOS print echo function on and off by changing its
  2928.       status byte in the DOS data area.  A status message is provided for each
  2929.       change in state.
  2930.   *  Status:  Reports the current DOS print echo state.
  2931.   *  Toggle:  Toggles the DOS print echo function from its previous state.  A
  2932.       status message is provided for the current state.
  2933.  
  2934. This command is available for MS-DOS Versions 3.1 through 6.22.
  2935.  
  2936. The DOS print echo function is toggled on and off using Ctrl-PrtScr or Ctrl-P.
  2937. If on, DOS will echo all characters displayed on the screen using DOS functions
  2938. to PRN (LPT1).  Note that this function uses undocumented information but has
  2939. been tested for MS-DOS versions 3.1 through 6.22.
  2940.  
  2941.  
  2942. *### Printer                                                                        [BATCH]
  2943. *
  2944. Determine the status of the printer.  [Return]
  2945.       
  2946.       Printer [n]                                                                       2.2
  2947.  
  2948.    Printer Exit ErrorLevels
  2949. ---------------------------------------------
  2950. 0         Printer ready
  2951. 1         Printer time-out or device fault
  2952. 2         Out of paper
  2953.  
  2954. where "n" represents the printer number (1-3).  If "n" is omitted or is out of
  2955. range, the PRN (LPT1) device is assumed.  The ErrorLevels are additive.
  2956.  
  2957.  
  2958. *### Protected                                                                      [BATCH]
  2959. *
  2960. Determine if 80286+ processor is in protected mode.  [Return]
  2961.       
  2962.       Protected                                                                    2.0  2.2
  2963.  
  2964.    Protected Exit ErrorLevels
  2965. ---------------------------------------------
  2966. 0         Real mode
  2967. 1         Protected mode
  2968.  
  2969. Calls the CPU command then determines if the processor protected mode flag is
  2970. set for 80286+ processors.
  2971.  
  2972.  
  2973. *### PrtScr                                                                  [CONFIG/BATCH]
  2974. *
  2975. Print the screen or controls print screen operation.  [Return]
  2976.       
  2977.       PrtScr SubCommandName [/F]                                  2.0  2.2  2.3  2.4  2.43
  2978.  
  2979.    PrtScr Exit ErrorLevels
  2980. ---------------------------------------------
  2981. 0         Disabled
  2982. 1         Enabled
  2983. 255       Last print screen encountered error
  2984.  
  2985. Valid SubCommandNames are: Off, On, Print, Status, Toggle.  Each SubCommandName
  2986. may be abbreviated as desired, but must be unique.
  2987.  
  2988.   *  Off and On:  Turn the BIOS interrupt function on and off by changing its
  2989.       status byte in the BIOS data area.  A status message is provided for each
  2990.       change in state.
  2991.   *  Print:  Prints the current screen using BIOS Interrupt 5.  A form feed is
  2992.       appended if the /F Form Feed switch is used.
  2993.   *  Status:  Reports the current print screen interrupt status.
  2994.   *  Toggle:  Toggles the BIOS interrupt function from its previous state.  A
  2995.       status message is provided for the current state.
  2996.  
  2997. On receipt of a Print Screen Interrupt 5, the BIOS bases its action on the
  2998. status byte at 0040:0100.  If the byte indicates that a print screen is
  2999. currently in progress, the BIOS aborts the new request.  This allows control of
  3000. the print screen Interrupt 5 without a memory resident program.
  3001.  
  3002.  
  3003. *### RamDrive                                                                       [BATCH]
  3004. *
  3005. Detect if the specified drive is a ramdrive or search for one.  [Return]
  3006.       
  3007.       RamDrive [/S] [d:] [/Q] [/@EnVar]                                            2.0  2.1
  3008.  
  3009.    RamDrive Exit ErrorLevels
  3010. ---------------------------------------------
  3011. Without /S   0         Drive is not a ramdrive
  3012.              1         Drive is a ramdrive
  3013. With /S      0         Ramdrive not found
  3014.              Else      Ramdrive found (A:=1, B:=2, etc.)
  3015.  
  3016. This command has several variations.  If "d:" is specified, that drive is
  3017. tested.  If "d:" is omitted, the default drive is tested.
  3018.  
  3019. If the /S switch is specified, a search is performed for the first ramdrive.  If
  3020. "d:" is also specified, the search starts with that drive and moves up the drive
  3021. letter chain.  If "d:" is not specified, the search starts with the D: drive.
  3022. The search stops when the first ramdrive is found or the first nonexistent drive
  3023. letter is encountered. DriveExist is called to determine if a drive exists.
  3024.  
  3025. The ASCII drive specification is written to DOS StdOut only if the /S switch is
  3026. used.  The /Q and /@EnVar switches are functional only when /S is also used.
  3027.  
  3028. This command searches for a ramdrive in a manner that is independent of finding
  3029. a specific volume name which can be easily be changed.  Since there is no
  3030. official way of detecting a ramdrive, this command makes a determination by
  3031. searching for three characteristic features:  The drive is non-removable, has
  3032. only one FAT and has a cluster size of one sector.  If the first and at least
  3033. one of the last two are true, the drive is considered to be a ramdrive.  The
  3034. tests are not completely foolproof.  The following ramdrives have been tested to
  3035. date and are recognized as valid:
  3036.      
  3037.      Microsoft Vdisk/RamDrive, Ziff-Davis XpanDisk, Qualitas 386disk, PC-Kwik
  3038.      RamDrive.
  3039.      
  3040. Let me know of others which pass or fail the test.
  3041.  
  3042. Note that a ramdrive compressed with DoubleSpace, Stacker, SuperStor, Squish or
  3043. similar product is not recognized unless the uncompressed drive is tested.
  3044.  
  3045.  
  3046. *### RandomFile                                                                     [BATCH]
  3047. *
  3048. Create a unique random file name in the specified directory.  [Return]
  3049.       
  3050.       RandomFile [d:][path] [/Q] [/@EnVar] [/S]                                    2.1  2.2
  3051.  
  3052.    RandomFile Exit ErrorLevels
  3053. ---------------------------------------------
  3054. 0         Successful
  3055. 1         Invalid DOS version
  3056. 2         DOS Error: File not found
  3057. 3         DOS Error: Path not found
  3058. 4         DOS Error: Too many open files (no handles available)
  3059. 5         DOS Error: Access denied
  3060. 6         DOS Error: Invalid handle
  3061.  
  3062. This command creates a randomly named eight letter file name (with no extension)
  3063. in the specified directory (path) using DOS Interrupt 21H Function 5AH.  If a
  3064. path is specified without a drive letter, the default drive letter is added to
  3065. the start of the path.  If no path is specified, the default drive and directory
  3066. is used.  The full path, including "." and "..", is resolved using the Dir
  3067. command.  Note the precautions given for this command above.  The command
  3068. normally deletes the file upon completion.  If the /S switch is specified, the
  3069. file is not deleted.  This command requires DOS version 3.0 or higher.
  3070.  
  3071. The RandomFile command is useful for the creation of temporary files that have a
  3072. unique name.  This guarantees that a filename conflict will not occur.
  3073.  
  3074.  
  3075. *### Rem                                                                           [CONFIG]
  3076. *
  3077. Indicate the use of descriptive comments in the CONFIG.SYS file.  [Return]
  3078.       
  3079.       Rem [String]                                                                      1.1
  3080.  
  3081. This allows the entry of remarks in CONFIG.SYS for all DOS versions without
  3082. generating errors.
  3083.  
  3084. REM is implemented in DOS version 5.0+, but is not available in earlier
  3085. versions.  For people who need to maintain standard machine configurations, this
  3086. can be an impediment to clear documentation.  While it slows CONFIG.SYS
  3087. execution slightly, this is the best that can be done (easily) for DOS versions
  3088. prior to 5.0.
  3089.  
  3090.  
  3091. *### RenDir                                                                         [BATCH]
  3092. *
  3093. Rename a directory.  [Return]
  3094.       
  3095.       RenDir OldName NewName                                                            2.0
  3096.  
  3097.    RenDir Exit ErrorLevels
  3098. ---------------------------------------------
  3099. 0         No errors
  3100. 255       DOS error or DOSmajor < 3
  3101.  
  3102. This command requires DOS version 3.0 or higher.  Include the complete path for
  3103. both old and new directory names.  The path is not required if the directory
  3104. being renamed is off the default directory.  The DOS functions used cannot
  3105. rename the drive's current directory.
  3106.  
  3107.  
  3108. *### Right                                                                          [BATCH]
  3109. *
  3110. Return the right most "n" characters from String.  [Return]
  3111.       
  3112.       Right n String [/Q] [/@EnVar] [/C]                                          2.2  2.32
  3113.  
  3114. where "n" is a decimal number indicating the number of characters to return from
  3115. String, counting from the right.  The /C switch capitalizes the returned string.
  3116.  
  3117.  
  3118. *### ROMdate                                                                        [BATCH]
  3119. *
  3120. Display the date of the ROM BIOS.  [Return]
  3121.       
  3122.       ROMdate [/Q] [/@EnVar]                                                       2.0  2.1
  3123.  
  3124. The displayed date is the string of characters found at F000:FFF5 in memory.
  3125. Not all BIOS may have the date at this location.
  3126.  
  3127.  
  3128. *### ROMmodel                                                                       [BATCH]
  3129. *
  3130. Display the model bytes of the ROM BIOS.  [Return]
  3131.       
  3132.       ROMmodel [/Q] [/@EnVar]                                                           2.0
  3133.  
  3134. The displayed bytes are in hexadecimal.  If the system supports Interrupt 15H
  3135. Function C0H, then the model, submodel and BIOS revision bytes of the ROM
  3136. configuration table are displayed.  If the system does not support this call,
  3137. the machine model byte at F000:FFFE is displayed.  The exit ErrorLevel is equal
  3138. to the model byte.
  3139.  
  3140.  
  3141. *### RootDir                                                                        [BATCH]
  3142. *
  3143. Determine the file capacity characteristics of the root directory.  [Return]
  3144.       
  3145.       RootDir SubCommandName d: [/Q] [/@EnVar]                                          2.2
  3146.  
  3147. where "d:" is the desired drive.  The following are valid SubCommandNames:
  3148. Total, Free, Used.  Each SubCommandName may be abbreviated as desired.  Error
  3149. messages are displayed if the routine fails.  This command is useful to
  3150. determine if a floppy root directory has enough space to hold a specific number
  3151. of file entries.
  3152.  
  3153.   *  Free:  Returns the number of unused root directory entries.
  3154.   *  Total:  Returns the total capacity of the root directory.
  3155.   *  Used:  Returns the number of used root directory entries.
  3156.  
  3157.  
  3158. *### Rows                                                                           [BATCH]
  3159. *
  3160. Determine the number of displayed rows.  [Return]
  3161.       
  3162.       Rows                                                                              2.0
  3163.  
  3164. The returned level is based on the value stored in the BIOS data area.
  3165.  
  3166.  
  3167. *### Share                                                                          [BATCH]
  3168. *
  3169. Determine if SHARE.EXE is installed.  [Return]
  3170.       
  3171.       Share                                                                             2.0
  3172.  
  3173.    Share Exit ErrorLevels
  3174. ---------------------------------------------
  3175. 0         Not installed, OK to install
  3176. 1         Not installed, not OK to install
  3177. 2         Installed
  3178. 255       Invalid DOS version
  3179.  
  3180. The command executes Interrupt 2FH Function 10H Subfunction 0.  Note that if DOS
  3181. 4.01 SHARE was automatically loaded due to large disk volumes, file sharing is
  3182. in an inactive state until this call is made.  Share reports installed in a
  3183. Windows DOS session with VSHARE.386 installed.  This command requires DOS
  3184. version 3.0 or higher.
  3185.  
  3186.  
  3187. *### Shift-AND                                                                      [BATCH]
  3188. *
  3189. Determine if desired shift keys are depressed.  [Return]
  3190.       
  3191.       Shift-AND [Alt] [Ctrl] [Shift]                                                    2.0
  3192.  
  3193.    Shift-AND Exit ErrorLevels
  3194. ---------------------------------------------
  3195. 0         Some or none of the keys listed are depressed
  3196. 1         All keys listed are depressed
  3197.  
  3198. The routine will work with either of the paired keys on the keyboard.  The
  3199. requested keys are considered to be "AND"ed, meaning all keys listed must be
  3200. depressed.  The arguments may be shortened as desired, but must always be
  3201. separated by at least one space.  Use the Shift-OR command to do an OR
  3202. comparison of the shift keys.  Use the ShiftState command for identifying
  3203. individual shift keys.
  3204.  
  3205.  
  3206. *### ShiftLock                                                                      [BATCH]
  3207. *
  3208. Determine status of keyboard NumLock, CapsLock, ScrollLock and Insert.  [Return]
  3209.       
  3210.       ShiftLock [SubCommandName]                                                        2.0
  3211.  
  3212.    ShiftLock Exit ErrorLevels
  3213. ---------------------------------------------
  3214. With SubCommandName            0           Lock state is off
  3215.                                1           Lock state is on
  3216. Without SubCommandName         0           No lock states are on
  3217.                                1           ScrollLock is on
  3218.                                2           NumLock is on
  3219.                                4           CapsLock is on
  3220.                                8           Insert is on
  3221.  
  3222. The following are valid SubCommandNames:  Caps, Insert, Num, Scroll.  Each
  3223. SubCommandName may be abbreviated as desired.
  3224.  
  3225. Issued without a SubCommandName, the command returns the ErrorLevels noted
  3226. above.  The ErrorLevel is additive and can be in the range of 0 to 15.
  3227.  
  3228.  
  3229. *### Shift-OR                                                                       [BATCH]
  3230. *
  3231. Determine if desired shift keys are depressed.  [Return]
  3232.       
  3233.       Shift-OR [Alt] [Ctrl] [Shift]                                                     2.0
  3234.  
  3235.    Shift-OR Exit ErrorLevels
  3236. ---------------------------------------------
  3237. 0         None of the keys listed are depressed
  3238. 1         At least one of the keys listed is depressed
  3239.  
  3240. The routine will work with either of the paired keys on the keyboard.  The
  3241. requested keys are considered to be "OR"ed, meaning at least one of the keys
  3242. listed must be depressed.  The arguments may be shortened as desired, but must
  3243. always be separated by at least one space.  Use the Shift-AND command to do an
  3244. AND comparison of the shift keys.  Use the ShiftState command for identifying
  3245. individual shift keys.
  3246.  
  3247.  
  3248. *### ShiftState                                                                     [BATCH]
  3249. *
  3250. Determine which shift keys are depressed.  [Return]
  3251.       
  3252.       ShiftState                                                                   2.0  2.2
  3253.  
  3254.    ShiftState Exit ErrorLevels
  3255. ---------------------------------------------
  3256. 0         None of the shift keys are depressed
  3257. 1         Right shift
  3258. 2         Left shift
  3259. 4         Right ctrl
  3260. 8         Left ctrl
  3261. 16        Right alt
  3262. 32        Left alt
  3263.  
  3264. The ErrorLevel is additive and can be in the range of 0 to 63.  Use the Shift-OR
  3265. command to do an OR comparison of the shift keys.  Use the Shift-AND command to
  3266. do an AND comparison of the shift keys.
  3267.  
  3268.  
  3269. *### Stacker                                                                        [BATCH]
  3270. *
  3271. Identify the presence of a Stacker device driver in memory and optionally
  3272. determine if a specific drive is a Stacker volume.  [Return]
  3273.       
  3274.       Stacker [d:]                                                                 2.0  2.1
  3275.  
  3276.    Stacker Exit ErrorLevels
  3277. ---------------------------------------------
  3278. Without argument    0           Not installed
  3279.                     Else        Installed [(32 * major) + minor]
  3280. With argument       0           Not a Stacker volume
  3281.                     1           Valid Stacker volume
  3282.                     255         Invalid drive letter
  3283.  
  3284. where "d:" represents an optional drive letter to be checked as being a Stacker
  3285. volume.  When run without command line arguments, a driver status message is
  3286. displayed.  For example, the version 2.01 driver will return an ErrorLevel of
  3287. 65.
  3288.  
  3289. If any character is included on the command line, CFG checks to see if it is a
  3290. valid drive letter from A to Z.  For legal drive letters, CFG checks to see if
  3291. that drive corresponds to a valid Stacker volume.  The appropriate message is
  3292. displayed in each case.  The drive does not have to be a valid DOS drive to be
  3293. checked.  The Stacker device driver consults an internal table to determine if
  3294. the drive is a Stacker volume.  If a removable disk drive is checked (such as a
  3295. floppy disk or a Bernoulli), the drive must be mounted in order to provide a
  3296. valid response.  A reserved removable drive that does not have a volume mounted
  3297. will return an invalid response.
  3298.  
  3299.  
  3300. *### TaskSwitch                                                                     [BATCH]
  3301. *
  3302. Determine whether a task switcher is installed and enabled.  [Return]
  3303.       
  3304.       TaskSwitch [/Q] [/@EnVar]                                                         2.2
  3305.  
  3306.    TaskSwitch Exit ErrorLevels
  3307. ---------------------------------------------
  3308. 0         Not installed
  3309. 1         Installed (disabled)
  3310. 2         Installed (enabled)
  3311.  
  3312. Determines if any task switcher meeting the DOS 5.0 specification is installed.
  3313. If it is, the name of the task switcher is displayed.
  3314.  
  3315.  
  3316. *### Toggle                                                                  [CONFIG/BATCH]
  3317. *
  3318. Modifies the current shift state of the keyboard NumLock, CapsLock or ScrollLock
  3319. keys.  [Return]
  3320.       
  3321.       Toggle [N[+|-]] [C[+|-]] [S[+|-]] [/S]                                      2.0  2.32
  3322.  
  3323. where "N" represents the NumLock state, "C" represents the CapsLock state and
  3324. "S" represents the ScrollLock state.  Toggle changes the current shift state of
  3325. the keyboard NumLock, CapsLock or ScrollLock keys when used with just the
  3326. letters.  The state of the three keys is explicitly turned on or off if the
  3327. optional + or - argument is supplied.  The /S switch will write to the keyboard
  3328. port to synchronize the keyboard LEDs of systems that have a BIOS that does not
  3329. automatically perform the update.
  3330.  
  3331.  
  3332. *### Tones                                                                   [CONFIG/BATCH]
  3333. *
  3334. Programs the system's speaker port to emit a rising (Upward) or falling
  3335. (Downward) series of tones.  [Return]
  3336.       
  3337.       Tones SubCommandName                                                    1.0  1.1  2.2
  3338.  
  3339. The following are valid SubCommandNames:  Down, Up, Over, Under.  Each
  3340. SubCommandName may be abbreviated as desired.  Error messages are displayed if
  3341. the routine fails.  Over calls Up then Down.  Under calls Down then Up.
  3342.  
  3343.  
  3344. *### Typematic                                                               [CONFIG/BATCH]
  3345. *
  3346. Sets the keyboard typematic rate and delay.  [Return]
  3347.       
  3348.       Typematic r,d | SubCommandName                                              2.0  2.42
  3349.  
  3350.    Typematic Exit ErrorLevels
  3351. ---------------------------------------------
  3352. 0         No errors
  3353. 255       Invalid value
  3354.  
  3355. where "r" corresponds to the typematic rate (1-32) and "d" corresponds to the
  3356. delay (1-4) in 1/4 second increments.  The following are valid SubCommandNames:
  3357. Default, Fast, Slow.  Values outside the allowed ranges are reset to the closest
  3358. limiting value.  An ErrorLevel of 255 indicates that this was done.
  3359.  
  3360. NOTE:  Some keyboards do not recognize this command.
  3361.  
  3362.   *  Default:  Equivalent to settings of 20,2 (standard boot values).
  3363.   *  Fast:  Equivalent to settings of 32,1 (fastest repeat rate, shortest
  3364.       delay).
  3365.   *  Slow:  Equivalent to settings of 1,4 (slowest repeat rate, longest delay).
  3366.  
  3367. The values that the BIOS accepts are divisors that cannot be easily translated
  3368. into characters per second.  The following table lists some of the rate values
  3369. and the approximate number of characters per second (CPS).
  3370.  
  3371.    Typematic Command Keyboard Rates
  3372. Rate      CPS       Rate      CPS       Rate      CPS       Rate      CPS
  3373. ---------------------------------------------
  3374. 1         2         12        5         20        10        28        20
  3375. 6         3         14        6         22        12        30        24
  3376. 9         4         17        8         25        16        32        30
  3377.  
  3378.  
  3379. *### Upper                                                                          [BATCH]
  3380. *
  3381. Return String all in upper case.  [Return]
  3382.       
  3383.       Upper String [/Q] [/@EnVar]                                                       2.2
  3384.  
  3385. If String starts with a double quote ["], the double quote is deleted but
  3386. leading separators are not removed.  Otherwise, all leading white space is
  3387. removed from String.  A closing double quote should not be used.
  3388.  
  3389.  
  3390. *### Verify                                                                         [BATCH]
  3391. *
  3392. Return status of DOS Verify option.  [Return]
  3393.       
  3394.       Verify                                                                            2.0
  3395.  
  3396.    Verify Exit ErrorLevels
  3397. ---------------------------------------------
  3398. 0         Off
  3399. 1         On
  3400.  
  3401.  
  3402. *### Version                                                                        [BATCH]
  3403. *
  3404. Determine the version of various drivers/programs.  [Return]
  3405.       
  3406.       Version SubCommandName                                                            2.2
  3407.  
  3408.    Version Exit ErrorLevels
  3409. ---------------------------------------------
  3410. All                 0           Not installed
  3411. EMS/VCPI/XMS        Else        (16 * major) + minor
  3412. DPMI                Else        (100 * major) + minor
  3413. DOS                 Else        (32 * major) + minor
  3414. CFG                 Else        (100 * (major - 2)) + minor
  3415.  
  3416. Valid SubCommandNames are: CFG, DOS, DPMI, EMS, VCPI, XMS.  The DOS SubCommand
  3417. returns the same information as the DOSversion command, including the /T switch.
  3418.  
  3419.   *  DPMI - DOS Protected-Mode Interface
  3420.   *  EMS  - Expanded Memory Specification
  3421.   *  VCPI - Virtual Control Program Interface
  3422.   *  XMS  - Extended Memory Specification
  3423.  
  3424.  
  3425. *### VGA25                                                                   [CONFIG/BATCH]
  3426. *
  3427. Set a 25 line VGA screen.  [Return]
  3428.       
  3429.       VGA25 [/C]                                                         1.0  2.0  2.2  2.4
  3430.  
  3431. Forces the use of the display adapter's internal 8x16 font.  Interrupt 10H
  3432. Function 11H Subfunction 14H performs an adapter mode reset when it executes.
  3433. This works on VGA in a display independent way.  The /C switch clears the screen
  3434. after switching modes if ANSI is installed to set the screen color.
  3435.  
  3436. This command is in effect only for video modes 0-3.
  3437.  
  3438.  
  3439. *### VGA43                                                                   [CONFIG/BATCH]
  3440. *
  3441. Set a 43 line VGA screen.  [Return]
  3442.       
  3443.       VGA43 [/C]                                                              1.0  2.0  2.4
  3444.  
  3445. Forces the use of the display adapter's internal 8x14 font.  Interrupt 10H
  3446. Function 11H Subfunction 11H performs an adapter mode reset when it executes.
  3447. This works on VGA in a display independent way.  The /C switch clears the screen
  3448. after switching modes if ANSI is installed to set the screen color.
  3449.  
  3450. This command is in effect only for video modes 0-3.
  3451.  
  3452.  
  3453. *### VGA50                                                                   [CONFIG/BATCH]
  3454. *
  3455. Set a 50 line VGA screen.  [Return]
  3456.       
  3457.       VGA50 [/C]                                                              1.0  2.0  2.4
  3458.  
  3459. Forces the use of the display adapter's internal 8x8 font.  Interrupt 10H
  3460. Function 11H Subfunction 12H performs an adapter mode reset when it executes.
  3461. This works on VGA in a display independent way.  The /C switch clears the screen
  3462. after switching modes if ANSI is installed to set the screen color.
  3463.  
  3464. This command is in effect only for video modes 0-3.
  3465.  
  3466.  
  3467. *### VideoMode                                                                      [BATCH]
  3468. *
  3469. Determine/set the current video mode.  [Return]
  3470.       
  3471.       VideoMode [n]                                                                2.0  2.3
  3472.  
  3473. CAUTION:  Use this command with care.  Your video system hardware must support
  3474.       the video mode being set.
  3475.  
  3476. If the optional hexadecimal number "n" is added, the designated video mode is
  3477. set.  The returned ErrorLevel is based on the value stored in the BIOS data
  3478. area.
  3479.  
  3480.  
  3481. *### WaitFor                                                                 [CONFIG/BATCH]
  3482. *
  3483. Delay program execution for the number of minutes and seconds given on the
  3484. command line.  [Return]
  3485.       
  3486.       WaitFor [mm:]ss [/N]                                                   1.0  2.2  2.32
  3487.  
  3488.    WaitFor Exit ErrorLevels
  3489. ---------------------------------------------
  3490. 0         Timed out as requested
  3491. 1         Exited prior to time out due to key press
  3492. 255       Format error
  3493.  
  3494. where "mm" is the delay time in minutes and "ss" is in seconds.  If a single
  3495. number is on the command line, it is assumed to be seconds.  The default is one
  3496. second.  The /N switch tells CFG to not flush the keyboard buffer prior to
  3497. executing the command.
  3498.  
  3499. CFG only checks for a ":" between the minutes and seconds.  Any other character
  3500. or separator will cause the minutes value to be treated as seconds and the
  3501. seconds value to be ignored.  Spaces should not be used on either side of the
  3502. colon.
  3503.  
  3504. Pressing any key during the wait period will cancel the wait.  CFG checks the
  3505. keyboard buffer 18 times a second for a key press.
  3506.  
  3507.  
  3508. *### WaitTo                                                                  [CONFIG/BATCH]
  3509. *
  3510. Delay execution until the specified time of day.  [Return]
  3511.       
  3512.       WaitTo hh:mm[:ss] [/N]                                                       2.0  2.2
  3513.  
  3514.    WaitTo Exit ErrorLevels
  3515. ---------------------------------------------
  3516. 0         Timed out as requested
  3517. 1         Exited prior to time out due to key press
  3518. 255       Format error
  3519.  
  3520. where "hh" is the hour (0-23), "mm" is the minute (0-59) and "ss" is the second
  3521. (0-59).  If the seconds are omitted, 0 is assumed.  The /N switch tells CFG to
  3522. not flush the keyboard buffer prior to executing the command.
  3523.  
  3524. Pressing any key during the wait period will cancel the wait.  If a key is
  3525. waiting in the buffer and /N is not specified, the command immediately ends.
  3526.  
  3527.  
  3528. *### WarmBoot                                                                       [BATCH]
  3529. *
  3530. Perform a keyboard (Ctrl-Alt-Delete) system reset.  [Return]
  3531.       
  3532.       WarmBoot SubCommandName [/V]                                2.0  2.1  2.3  2.32  2.42
  3533.  
  3534. The following are valid SubCommandNames:  WaitFor, WaitTo, Verify.  Each
  3535. SubCommandName may be abbreviated as desired.  Error messages are displayed if
  3536. the routine fails.
  3537.  
  3538. All disk buffers that may not yet be written are flushed to disk via Interrupt
  3539. 21H Function 0DH (Disk Reset) prior to system reset.  EMM386 is shut down prior
  3540. to system restart.  For 8086/8088 processors only, the command jumps to
  3541. FFFF:0000 after setting the warm boot flag in the BIOS data area.  For 80286+
  3542. processors, the system is reset via the keyboard controller for reliability.
  3543. The /V Verify switch is available for use with the WaitFor and WaitTo
  3544. subcommands.  Use the ColdBoot command to simulate a power-on reset.
  3545.  
  3546.   *  WaitFor:  Executes the WaitFor command first.  All command line options of
  3547.       the WaitFor command are available.
  3548.   *  WaitTo:  Executes the WaitTo command first.  All command line options of
  3549.       the WaitTo command are available.
  3550.   *  Verify:  Prompt before rebooting.
  3551.  
  3552.  
  3553. *### Window                                                                  [CONFIG/BATCH]
  3554. *
  3555. Draw boxes on the screen in the desired color.  [Return]
  3556.       
  3557.       Window r c w h [b ["Fore [on] Back"]                                              2.0
  3558.  
  3559. where "r" is the top row of the box, "c" is the left column of the box "w" is
  3560. the box width, "h" is the box height and "b" is the box type (0-2).  The color
  3561. must be enclosed by double quotation marks and follows the same requirements as
  3562. the Cls command.  The top left screen corner is 1 1.
  3563.  
  3564. Three box types are available.  For b=0, the box is drawn without borders.  For
  3565. b=1, the box has single-line borders.  For b=2, the box has double-line borders.
  3566. If "b" is omitted, b=0 is assumed.  A value for "b" must be specified in order
  3567. to include a color.  If a color is not specified, the current screen colors are
  3568. used.
  3569.  
  3570. The smallest window allowed is 2 characters in width and height.  The area
  3571. inside the border is blanked with spaces.  Text can be added to the frame using
  3572. the Locate and Cecho commands.
  3573.  
  3574.  
  3575. *### Windows                                                                        [BATCH]
  3576. *
  3577. Determine if Microsoft Windows is currently running.  [Return]
  3578.       
  3579.       Windows                                                                           2.1
  3580.  
  3581.    Windows Exit ErrorLevels
  3582. ---------------------------------------------
  3583. 0         Windows is not running
  3584. 1         Windows is running in either Real or Standard mode
  3585. 2         Windows is running in Enhanced mode
  3586.  
  3587.  
  3588. *### ZeroFile                                                                       [BATCH]
  3589. *
  3590. Creates or truncates a file to a length of zero.  [Return]
  3591.       
  3592.       ZeroFile [/T] Filename                                                            2.2
  3593.  
  3594.    ZeroFile Exit ErrorLevels
  3595. ---------------------------------------------
  3596. 0            Successful (file did not previously exist)
  3597. 1            Successful (file existed and was truncated)
  3598. With error   ErrorLevel is the DOS error code (1-13)
  3599.  
  3600. This command will create a zero-byte file with the desired name.  If the file
  3601. already exists, the /T Truncate switch must be specified for CFG to truncate it.
  3602. This command is useful to create zero-byte files to serve as flags for batch
  3603. files to store information without an environment variable.  A zero-byte file
  3604. takes up no disk storage space other than its directory entry.  To create a file
  3605. with a unique random name, use the RandomFile command.
  3606.  
  3607.  
  3608.                        Appendix A:  Problems and Solutions
  3609.                                         
  3610.                                         
  3611.                                                                                    [Return]
  3612. I pass multiple CFG commands to a batch file, but they do not execute or cause
  3613. an error.
  3614.  
  3615.   *  This occurs when you use the MultiCommand separator with replaceable DOS
  3616.       batch file parameters.  DOS treats the MultiCommand separator semicolon as
  3617.       white space and deletes it while passing the parameter.  This is what
  3618.       causes the errors.  The solution is to use the semicolon in the called
  3619.       batch file or set up the CFG commands on separate lines.
  3620.  
  3621.  
  3622. I try to save environment output in a DOS box under Windows, but nothing ever
  3623. appears.
  3624.  
  3625.   *  Specify "/2" on the command line.  Your output is going into the master
  3626.       environment by default, not the secondary environment you want.  See the
  3627.       "DOS" section.
  3628.  
  3629.  
  3630. I get strange output from the Nowcommand when using multiple percent signs in my
  3631. command string.
  3632.  
  3633.   *  Use the "!" character in place of the "%" characters in this instance.  The
  3634.       DOS batch interpreter is interpreting the characters between the percent
  3635.       signs as a potential environment variable name.  Chances are that such a
  3636.       name does not exist, so DOS is deleting the percent signs and intervening
  3637.       characters before CFG ever receives the string.
  3638.  
  3639.  
  3640.                             Appendix B:  Bibliography
  3641.                                         
  3642.                                         
  3643.                                                                                    [Return]
  3644. Ralph Brown and Jim Kyle, _PC Interrupts_, Second Edition, Reading MA:
  3645. Addison-Wesley, 1994.  ISBN 0-201-62485-0.
  3646.  
  3647. Geoff Chappell, _DOS Internals_, Reading MA: Addison-Wesley, 1993.  ISBN
  3648. 0-201-60835-9.
  3649.  
  3650. Ray Duncan (Ed), _The MS-DOS Encyclopedia_, Redmond WA: Microsoft Press, 1988
  3651. (out of print).  ISBN 1-55615-174-8.
  3652.  
  3653. Frank Van Gilluwe, _Undocumented PC_, Reading MA: Addison-Wesley, 1994.  ISBN
  3654. 0-201-62277-7.
  3655.  
  3656. Microsoft Corporation, _Microsoft MS-DOS Programmer's Reference_, Second
  3657. Edition, Redmond WA: Microsoft Press, 1993.  ISBN 1-55615-546-8.
  3658.  
  3659. Andrew Schulman, et al., _Undocumented DOS_, Second Edition, Reading MA:
  3660. Addison-Wesley, 1994.  ISBN 0-201-63287-X.
  3661.  
  3662.  
  3663. There have been several other books I have use that have proved to be valuable:
  3664.  
  3665. Ray Duncan, _Power Programming with Microsoft Macro Assembler_, Redmond WA:
  3666. Microsoft Press, 1992.  ISBN 1-55615-256-6.
  3667.  
  3668. Harley Hahn, _Assembler Inside and Out_, Berkeley CA: McGraw-Hill, 1992.  ISBN
  3669. 0-07-881842-7.
  3670.  
  3671. Robert Hummel, _Assembly Language Lab Notes_, Emeryville CA: Ziff-Davis Press,
  3672. 1992.  ISBN 1-56276-059-9.
  3673.  
  3674. Peter Norton and Richard Wilton, _The New Peter Norton Programmer's Guide to the
  3675. IBM PC & PS/2_, Second Edition, Redmond WA: Microsoft Press, 1988 (out of
  3676. print).  ISBN 1-55615-131-4.
  3677.  
  3678. Marcus Johnson, _Assembly Language: For Real Programmers Only_, Carmel IN: Sams
  3679. Publishing, 1993.  ISBN 0-672-48470-6.
  3680.  
  3681. Allen L. Wyatt, Sr., _Advanced Assembly Language_, Carmel IN: Que Corporation,
  3682. 1992.  ISBN 1-56529-037-2.
  3683.  
  3684.  
  3685. With these, you too can write a program like CFG.  Have fun.
  3686.  
  3687.  
  3688.                           Appendix C:  Revision History
  3689.                                         
  3690.                                         
  3691.  
  3692. Version 1.0  --  28 August 1992                                                    [Return]
  3693.  
  3694.   *  First public version.  Supported Beep, Cls, ComHide, ComSwap, Echo,
  3695.       EchoPause, EGA25, EGA43, KeyPause, LptHide, LptSwap, Mono, Pause, Tones,
  3696.       VGA25, VGA43, VGA50 and WaitFor commands.
  3697.  
  3698. Version 1.1  --  11 September 1992                                                 [Return]
  3699.  
  3700.   *  Revised command line parsing.  Recognizes the plus sign, equals sign and
  3701.       comma as separators.
  3702.   *  Revised the method for detecting ANSI.  Previously, the ANSI Device Status
  3703.       Report sequence was used.  This proved unreliable on some systems when
  3704.       StdIn did not reflect a valid Cursor Position Report from ANSI.  The new
  3705.       method uses cursor positioning sequences.
  3706.  
  3707.   *  Cls:  Corrected a bug that caused bright colors to sometimes be displayed
  3708.       in low intensity, removed a mismatch between the DOS and ANSI color
  3709.       values, and added color parsing error messages.
  3710.   *  Tones:  Corrected error which made the command unavailable.
  3711.  
  3712.   *  Added the Color, IACAfill and Rem commands as well as the IACAread
  3713.       companion program.
  3714.  
  3715. Version 2.0  --  1 January 1993                                                    [Return]
  3716.  
  3717.   *  Program is now dual mode with a .COM extension.  The separate IACAread
  3718.       program is no longer required since that command is incorporated from the
  3719.       command line.
  3720.   *  Improved error handling and reporting.
  3721.   *  Deleted the plus sign from the list of separator characters.
  3722.  
  3723.   *  Beep:  Optionally allows specification of frequency and length of sound,
  3724.       with the ability to do multiple sounds from a single command line.
  3725.   *  Cls:  Sets the screen border color to that of the background and restores
  3726.       the cursor to its previous size.
  3727.   *  EGA25, EGA43, VGA25, VGA43 and VGA50:  These screen mode commands now
  3728.       optionally issue a ANSI escape sequence to clear the screen after the mode
  3729.       change to reset the screen color if the /C switch is specified.
  3730.   *  KeyPause:  Also sets an ErrorLevel.
  3731.  
  3732.   *  Added the AM, ANSI, ASCII, Blink, Border, Break, CanCopy, Cecho, ColdBoot,
  3733.       Cols, Compare, CoProc, CPU, Cursor, Day, DESQview, DirExist, Display,
  3734.       DOSmajor, DOSminor, DOSversion, Drive, DriveExist, DriveReady, DriveSize,
  3735.       DriveSpace, EMSversion, Env, FileDTC, FileExist, Files, FileSize,
  3736.       FileText, FullYear, GetKey, Hour, IACAread, Intense, IsVol, Locate,
  3737.       Memory, Minute, Month, Page, PM, Protected, PrtScr, RamDrive, RenDir,
  3738.       ROMdate, ROMmodel, Rows, Second, Share, Shift-AND, ShiftLock, Shift-OR,
  3739.       ShiftState, StacInst, Toggle, Typematic, Verify, VideoMode, WaitTo,
  3740.       WarmBoot, WeekDay, Window and Year commands.
  3741.  
  3742. *** Mediterranean/Red Sea Deployment 1993 ***  Versions 2.1 and 2.2 were written
  3743. while deployed aboard USS Theodore Roosevelt (CVN 71) during support missions
  3744. for the United Nations sanctioned NATO Operations Provide Promise and Deny
  3745. Flight in Bosnia-Herzegovina and Operation Sharp Guard in the Adriatic Sea.  We
  3746. also participated in Operation Southern Watch (southern Iraq no-fly zone) from
  3747. the Red Sea.  The deployment was 11 March to 8 September 1993.
  3748.  
  3749. Version 2.1 --- 12 May 1993                                                        [Return]
  3750.  
  3751. This version was released for Bantam Books "PC Magazine DOS Power Tools 6.0" by
  3752. Paul Somerson.
  3753.  
  3754.   *  Added extended ErrorLevel reporting via the /E+ switch.  The ErrorLevel
  3755.       which would be returned is now displayable from CONFIG.SYS.
  3756.   *  The exit ErrorLevel is now automatically included as part of an error
  3757.       message display.
  3758.   *  Invalid CommandNames and file names are now displayed for easier
  3759.       identification.
  3760.   *  The Help system screen code was modified for VGA and monochrome systems.
  3761.  
  3762.   *  ANSI:  Corrected a bug which caused a false negative report if the cursor
  3763.       was already in the home position.  If ANSI is not present, screen
  3764.       characters are now restored instead of erased.  These changes extend to
  3765.       all commands which test for/use ANSI.
  3766.   *  Cecho, Echo, EchoPause:  Commands completely rewritten to correct a parsing
  3767.       error that would not correctly handle a carriage return/line feed
  3768.       sequence.  The default tilde (~) format character can now be used from a
  3769.       batch file.
  3770.   *  ColdBoot:  Optionally prompts the user to verify the reboot if the /V
  3771.       Verify switch is used.
  3772.   *  Env:  Optionally finds the environment of the immediate parent process if
  3773.       the /P Parent switch is specified.
  3774.   *  FileSize:  Changed block calculation such that a partial block is added to
  3775.       the total number of blocks vice being ignored.
  3776.   *  IACAfill:  Unconditionally overwrites the IACA if the /O switch is
  3777.       specified.
  3778.   *  IACAread:  Optionally clears the IACA after reading if the /C switch is
  3779.       specified.  This was nonfunctional in version 2.0.
  3780.   *  RamDrive:  The /A switch now writes the correct letter to StdOut, provides
  3781.       the correct ErrorLevel and corrects a bug which could hang the machine if
  3782.       an unoccupied removable drive was encountered during a /S search.
  3783.   *  ROMdate:  Displays all eight characters of the date for ROMs that have
  3784.       nonstandard date formats.
  3785.   *  StacInst:  Renamed "Stacker".
  3786.   *  WarmBoot:  See ColdBoot changes above.
  3787.   *  WeekDay, Day, Month, Hour and Minute:  All accept an optional parameter for
  3788.       direct comparison with the normal output.
  3789.  
  3790.   *  Added the DS4, Help, KeyBoard, KeyBuffer, LastDrive, RandomFile and
  3791.       Windowscommands.
  3792.  
  3793. Version 2.2  --  10 November 1993                                                  [Return]
  3794.  
  3795.   *  Added the ability for the program to place its output directly into the DOS
  3796.       master environment and to directly manipulate environment strings.  The
  3797.       /@EnVar switch must be specified.  See the individual commands to
  3798.       determine support for this switch.
  3799.   *  CommandName and SubCommandName parsing was completely rewritten for ease in
  3800.       future expansion.  SubCommandNames may now be abbreviated to any number of
  3801.       characters.  Invalid SubCommandNames are displayed for easier
  3802.       identification.
  3803.   *  The /A ASCII output switch no longer has a global effect.  All screen
  3804.       output is displayed unless the /Q Quiet switch is used.  /Q has no effect
  3805.       on the Cecho, Echo and EchoPause commands.
  3806.   *  The /Dn Divisor switch is now effective for all commands that return an
  3807.       ErrorLevel except for a few specific cases.  The default divisor is 1.
  3808.   *  The /, Comma switch adds commas every three places to displayed numbers.
  3809.  
  3810.   *  Beep:  Pressing any key while playing now ends the command.  Added the /N
  3811.       No-Flush switch.
  3812.   *  CoProc, CPU, Protected:  Corrected a stack restoration problem in the Intel
  3813.       code which could possibly lock up the machine.
  3814.   *  DOSversion:  Added the /T True option.  See Version command.
  3815.   *  DriveVolume:  Corrected handling of volume names longer than eight
  3816.       characters.  It worked previously if the period was manually inserted
  3817.       between characters eight and nine.
  3818.   *  EMSversion:  Command deleted - added to Version command.
  3819.   *  Env:  Added the Clear, Fill, Reset and Set string SubCommands.
  3820.   *  FileSize:  Corrected block calculation for files larger than 64 KB.
  3821.   *  FullYear:  Corrected calculation for years greater than 1999.
  3822.   *  GetKey:  Corrected documentation to say function keys _must_ be preceded by
  3823.       an "F".  Numbers without an "F" were interpreted as scan codes (as
  3824.       intended); only the documentation was in error.  Added the Escape key and
  3825.       Ctrl-/Alt- letter key combinations to the parse list, the /C Case
  3826.       sensitive switch, the /S Show (display) switch, the "D:t,p" option and the
  3827.       "Sn" option.  Standard separators are now parsed out.
  3828.   *  IACAread:  Rewritten to use standard program output routines.
  3829.   *  IsVol:  Renamed "DriveVolume".
  3830.   *  Memory:  Deleted the /R Report switch.  A screen report is always made
  3831.       unless /Q is used.  Exit ErrorLevel is now based on whether or not a
  3832.       decimal number is present after the SubCommandName.  Added the High and
  3833.       UMB SubCommands.  Changed the "Xpanded" SubCommandName to "Expanded".
  3834.       [Extensive rewrite]
  3835.   *  PrtScr:  Added control and indication of the DOS print echo.
  3836.   *  RandomFile:  Resolves "." and ".." using the Dir command.
  3837.   *  ShiftState:  Corrected bug which made function inoperative.
  3838.   *  Tones:  Added the Over and Under options.  Made the tone length processor
  3839.       speed independent.
  3840.   *  VGA25:  Changed from issuing a mode 3 reset to using the display adapter's
  3841.       internal 8x16 font.
  3842.   *  WaitFor:  Checks the keyboard buffer for a key press each timer tick vice
  3843.       once each second.  Added the /N No-Flush switch.
  3844.   *  WaitTo:  Added the /N No-Flush switch.
  3845.  
  3846.   *  Added the Boot, CodePage, Country, Device, Dir, DosKey, FileDir, FileDrive,
  3847.       FileExt, FileName, Input, KeyFlush, KeyPress, KeyStuff, LastBoot, Left,
  3848.       Length, Lower, MachineName, Mid, Mouse, Now, Print, Printer, Right,
  3849.       RootDir, TaskSwitch, Upper, Version and ZeroFile commands.
  3850.  
  3851. Version 2.3  --  1 May 1994                                                        [Return]
  3852.  
  3853.   *  CFG is now multi-segmented (an EXE hiding in the COM file) in order to
  3854.       support further additions (and my sanity), using MASM 6.11 vice TASM 1.0.
  3855.   *  CFG now has a MultiCommand mode that allows multiple CommandNames on a
  3856.       single command line.  Each command must be separated by a semi-colon.
  3857.   *  Switches are now not scanned within fully quoted text strings.
  3858.   *  Added the /@EnVar switch "=" option to capitalize the associated EnVar.
  3859.   *  Added the /Bn switch to establish the desired number system base to use for
  3860.       some commands.
  3861.   *  Added to the /E switch:  "@" option to place the output ErrorLevel in the
  3862.       "EL" environment variable, "!" option to specify which of the possible
  3863.       ErrorLevels to return in MultiCommand mode, "E" option to allow basic
  3864.       ErrorLevel display when all those other options are used.
  3865.   *  Corrected a bug in the environment code if the low memory COMMAND.COM stub
  3866.       had been moved to the UMB area by a memory manager (like 386Max).  [This
  3867.       was in the /1B search method.]
  3868.   *  Changed the default method for locating the master environment.  The /1
  3869.       switch specifies the primary or master environment.  The /1A and /1B
  3870.       options control specific search methods.  The /2 switch specifies the
  3871.       secondary or parent environment.  The old /P switch is still valid, but
  3872.       the /2 switch will ensure future compatibility.  See the DOS section for
  3873.       details.
  3874.   *  CFG will now update both the master and parent environments, if desired.
  3875.       See the Global section for details.
  3876.   *  Commas are now ignored while reading numbers on the command line unless
  3877.       specified in the command description.
  3878.  
  3879.   *  ASCII:  Added /Bn support.
  3880.   *  Beep:  Changed argument format.  Tone and duration values are now separated
  3881.       by spaces; argument pairs are now separated by commas.  This change is
  3882.       required for the multiple command format.  The strict "no spaces" format
  3883.       is no longer required.  Added /Bn support.
  3884.   *  Cecho:  /B Blink switch changed to /K to support multiple number bases.
  3885.   *  ColdBoot:  Added the WaitFor, WaitTo and Verify subcommands.
  3886.   *  CoProc:  Corrected error identifying an 80486DX as "not installed".  Added
  3887.       Pentium identification.
  3888.   *  CPU:  Added Pentium identification.
  3889.   *  Device:  Changed format of the command to eliminate the confusing set of
  3890.       switches.  New SubCommands are Exist, List and Rename.  The /N and /R
  3891.       switches have been deleted.
  3892.   *  Env:  See environment changes above.  Added the Caps SubCommand.
  3893.   *  KeyPause:  Corrected bug that would not return the desired ErrorLevel.
  3894.   *  MachineName:  Now correctly displays names with embedded spaces.
  3895.   *  Memory:  Corrected error that made the desired memory comparison
  3896.       inoperative.  Added environment output and desired memory comparison for
  3897.       all subcommands.
  3898.   *  Memory Main:  Now bases calculation on location of CFG's PSP due to the EXE
  3899.       format.
  3900.   *  Mouse:  Changed ErrorLevel reporting.  An error in the reference I used led
  3901.       me astray.
  3902.   *  PrtScr:  Added ErrorLevel reporting for previous system PrtScr error.
  3903.   *  VideoMode:  Added the option of setting the desired video mode.
  3904.   *  WarmBoot:  See ColdBoot.
  3905.  
  3906.   *  Added the Add, And, Convert, Div, DOSlocation, DOSstartup, ErrorLevel,
  3907.       Lock, Mod,  Mul, Not, Or, Sub and Xor commands.
  3908.  
  3909. Version 2.31  --  21 May 1994                                                      [Return]
  3910.  
  3911.   *  FileText:  Corrected bug that always returned string not present.  Added
  3912.       the /C Case switch for case insensitive searches.
  3913.  
  3914. Version 2.32  --  1 July 1994                                                      [Return]
  3915.  
  3916.   *  Added Internal Error checking.  This should never happen, but it allows
  3917.       things to end a little bit more gracefully.
  3918.   *  Corrected display of messages during the /1B environment search error exit.
  3919.   *  Corrected failure to display "Out of Environment Space" error message.
  3920.   *  Note 1:  Corrected bugs in several commands which caused errors if they
  3921.       were not the last command on a line in MultiCommand mode.
  3922.   *  Note 2:  Corrected bugs in several commands which always returned strings
  3923.       capitalized.
  3924.  
  3925.   *  ColdBoot:  Revised reboot method for 286+ processors.  The system is now
  3926.       more reliably reset via the keyboard controller.
  3927.   *  DriveExist:  Note 1.
  3928.   *  DriveReady:  Note 1.
  3929.   *  DriveVolume:  Added testing for invalid drive designation.
  3930.   *  Env:  Corrected bug which put the Fill SubCommand into a loop and disabled
  3931.       the Reset SubCommand.  Fixed Set SubCommand.
  3932.   *  FileDTC:  Note 1.
  3933.   *  Left:  Notes 1 and 2.  Added the /C switch.
  3934.   *  Mid:  Notes 1 and 2.  Added the /C switch.
  3935.   *  Right:  Note 2.  Added the /C switch.
  3936.   *  Toggle:  Corrected bug which incorrectly displayed lock status.
  3937.   *  WaitFor:  Added ErrorLevel return.
  3938.   *  WarmBoot:  See ColdBoot.
  3939.  
  3940. Version 2.4  --  1 October 1994                                                    [Return]
  3941.  
  3942.   *  CFG is now Shareware with a $25 registration fee.  Please support
  3943.       shareware.
  3944.   *  On-line Help now includes searchable access of the CFG.DOC file.  See the
  3945.       Help command above for details.  Quick Help is now a separate CFG.HLP file
  3946.       and includes a list of SubCommandNames.  This allows a smaller executable
  3947.       and faster loading, especially when executed from CONFIG.SYS.  Both files
  3948.       must be in the same directory as the CFG executable to be found.
  3949.   *  The /P switch no longer specifies the secondary environment.  Use the /2
  3950.       switch.
  3951.   *  Note 3:  Added the /@EnVar switch function to the arithmetic commands.  The
  3952.       /Q Quiet switch is noted for completeness.
  3953.  
  3954.   *  Add:  Note 3.
  3955.   *  And:  Note 3.
  3956.   *  Cecho:  Corrected batch capitalization problem.
  3957.   *  Div:  Note 3.
  3958.   *  EGA43:  Now generates an error if you try to switch the video font size
  3959.       while in video mode 4 or above.
  3960.   *  Env:  Added the Save SubCommand.  Now handles full environments better.
  3961.   *  Help:  See above.
  3962.   *  KeyBuffer:  Changed format of the command to standardize the options.  New
  3963.       SubCommands are Set and Status.
  3964.   *  LptSwap:  Now swaps printer time-out values also.
  3965.   *  Mod:  Note 3.
  3966.   *  Mul:  Note 3.
  3967.   *  Not:  Note 3.
  3968.   *  Or:  Note 3.
  3969.   *  PrtScr:  Changed format of the command to eliminate the confusing set of
  3970.       options.  New SubCommands are Off, On, Print, Status and Toggle.  Moved
  3971.       DOS print echo control to the PrintEcho command.
  3972.   *  Sub:  Note 3.
  3973.   *  VGA25, VGA43 and VGA50:  See EGA43.
  3974.   *  Xor:  Note 3.
  3975.  
  3976.   *  Added the ComBaud, ComSet, DriveID, FileLines, GamePort, LptSet and
  3977.       PrintEcho commands.
  3978.  
  3979. Version 2.41  --  28 December 1994                                                 [Return]
  3980.  
  3981.   *  Shifted the program documentation from WordPerfect 5.1 (DOS) to Microsoft
  3982.       Word for Windows 6.0c with Woody's Office POWER Pack (WOPR) 6.0c added.
  3983.       Registered users will now also receive this documentation on disk as a
  3984.       Word 6.0 file that includes color, all the special formatting and
  3985.       hypertext jumps to easily move around the document.
  3986.  
  3987.   *  CPU:  Corrected display of Pentium processor stepping level, model and
  3988.       family.  Also see the P5 command.
  3989.  
  3990.   *  Added the P5 command.
  3991.  
  3992. Version 2.42  --  15 May 1995                                                      [Return]
  3993.  
  3994.   *  Check out the new Batch command.  It does some really* *neat stuff to make
  3995.       installation batch files easier to write.
  3996.   *  The WinWord version of this documentation for registered users has received
  3997.       significant upgrades.  The behind-the-scenes macros are much improved and
  3998.       powerful.
  3999.   *  CFG now generates an error and terminates if it is run in an Upper Memory
  4000.       Block.
  4001.   *  Note 4:  Corrected a parsing error in some commands when numbers were
  4002.       separated only by commas.
  4003.   *  Corrected a display problem where /E switch information would not be shown
  4004.       for some commands.
  4005.  
  4006.   *  ColdBoot:  Added code to shut down EMM386 prior to system restart.
  4007.   *  Country:  Improved error handling of invalid parameters.
  4008.   *  ErrorLevel:  Now accepts numbers in different number bases.
  4009.   *  GetKey:  Note 4 for D[:]t,p parameter.
  4010.   *  Typematic:  Added Default and Slow SubCommands.  A command line parameter
  4011.       is now required.  Illegal parameters are now reset to the maximum or
  4012.       minimum value allowed.  An ErrorLevel of 255 indicates that this was done.
  4013.       The typematic settings are adjusted to these reset values vice being
  4014.       ignored.  Note 4 for r,d parameters.
  4015.   *  WarmBoot:  See ColdBoot.
  4016.  
  4017.   *  Added the Batch command.
  4018.  
  4019. Version 2.43  --  15 July 1995                                                     [Return]
  4020.  
  4021.   *  Enhanced the WinWord macros supporting this file.
  4022.   *  The /Bnnumber base switch now accepts all values from 2 through 16, vice
  4023.       just 2, 8, 10 or 16.
  4024.   *  Corrected minor display problem when testing for an ANSI driver when none
  4025.       is installed.
  4026.  
  4027.   *  Env:  Corrected Set subcommand to use mixed case vice capitalized EnVar
  4028.       value.
  4029.   *  FileDTC:  Changed ErrorLevel reporting to match the previous text
  4030.       description.  The command now checks for all possible combinations of time
  4031.       and date.
  4032.   *  Keyboard:  Added the Disable, Enable and Status subcommands.  The previous
  4033.       command functionality is in the Status subcommand.  The Disable and Enable
  4034.       commands turn off all keyboard input, including the Ctrl-Alt-Delete reset.
  4035.   *  Now:  Added "!" as a alternative for "%".  Multiple percent signs may be
  4036.       misinterpreted by the DOS batch processor as referring to an environment
  4037.       variable name.  Individual %1, %2, etc. are taken for replacable command
  4038.       line parameters.
  4039.   *  P5:  Added the FDIV subcommand to positively identify Pentium processors
  4040.       with the FDIV bug.
  4041.   *  PrtScr:  Corrected disabled Print subcommand.
  4042.  
  4043.  
  4044.                        Appendix D:  Background Discussion
  4045.                                         
  4046.                                         
  4047.                                                                                    [Return]
  4048. CFG started as a pure DOS device driver.  As such, versions 1.0 and 1.1 provided
  4049. functionality from CONFIG.SYS only.  I experimented with dual-mode programming
  4050. to make version 2.0 provide a command line interface from DOS, expanding the
  4051. program's scope significantly.  Subsequent versions have expanded on both the
  4052. CONFIG.SYS and command line utility commands available.
  4053.  
  4054. Version 2.1 almost made it into Bantam's "DOS 6.0 Power Tools" except for the
  4055. delays in the mail brought about by my 1993 deployment (2.0 was shipped).
  4056. Several people received it directly based on specific requests.  Version 2.2 was
  4057. another significant expansion and improvement.
  4058.  
  4059. Version 2.3 moved CFG into still another facet of executable programs in that it
  4060. became a multi-segmented EXE program.  The transition took a bit work (with some
  4061. errors despite all my testing, sorry), but was necessary since I had to allow
  4062. for up to 32KB of DOS, adequate stack space, program code and all data within
  4063. 64KB.  While version 2.2 fits, it was obvious there was no more room for
  4064. expansion.  Version 2.3 has lots of elbow room for continued expansion and
  4065. improvement.  Modular programming helps the space cram.  The COM extension was
  4066. retained for compatibility with CONFIG.SYS and batch files already written.  DOS
  4067. identifies the program as an EXE and loads it appropriately.  (The 2.3x versions
  4068. fix known bugs.)
  4069.  
  4070. Version 2.4 splits the program's Help files out to reduce the size of the
  4071. executable.  This allows faster execution from CONFIG.SYS when DOS has only one
  4072. disk buffer available.  Searchable access to CFG.DOC is also provided.  Both
  4073. changes were something I was planning for awhile.  CFG has also become shareware
  4074. with this version.
  4075.  
  4076. Numerous utilities exist for use from the command line, but few were available
  4077. for use in CONFIG.SYS.  I could find only a few specially written drivers for
  4078. pausing CONFIG.SYS.  When I added Qualitas BlueMax 6.0 to my system, what was
  4079. once a relatively short boot process became quite a protracted affair.
  4080.  
  4081. I wanted to organize things, add color to the device driver installation phase,
  4082. messages (if necessary) and optional pauses.  I foresaw my disk becoming overrun
  4083. by numerous small device drivers (more than it already was), so I wrote the
  4084. basic CFG shell handler and then started looking around for useful utilities.
  4085. Most of what is included was written by myself.  Other routines were adapted
  4086. from published sources, many of those were enhanced.
  4087.  
  4088. When CFG is executed from CONFIG.SYS as a device driver, it does not remain
  4089. resident in memory and may be run multiple times.  CFG sets up its own stack
  4090. during execution to avoid overflowing the DOS stack.  The program then moves the
  4091. command line from the system buffer to a local buffer for parsing.  Switches are
  4092. parsed, the CommandName is scanned and a SubCommandName checked, if appropriate,
  4093. and the appropriate command is executed.  The command is responsible for any
  4094. additional command line parsing.  Upon completion of the command, the CFG
  4095. command handler regains control and performs the final clean-up processing
  4096. required by DOS for termination.
  4097.  
  4098. Since I wanted to access many CFG routines from the DOS command line or from a
  4099. batch file, I rewrote CFG (as of version 2.0) to be dual mode program: both
  4100. device driver and command line utility.  Not all commands, however, are
  4101. available in each mode.  An error message will be displayed if a command is
  4102. requested when it cannot be run.
  4103.  
  4104. For those who are interested, CFG will run the same command subroutine code from
  4105. both CONFIG.SYS and a batch file, only the program entry point changes.  Not
  4106. many DOS functions are [officially] available during device driver installation,
  4107. since the program file fragments that will become the operating system are still
  4108. being assembled when the drivers' initialization routines are run.  DOS
  4109. (Interrupt 21H) functions that are [officially] available are:  01H-0CH (various
  4110. character and string input and output routines), 25H (Set Interrupt Vector), 30H
  4111. (Get MS-DOS Version Number), and 35H (Get Interrupt Vector).  All BIOS video and
  4112. keyboard routines are available.  Within these limits, some very useful things
  4113. can be done.  If you bend these limits, even more interesting things are
  4114. possible.
  4115.  
  4116. General parsing routines allow any of the standard DOS separator characters to
  4117. be ignored.  With the exception of the bright Cls colors noted in the command
  4118. description and a few other clearly identified cases, the number of spaces
  4119. between command line words does not matter.
  4120.  
  4121.  
  4122.                            Appendix E:  Error Messages
  4123.                                         
  4124.                                         
  4125.                                                                                    [Return]
  4126.  
  4127. ANSI not installed
  4128.   *  Issued if CFG determines that an ANSI screen driver has not been loaded
  4129.       into memory when required for a command.
  4130.  
  4131. Buffer shifted
  4132.   *  Issued if the DOS keyboard buffer has been moved from its default location
  4133.       when KeyBuffer attempts to change its size.
  4134.  
  4135. Cannot display Help in graphics mode
  4136.   *  Issued if the video system is displaying graphics when Help is requested.
  4137.  
  4138. Cannot find file
  4139.   *  Issued if the requested file cannot be located by the DOS file system.
  4140.  
  4141. Cannot locate hidden ports
  4142.   *  Issued if the signature is missing from the upper memory hidden storage
  4143.       location.  This could be due to the area having been over-written or due
  4144.       to a Restore being run without a preliminary Hide operation for the
  4145.       ComHide and LptHide commands.
  4146.  
  4147. Cannot run CFG in upper memory
  4148.   *  Issued if CFG detects that it is being run above the 640KB memory line.
  4149.       See the On section for details.
  4150.  
  4151. Cannot swap the same port
  4152.   *  Issued if the ports requested are the same for ComSwap and LptSwap
  4153.       commands.
  4154.  
  4155. Command not available
  4156.   *  Issued if the command is not available in the current program mode.  Check
  4157.       the command's section of this file to see which commands are available
  4158.       from CONFIG.SYS and which are available from batch files.
  4159.  
  4160. Divide by zero
  4161.   *  Issued if a Div command divisor is zero.
  4162.  
  4163. DOS walk MCB method failed
  4164.   *  Issued if CFG's internal search routine cannot find the DOS master
  4165.       environment based on its validation criteria.
  4166.  
  4167. DOS error
  4168.   *  Issued if DOS returns an error when attempting to perform a requested
  4169.       function.  The exit ErrorLevel is usually the DOS error number.
  4170.  
  4171. Environment error
  4172.   *  Issued if CFG's environment scanning routine encounters an error in
  4173.       processing the environment (scan past end).  The DOS is not changed if
  4174.       this error occurs.
  4175.  
  4176. File error
  4177.   *  Issued if DOS returns an error when attempting to perform file operations.
  4178.       The ErrorLevel is usually the DOS error number.
  4179.  
  4180. File exists
  4181.   *  Issued if the ZeroFile command finds that the requested file already exists
  4182.       without the /T option specified.
  4183.  
  4184. Hidden ports already present
  4185.   *  For ComHide or LptHide commands.  Issued if Hide is run twice in succession
  4186.       without a Restore in between.  A second Hide action is prevented since it
  4187.       would permanently erase the base port addresses.
  4188.  
  4189. IACA already in use
  4190.   *  Issued if the first character of the IACA is not an ASCII 0 when IACAfill
  4191.       is run without the /O Overwrite switch.  This indicates other information
  4192.       may have already been placed in the IACA.
  4193.  
  4194. IACA is empty
  4195.   *  Issued if the first character of the IACA is an ASCII 0 when IACAread is
  4196.       run.  This indicates that nothing has been written to the IACA or it has
  4197.       been cleared.
  4198.  
  4199. Internal Error
  4200.   *  Issued if one of several error checking routines reports that internal CFG
  4201.       has encountered invalid data.  This means that the exact situation you
  4202.       used a CFG command in has led to the program error.  Please send me the
  4203.       snippet of the batch file that caused this and the numbers reported after
  4204.       the error message.  I will work out a fix.
  4205.  
  4206. Invalid checksum, ports not restored
  4207.   *  For ComHide or LptHide commands. The checksum stored with the hidden ports
  4208.       shows that the data has been changed since it was written, probably due to
  4209.       being over-written.
  4210.  
  4211. Invalid color
  4212.   *  Issued if anything appears after the CommandName that cannot be parsed as a
  4213.       screen color when one is required.
  4214.  
  4215. Invalid CommandName
  4216.   *  Issued if the specified CommandName is incorrectly spelled or missing.
  4217.       CommandNames cannot be abbreviated.
  4218.  
  4219. Invalid DOS version
  4220.   *  Issued if the command requires a specific minimum DOS version that does not
  4221.       match the version currently running.
  4222.  
  4223. Invalid drive designation
  4224.   *  Issued if a valid drive character is not specified on the command line.
  4225.  
  4226. Invalid format
  4227.   *  Issued if the command line format does not match that required by the
  4228.       command.  Check the command's section of this file for the exact format.
  4229.  
  4230. Invalid number
  4231.   *  Issued if the command line input is not in the correct decimal or
  4232.       hexadecimal format.
  4233.  
  4234. Invalid number base
  4235.   *  Issued if the /Bn switch processing encountered an invalid decimal number
  4236.       for the new number system base value.  See the Base portion of the Global
  4237.       section for the valid values.
  4238.  
  4239. Invalid SubCommandName
  4240.   *  Issued if a command's SubCommandName is not correct.  CFG checks for a
  4241.       match between the first word after the CommandName and values in an
  4242.       internal table of valid SubCommandNames for Commands that have
  4243.       SubCommands.  If a match is not found, this error is issued and no program
  4244.       output is made.  Check the command's section of this file for the exact
  4245.       format.
  4246.  
  4247. Invalid video mode
  4248.   *  Issued if the you try to switch video font size while in graphics mode.
  4249.  
  4250. Last PrtScr error
  4251.   *  Issued if the last DOS print screen command encountered an error.  The
  4252.       current PrtScr command execution may not occur.
  4253.  
  4254. Missing or incorrect command option
  4255.   *  Issued if the requested Command does not have a required option specified.
  4256.       Check the command's section of this file for the exact format.
  4257.  
  4258. Missing or invalid port
  4259.   *  Issued if only one port is given on the command line or if the port
  4260.       requested is other than 1/2/3/4 for ComSwap or 1/2/3 for LptSwap.
  4261.  
  4262. No batch file running
  4263.   *  Issued if the Batch command is run from the command line.
  4264.  
  4265. Out of environment space
  4266.   *  Issued if the desired output will cause the environment to exceed its
  4267.       maximum size.  The output is not made and the environment is not
  4268.       corrupted.  Delete unneeded environment strings or reboot with a larger
  4269.       /E: option specified in CONFIG.SYS on the SHELL line.  See the Sample
  4270.       section for an example SHELL line.
  4271.  
  4272. Overflow
  4273.   *  Issued if a Mul or Add command total exceeds CFG's 32-bit limit.
  4274.  
  4275. Unable to run in upper memory
  4276.   *  Issued if you try to execute CFG outside of standard DOS low memory.
  4277.  
  4278. Underflow
  4279.   *  Issued if a Sub command operation creates a negative number.  At this time,
  4280.       CFG cannot handle negative numbers.
  4281.  
  4282. Unknown SFT format
  4283.   *  Issued if the Files command finds an unexpected System File Table format
  4284.       when performing its verifications.
  4285.  
  4286.  
  4287.                        Appendix F:  Sample CONFIG.SYS File
  4288.                                         
  4289.                                         
  4290.                                                                                    [Return]
  4291. The following is a past copy of one my CONFIG.SYS files showing usage of several
  4292. of the commands as well as the MultiCommand format.  Line wrap is indicated by
  4293. indentation.  This file is from an IBM PS/2 Model 80 with Stacker Version 2.1.
  4294. [Return]
  4295.  
  4296. Break = On
  4297. Buffers = 10
  4298. Dos = High
  4299. FCBS = 1
  4300. Files = 8
  4301. LastDrive = G
  4302. Stacks = 8,128
  4303. Shell = C:\Dos\Command.Com C:\Dos /E:800 /P /F
  4304. Device = C:\Dos\Start\Cfg.Com VGA50;Cls Bright White on Blue
  4305. Device = C:\BlueMax\BlueMax.Sys Pro=C:\BlueMax\BlueMax.Pro
  4306. Device = C:\Dos\Start\Cfg.Com Cursor Hide; KeyPause
  4307. Device = C:\BlueMax\386Load.Sys Terse Size=1184 PrgReg=4 FlexFrame
  4308.           Prog=C:\Dos\Start\DASDDrvr.Sys
  4309. Device = C:\Norton\Ncache.Exe /Install /Ini=C:\Norton
  4310. Device = C:\Dos\Start\Cfg.Com KeyPause
  4311. Device = C:\BlueMax\386Load.Sys Terse Size=37056 PrgReg=3
  4312.           FlexFrame Prog=C:\Dos\Start\Mouse.Sys Ser 2 S06 NB
  4313. Device = C:\Dos\Start\Cfg.Com KeyPause
  4314. Device = C:\BlueMax\386Load.Sys Terse Size=5280 FlexFrame
  4315.           Prog=C:\Dos\Start\Bridge_B.Drv /PS60:1B
  4316. Device = C:\Dos\Start\Cfg.Com LptHide Hide; KeyPause
  4317. Device = C:\BlueMax\386Load.Sys Terse Size=30880 PrgReg=3
  4318.           FlexFrame Prog=C:\Dos\Start\RCD.Sys /M0
  4319. Device = C:\Dos\Start\Cfg.Com LptHide Restore; KeyPause;Cls Bright White on Blue
  4320. Device = C:\BlueMax\386Load.Sys Terse Size=6768 PrgReg=2 FlexFrame
  4321.           Prog=C:\BlueMax\386Disk.Sys 1024 512 64 /XMS
  4322. Device = C:\Dos\Start\Cfg.Com KeyPause
  4323. Device = C:\BlueMax\386Load.Sys Terse Size=9040 PrgReg=2 FlexFrame
  4324.           Prog=C:\Dos\Start\ANSI.Sys
  4325. Device = C:\Dos\Start\Cfg.Com Color Bright White on Blue;KeyPause
  4326. Device = C:\Stacker\Screate.Sys F:
  4327. Device = C:\Dos\Start\Cfg.Com KeyPause
  4328. Device = C:\BlueMax\386Load.Sys Terse Size=4907 PrgReg=3 FlexFrame
  4329.           Prog=C:\Stacker\Stacker.Com D:\StacVol.Dsk @ F: /EMS /NB
  4330. Device = C:\Dos\Start\Cfg.Com KeyPause
  4331. Device = C:\Stacker\Sswap.Com D:\StacVol.Dsk
  4332. Device = C:\Dos\Start\Cfg.Com KeyPause
  4333. Device = C:\BlueMax\386Load.Sys Terse Size=62573 PrgReg=3
  4334.           FlexFrame Prog=C:\NAV\NAV_.Sys /W
  4335. Device = C:\Dos\Start\Cfg.Com KeyPause; VGA25 /C; Cursor 2 2
  4336.  
  4337.  
  4338.                                       Index
  4339.  
  4340.  
  4341.                                                                                    [Return]
  4342.                                                Messages14
  4343. Acknowledgments                        6       MultiCommand Mode   13
  4344. Add                                   19       Notes
  4345. AM30                                             Case                             15
  4346. And                                   19         DOS Environment                  15
  4347. ANSI                                  20         On Loading High                  15
  4348.   Color Command                      25          Undocumented DOS                 17
  4349. ASCII                                 20         Usage From CONFIG.SYS            14
  4350. Association of Shareware                       Number Base                        13
  4351.   Professionals                       8        Return ErrorLevel                  13
  4352.                                                Sample CONFIG.SYS File             83
  4353. Background Discussion                 78       Switch Usage                       12
  4354. Basic Operation                        4       Syntax                             11
  4355. Batch                                 20     Commands                              19
  4356. Beep                                  21     Compare                               26
  4357. Bibliography                          70     ComSet                                27
  4358. Blink                                 22     ComSwap                               27
  4359. Boot                                  22     Contents                               2
  4360.   NoError                            22      Convert                               28
  4361. Border                                22     CoProc                                28
  4362. Break                                 22     Country                               28
  4363.                                              CPU                                   29
  4364. CanCopy                               23     Cursor                            29, 83
  4365. Case on the Command Line              15       Default                            29
  4366. Cecho                                 23       Hide                           29, 83
  4367. Cls                                   23       Restore                            29
  4368.   ANSI Not Installed                 24      
  4369.   Colors                             23      Day                                   30
  4370. CodePage                              24     DESQview                              31
  4371. ColdBoot                              24     Device                                31
  4372.   Verify                             25        Exist                              31
  4373.   WaitFor                            25        List                               31
  4374.   WaitTo                             25        Rename                             31
  4375. Color                                 25     Dir                                   31
  4376. Cols                                  25     DirExist                              32
  4377. ComBaud                               25     Disclaimer - Agreement                 7
  4378. ComHide                               26     Disk Files Included with CFG           5
  4379.   Hide                               26      Display                               32
  4380.   Restore                            26      Div                                   19
  4381. Command Line                                 Documentation                          5
  4382.   Global Switches                    11      DOS Environment                       15
  4383. DosKey                                                                             32FileExt 40
  4384. DOSlocation                                                                        33FileLines     41
  4385.   High                               33      FileName40
  4386.   Low                                33      Files   42
  4387.   RAM                                33        Blocks                             42
  4388.   ROM                                33        Free                               42
  4389. DOSstartup                            33       Margin                             42
  4390. DOSversion                            34       Orphan                             42
  4391. Drive                                 34       Previous                           42
  4392. DriveExist                            34       Total                              42
  4393. DriveID                               34       Used                               42
  4394. DriveReady                            35     FileSize                              42
  4395. DriveSize                             36     FileText                              42
  4396. DriveSpace                            36     FullYear                              30
  4397. DriveVolume                           36     
  4398. DS4                                   37     GamePort                              43
  4399.                                              GetKey                                43
  4400. Echo                                  37     Global Switches                       11
  4401. EchoPause                             38     
  4402. EGA25                                 38     Help                                  44
  4403. EGA43                                 38     Hour                                  30
  4404. Env                                   38     
  4405.   Caps                               39      IACAfill                              44
  4406.   Clear                              39      IACAread                              45
  4407.   Fill                               39      Input                                 46
  4408.   Free                               39      Installation                          10
  4409.   Reset                              39        Locations                          10
  4410.   Save                               39        Procedure                          10
  4411.   Set                                39        Quick Help                         10
  4412.   Strings                            39      Intense                               46
  4413.   Total                              39      Introduction                           4
  4414.   Used                               39      
  4415. Environment                                  Keyboard                              46
  4416.   General Description                15      KeyBuffer                             47
  4417. Error Messages                        80       Set                            46, 47
  4418. ErrorLevel                            39       Status                             47
  4419.                                              KeyFlush                              47
  4420. FileDir                               40     KeyPause                          47, 83
  4421. FileDrive                             40     KeyPress                              47
  4422. FileDTC                               40     KeyStuff                              48
  4423. FileExist                             41     
  4424. LastBoot                              48     Or19
  4425. LastDrive                             48     
  4426. Left                                  49     P554
  4427. Length                                49       Model                              54
  4428. Locate                                49       Off                                54
  4429. Lock                                  49       On54
  4430.   Disk                               50        Step                               54
  4431.   Net                                50      Page                                  55
  4432.   None                               50      Pause                                 55
  4433.   Stack                              50      PM30
  4434.   System                             50      Print                                 55
  4435. Lower                                 50     PrintEcho                             55
  4436. LptHide                               50       Off                                56
  4437.   Hide                           50, 83        On56
  4438.   Restore                        50, 83        Status                             56
  4439. LptSet                                51       Toggle                             56
  4440. LptSwap                               51     Printer                               56
  4441.                                              Problems and Solutions                69
  4442. MachineName                           51     Protected                             56
  4443. Memory                                52     PrtScr                                57
  4444.   Base                               52        Off                                57
  4445.   Expanded                           52        On57
  4446.   Extended                           52        Print                              57
  4447.   High                               52        Status                             57
  4448.   Main                               52        Toggle                             57
  4449.   UMB                                52      
  4450. Messages                              14     RamDrive                              57
  4451. Mid                                   52     RandomFile                            58
  4452. Minute                                30     Registration                        7, 8
  4453. Mod                                   19       How To                              8
  4454. Mono                                  53       What You Get                        8
  4455. Month                                 30       Why                                 7
  4456. Mouse                                 53     Rem                                   58
  4457. Mul                                   19     RenDir                                59
  4458. MultiCommand Mode                     13     Return ErrorLevel                     13
  4459.                                              Revision History                      71
  4460. Not                                   19     Right                                 59
  4461. Now                                   53     ROMdate                               59
  4462. Number Base                           13     ROMmodel                              59
  4463.                                              RootDir                               60
  4464. On Loading High                       15       Free                               60
  4465.   Total                                                                           60  MultiCommand Mode   13
  4466.   Used                                                                            60  Notes
  4467. Rows                                  60         Case                             15
  4468.                                                  DOS Environment                  15
  4469. Sample CONFIG.SYS File                83         On Loading High                  15
  4470. Second                                30         Undocumented DOS                 17
  4471. Share                                 60         Usage From CONFIG.SYS            14
  4472. Shareware, Definition                  7       Number Base                        13
  4473. Shift-AND                             60       Return ErrorLevel                  13
  4474. ShiftLock                             61       Sample CONFIG.SYS File             83
  4475.   Caps                               61        Switch Usage                       12
  4476.   Insert                             61      
  4477.   Num                                61      Verify                                64
  4478.   Scroll                             61      Version                               64
  4479. Shift-OR                              61       CFG                                65
  4480. ShiftState                            62       DOS                                65
  4481. Stacker                               62       DPMI                               65
  4482. Sub                                   19       EMS                                65
  4483. Switch Usage                          12       VCPI                               65
  4484. SWREG                                  8       XMS                                65
  4485. Syntax                                11     VGA25                             65, 83
  4486. System Requirements                    4     VGA43                                 65
  4487.                                              VGA50                                 65
  4488. TaskSwitch                            62     VideoMode                             66
  4489. Toggle                                63     
  4490. Tones                                 63     WaitFor                               66
  4491.   Down                               63      WaitTo                                66
  4492. Typematic                             63     WarmBoot                              67
  4493.   Default                            64        Verify                             67
  4494.   Fast                               64        WaitFor                            67
  4495.   Slow                               64        WaitTo                             67
  4496.                                              WeekDay                               30
  4497. Undocumented DOS                      17     Window                                67
  4498. Upper                                 64     Windows                               67
  4499. Usage From CONFIG.SYS and the                
  4500.   Command Line                       14      Xor                                   19
  4501. Usage Notes                           14     
  4502. Use                                   11     Year                                  30
  4503.   Command Line Syntax                11      
  4504.   Global Switches                    11      ZeroFile                              68
  4505.   Messages                           14
  4506.  
  4507.  
  4508.