home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / c / cfg.zip / CFG.DOC < prev    next >
Text File  |  1993-01-01  |  91KB  |  2,448 lines

  1.  
  2.                                 CFG Version 2.0
  3.  
  4.                                 Mark Treadwell
  5.                               1247 Foursome Lane
  6.                       Virginia Beach, Virginia 23455-6819
  7.                              Voice: (804) 497-3281
  8.                             CompuServe: 73700,3344
  9.                       Internet: 73700.3344@compuserve.com
  10.  
  11.  
  12.                     Copyright (c) 1992, 1993 Mark Treadwell
  13.                               All Rights Reserved
  14.  
  15.  
  16.  
  17. CFG is a program that provides multiple utilities for use during CONFIG.SYS
  18. execution and from the DOS command line.  The program does not remain resident
  19. and releases all memory on termination.  Suggestions for additions to CFG are
  20. welcome.  If you desire, contact me via CompuServe Mail or in the following
  21. CompuServe Forums:
  22.  
  23.             CIS:IBMSYS Section 1 (DOS/DOS Utils [S])
  24.             CIS:MSDOS  Section 1 (General)
  25.             CIS:ZENITH Section 1 (General)
  26.             ZNT:TIPS   Section 1 (General Info [U])
  27.  
  28.  
  29. ──────────────────────────────────────────────────────────────────────────────
  30.                                     TO USE
  31. ──────────────────────────────────────────────────────────────────────────────
  32.  
  33.  
  34. Syntax      From CONFIG.SYS:
  35.  
  36.                   DEVICE=[drive:][/path]Cfg.Com CommandName [Options]
  37.  
  38.             From the DOS command line or batch file:
  39.  
  40.                   [drive:][/path]Cfg CommandName [Options]
  41.  
  42.  
  43. Parameter   [drive:][/path]
  44.                   Specifies the location of the CFG.COM file.
  45.  
  46.             CommandName
  47.                   The list of valid CommandNames is given in the COMMANDS
  48.                   section below.  The CommandNames must be spelled exactly as
  49.                   shown.
  50.  
  51.             [Options]
  52.                   CommandName related options and SubCommandNames are detailed
  53.                   below.
  54.  
  55.  
  56. Switches    /Dn   Divisor switch.  Several commands let you select an optional
  57.                   block size for ErrorLevel reporting of results that are
  58.                   larger than 255.  Each function has a default value that is
  59.                   given below.  The n specifies the decimal number by which
  60.                   the result is divided.  Valid values for n range from 1 to
  61.                   65535.  The number should be entered without commas. 
  62.                   (Example: /D8192)
  63.             /E    Display the exit ErrorLevel (command line only).
  64.             /?    Display an abbreviated command summary (command line only).
  65.  
  66.             See the individual commands for additional switches.
  67.  
  68.  
  69. ErrorLevel  Generally, the exit ErrorLevel is 0 for off/invalid/disabled/etc.
  70.             and 1 for on/valid/enabled/etc.  Other values are given for each
  71.             function.  An ErrorLevel of 255 generally indicates that an error
  72.             occurred.  Functions with no particular exit ErrorLevel will
  73.             always set it to 0.
  74.  
  75.  
  76. Example     See the SAMPLE CONFIG.SYS section at the end of this file.
  77.  
  78.  
  79. CommandNames
  80.  
  81.         AM           Day            FileExist     Mono          StacInst
  82.         ANSI         DESQview       Files         Month         Toggle
  83.         ASCII        DirExist       FileSize      Page          Tones
  84.         Beep         Display        FileText      Pause         Typematic
  85.         Blink        DOSmajor       FullYear      PM            Verify
  86.         Border       DOSminor       GetKey        Protected     VGA25
  87.         Break        DOSversion     Hour          PrtScr        VGA43
  88.         CanCopy      Drive          IACAfill      RamDrive      VGA50
  89.         Cecho        DriveExist     IACAread      Rem           VideoMode
  90.         Cls          DriveReady     Intense       RenDir        WaitFor
  91.         ColdBoot     DriveSize      IsVol         ROMdate       WaitTo
  92.         Color        DriveSpace     KeyFlush      ROMmodel      WarmBoot
  93.         Cols         Echo           KeyPause      Rows          WeekDay
  94.         ComHide      EchoPause      KeyPress      Second        Window
  95.         Compare      EGA25          Locate        Share         Year
  96.         ComSwap      EGA43          LptHide       Shift-AND
  97.         CoProc       EMMversion     LptSwap       ShiftLock
  98.         CPU          Env            Memory        Shift-OR
  99.         Cursor       FileDTC        Minute        ShiftState
  100.  
  101.  
  102. Notes       CFG is now a dual mode program.  It will run both as a device
  103.             driver from CONFIG.SYS and as a command line utility.  The change
  104.             was made because I wanted to consolidate all my utilities in one
  105.             place and to make the testing of new functions easier.  The title
  106.             line of each command below specifies whether it can be used from
  107.             CONFIG.SYS, from a BATCH file (command line) or both.
  108.  
  109.             Case does not matter in CONFIG.SYS since DOS capitalizes
  110.             everything in the file during its preliminary scan.  This is
  111.             pertinent when using the Echo or EchoPause commands.
  112.  
  113.             CFG provides numerous error messages to make problems easier to
  114.             diagnose and correct since rebooting multiple times to get
  115.             everything right can be tedious.  See the SAMPLE CONFIG.SYS
  116.             section for examples of program use.
  117.  
  118.             Switches are handled by CFG as follows:  After the command line
  119.             has been transferred to a local buffer and before CommandName
  120.             parsing, the command line is scanned for any switches.  If a valid
  121.             switch is found, a program variable is set and the switch is
  122.             blanked from the local command line by replacing it with spaces. 
  123.             Thus, a switch may be placed anywhere on the command line and
  124.             still be found.  Realize, however, switches will also be found in
  125.             text strings (such as in Echo, Cecho and EchoPause) where they may
  126.             not be meant.  This method greatly simplifies parsing and reduces
  127.             potential confusion, despite its limitations.
  128.  
  129.             CFG may be loaded high during execution using the DOS Version 5.0
  130.             DeviceHigh or LoadHigh commands or using another memory manager
  131.             such as Quarterdeck's QEMM or Qualitas' 386Max/BlueMax.  Doing so
  132.             with the third party programs may actually waste memory since
  133.             stubs of the loader programs may remain resident in memory.  It is
  134.             simplest (and safest) to execute CFG via a Device statement from
  135.             CONFIG.SYS or directly from the command line.
  136.  
  137.  
  138.                       PC Magazine PATCH Utility Variables
  139.                       ───────────────────────────────────
  140.       [TEXT]      : Echo Carriage Return/Line Feed Insert Character
  141.                   : Echo Lower Case Toggle Character
  142.                   : Command Line Switch Character
  143.  
  144.       [NUMBER]    : Tones Low Point Frequency
  145.                   : Tones High Point Frequency
  146.                   : Tones Step Value
  147.                   : Tones Duration
  148.  
  149.  
  150. ──────────────────────────────────────────────────────────────────────────────
  151.                                    COMMANDS
  152. ──────────────────────────────────────────────────────────────────────────────
  153.  
  154. All command line formats and examples given below should be understood to
  155. begin with "Device=[drive:][/path]Cfg.Com " in the CONFIG.SYS file or
  156. "[drive:][/path]Cfg " from the command line unless specified otherwise.
  157.  
  158.  
  159. ══════════════════  ANSI . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  160.  
  161. Determine if the ANSI driver is loaded in memory.
  162.  
  163. Command line format:
  164.  
  165.       ANSI
  166.  
  167. Exit ErrorLevels:
  168.  
  169.       0  = ANSI is not installed
  170.       1  = ANSI is installed
  171.  
  172. Determines if any ANSI driver is installed by writing ANSI cursor positioning
  173. sequences to the screen.
  174.  
  175. This function was written by the author.
  176.  
  177.  
  178. ══════════════════  ASCII  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  179.  
  180. Read decimal numbers from the command line and writes the corresponding ASCII
  181. characters to DOS StdOut.
  182.  
  183. Command line format:
  184.  
  185.       ASCII a b c ...
  186.  
  187. where a b c ... represent decimal numbers.  The function reads the numbers and
  188. writes the corresponding ASCII characters to DOS StdOut.  This allows the
  189. output to be redirected as desired.  This is a very useful way of creating
  190. short temporary files or sending printer control characters.
  191.  
  192. Example command line:
  193.  
  194.       ASCII 64 67 68 32 > %TEMP%CD.BAT
  195.  
  196. This example writes "@CD " to a temporary file.  Follow this with "CD >>
  197. %TEMP%CD.BAT" and you have a quick batch file that will return you to the
  198. current directory when executed.
  199.  
  200. This function was written by the author.
  201.  
  202.  
  203. ══════════════════  Beep . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  204.  
  205. Beep the speaker.
  206.  
  207. Command line format:
  208.  
  209.       Beep [m,n[;m,n] ... ]
  210.  
  211. where m corresponds to a frequency in Hertz and n corresponds to the number of
  212. 1/18 second increments that comprise the duration.  If nothing is specified,
  213. the default sound is a C note for 1/6 of a second (1046,3).  By separating the
  214. argument pairs with semicolons, a series of tones may be produced with the
  215. same Beep command.  No spaces should be in the argument string to ensure
  216. proper parsing.  Decimal numbers are required.
  217.  
  218. This function was adapted from the BATCHMAN utility written by Michael J.
  219. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  220.  
  221.  
  222. ══════════════════  Blink  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  223.  
  224. Enable blinking screen characters.
  225.  
  226. Command line format:
  227.  
  228.       Blink
  229.  
  230. Calls Interrupt 10H Function 10H Subfunction 3 to enable blinking characters
  231. on EGA and above.  Any characters with intense backgrounds will start
  232. blinking.
  233.  
  234. This function was written by the author.
  235.  
  236.  
  237. ══════════════════  Border . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  238.  
  239. Set the screen border color.
  240.  
  241. Command line format:
  242.  
  243.       Border [Color]
  244.  
  245. The notes on colors for the Cls command apply to the Border command except as
  246. noted here.
  247.  
  248. If no color is given or an invalid color is specified, the current screen
  249. background color at the cursor location is used.  If anything appears after
  250. the CommandName that cannot be parsed as a color, an error message is
  251. displayed.  This function may be used to indicate various regions or phases of
  252. device driver installation or batch file execution.
  253.  
  254. This function was written by the author.
  255.  
  256.  
  257. ══════════════════  Break  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  258.  
  259. Determine status of DOS extended Break checking.
  260.  
  261. Command line format:
  262.  
  263.       Break
  264.  
  265. Exit ErrorLevels:
  266.  
  267.       0 = Break is off
  268.       1 = Break is on
  269.  
  270. This function was written by the author.
  271.  
  272.  
  273. ══════════════════  CanCopy  . . . . . . . . . . . . . . . . . . . . . [BATCH]
  274.  
  275. Determine if there is enough room to copy files to a disk.
  276.  
  277. Command line format:
  278.  
  279.       CanCopy FileSpec [d:]
  280.  
  281. Exit ErrorLevels:
  282.  
  283.         0 = No room to copy files or DOS file error
  284.         1 = Room to copy files
  285.  
  286. where FileSpec can use any DOS wildcards and d: corresponds to a valid DOS
  287. drive.  If d: is omitted, the default drive is used.
  288.  
  289. This function was adapted from the BATCHMAN utility written by Michael J.
  290. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  291.  
  292.  
  293. ══════════════════  Cecho  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  294.  
  295. Echo text to the screen with the specified colors.
  296.  
  297. Command line format:
  298.  
  299.       Cecho [/B|/I] [/C] [/N] "Fore [on] Back" Text
  300.  
  301. The desired screen color for Text must be enclosed in double quotes.  The
  302. notes for the Cls command use of colors apply.  The /B switch calls the Blink
  303. function to enable blinking characters on EGA and above.  The /C switch is
  304. used to output a carriage return only at the end of the Text, returning the
  305. cursor to the first column for overwriting the previous output.  The /I switch
  306. calls the Intense function to enable intense backgrounds on EGA and above. 
  307. The /N switch is used to eliminate the final carriage return/line feed,
  308. leaving the cursor at the end of the String just displayed.
  309.  
  310. The displayed text starts with the first character after the closing double
  311. quote of the color, leading spaces are included.  During execution from
  312. CONFIG.SYS, the Echo command line format applies.
  313.  
  314. This function was adapted and expanded from the BATCHMAN utility written by
  315. Michael J. Mefford and published in the 30 January 1990 Utilities section of
  316. PC Magazine.
  317.  
  318.  
  319. ══════════════════  Cls  . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  320.  
  321. Clear the screen with a choice of foreground and background colors.
  322.  
  323. Command line format:
  324.  
  325.       Cls [Foreground [on] Background]
  326.  
  327. The following colors may be used:
  328.  
  329.                   - Black           - Grey
  330.                   - Blue            - Bright Blue
  331.                   - Green           - Bright Green
  332.                   - Cyan            - Bright Cyan
  333.                   - Red             - Bright Red
  334.                   - Magenta         - Bright Magenta
  335.                   - Yellow          - Bright Yellow
  336.                   - White           - Bright White
  337.  
  338. If any color in the right column is chosen for a background, the video display
  339. is reprogrammed to show intense background colors vice blinking text.  Some
  340. programs may subsequently reset this, causing all text on the screen to start
  341. blinking.
  342.  
  343. If ANSI is not installed, the screen is cleared using a BIOS window scroll. 
  344. Afterwards, the screen colors may not remain permanent, depending on the
  345. behavior of the video adapter.  If ANSI is installed before CFG is run, CFG
  346. will detect it and use ANSI escape sequences to change system colors.
  347.  
  348. Note that the "Bright ..." colors are scanned on the command line with only a
  349. single space between the words.  This was done to simplify the logic of the
  350. parsing routine.  Otherwise, CFG will accept any number of spaces between
  351. words.
  352.  
  353. If no colors a given or if an invalid combination is used, the current screen
  354. colors at the cursor location are used.  If anything appears after the
  355. CommandName that cannot be parsed as a color, an error message is displayed
  356. with a three second WaitFor pause prior to continuing with the clear screen.
  357.  
  358. Cls sets the screen border (overscan register) to the same color as the
  359. background.  Use the Border command if you want to change this.  It also
  360. restores the cursor size to what it was initially since some ANSI clear screen
  361. routines change the cursor size.
  362.  
  363. This function is loosely based on two programs:  The CLS.SYS driver written by
  364. William R. Peate [CompuServe: 76525,2366] and downloaded from the CompuServe
  365. ZiffNet ZNT:TIPS Forum Library 16 (Gen Utils) and the BATCHMAN utility written
  366. by Michael J. Mefford and published in the 30 January 1990 Utilities section
  367. of PC Magazine.  The command line color scanning and ANSI code was written by
  368. the author.
  369.  
  370.  
  371. ══════════════════  ColdBoot . . . . . . . . . . . . . . . . . . . . . [BATCH]
  372.  
  373. Perform equivalent of a power-on system reset.
  374.  
  375. Command line format:
  376.  
  377.       ColdBoot
  378.  
  379. All disk buffers that may not yet be written are flushed to disk via Interrupt
  380. 21H Function 0DH (Disk Reset) prior to system reset.  The function jumps to
  381. FFFF:0000 after clearing the warm boot flag in the BIOS data area.
  382.  
  383. This function was adapted from the BATCHMAN utility written by Michael J.
  384. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  385.  
  386.  
  387. ══════════════════  Color  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  388.  
  389. Set the screen color for future output using ANSI escape sequences without
  390. clearing the screen.
  391.  
  392. Command line format:
  393.  
  394.       Color Foreground [on] Background
  395.  
  396. The notes on colors for the Cls command apply to the Color command except as
  397. noted here.
  398.  
  399. ANSI must be installed.  If it is not installed, the function is aborted with
  400. an error message.  If no colors are given or if an invalid combination is
  401. used, an error message is displayed.
  402.  
  403. The Color command is designed to be used immediately after ANSI has been
  404. loaded into memory to set its default colors from white on black to what you
  405. desire.  It may also be used to highlight the output of a specific program or
  406. group of programs that do not use the BIOS for output.  Note that Color will
  407. not repaint the screen.  It only sets the color of any future output made via
  408. DOS.  Use the Cls command to reset the entire screen.
  409.  
  410. This function is a modification of the Cls routine written by the author.
  411.  
  412.  
  413. ══════════════════  Cols . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  414.  
  415. Determine the number of displayed columns.
  416.  
  417. Command line format:
  418.  
  419.       Cols
  420.  
  421. The returned ErrorLevel is based on the value stored in the BIOS data area.
  422.  
  423. This function was written by the author.
  424.  
  425.  
  426. ══════════════════  ComHide  . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  427.  
  428. Hide and restore the serial port base addresses.
  429.  
  430. Command line format:
  431.  
  432.       ComHide SubCommandName
  433.  
  434. The following are valid SubCommandNames: Hide, Restore.  Each SubCommandName
  435. may be abbreviated to its first letter.  Error messages are displayed if the
  436. routine fails.  (See the error message section below.)
  437.  
  438. ComHide hides the serial port base addresses by copying them to another
  439. location in memory when the Hide option is used.  On restoration with the
  440. Restore option, ComHide verifies the signature and checksum stored with the
  441. port addresses to ensure that they were not accidently over-written while
  442. hidden.  ComHide then copies the base addresses back to their normal location.
  443.  
  444. The default location for the hidden data is 7001:0000.  This is below the 512
  445. Kb boundary in the event that the machine only has that much base memory
  446. available, and high enough to keep it from being over-written during execution
  447. of other device drivers while the data is hidden.
  448.  
  449. Example command lines:
  450.  
  451.       CFG.COM ComHide Hide
  452.       MANGLE.SYS
  453.       CFG.COM ComHide Restore
  454.  
  455. This function was adapted from the LptHide function.
  456.  
  457.  
  458. ══════════════════  Compare  . . . . . . . . . . . . . . . . . . . . . [BATCH]
  459.  
  460. Compare two strings.
  461.  
  462. Command line format:
  463.  
  464.       Compare [/C] String1 String2
  465.  
  466. Exit ErrorLevels:
  467.  
  468.       0 = Strings are not the same
  469.       1 = Strings are the same
  470.  
  471. String1 and String2 must be a single group of characters, containing no
  472. separators.  The comparison is case sensitive.  The /C switch makes the
  473. comparison case insensitive.
  474.  
  475. This function was adapted from the BATCHMAN utility written by Michael J.
  476. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  477.  
  478.  
  479. ══════════════════  ComSwap  . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  480.  
  481. Swap the serial base port addresses for the two serial ports specified.
  482.  
  483. Command line format:
  484.  
  485.       ComSwap a b
  486.  
  487. where a and b are the numbers of the serial ports to be swapped.  Valid
  488. numbers are 1, 2, 3 and 4.  An error message is given if one of the ports is
  489. missing or invalid.
  490.  
  491. ComSwap switches the two ports as far as DOS is concerned.  This is useful if
  492. you need to shift the port addresses around prior to loading software device
  493. drivers.  This function may not have any effect for programs that use hard-
  494. coded port addresses.  This function does not shift hardware IRQ values.  The
  495. contents of the port addresses are not checked during the swap.
  496.  
  497. Example command line:
  498.  
  499.       ComSwap 4 2
  500.  
  501. This function was written by the author.
  502.  
  503.  
  504. ══════════════════  CoProc . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  505.  
  506. Determine the Intel CoProcessor installed.
  507.  
  508. Command line format:
  509.  
  510.       CoProc
  511.  
  512. Exit ErrorLevels:
  513.  
  514.       0 = No coprocessor installed
  515.       1 = 8087
  516.       2 = 80287
  517.       3 = 80387DX or 80387SX
  518.       4 = 80486DX or 80487SX
  519.  
  520. Use the CPU function to determine which processor is present.
  521.  
  522. This function was adapted from the CPUID.ASM program downloaded from
  523. CompuServe's CIS:INTELFORUM Library 4 (Math/CPU Processors) as CPUID.ZIP.
  524.  
  525.  
  526. ══════════════════  CPU  . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  527.  
  528. Determine the Intel Microprocessor installed.
  529.  
  530. Command line format:
  531.  
  532.       CPU
  533.  
  534. Exit ErrorLevels:
  535.  
  536.       0 = 8086/8088
  537.       1 = 80286
  538.       2 = 80386DX or 80386SX
  539.       3 = 80486SX
  540.       4 = 80486DX or 80487SX
  541.  
  542. This routine uses the Intel recommended technique for properly determining
  543. what type of CPU is installed in the system on which it is run.  The
  544. identification code will determine which Intel microprocessor and Intel Math
  545. CoProcessor (if any) is installed in the system.  If an 486 microprocessor has
  546. been recognized, the routine will determine if the CPU has a floating point
  547. unit (486 DX CPU, 487 SX MCP) or not (486 SX CPU).
  548.  
  549. Use the CoProc function to determine which math coprocessor is present.
  550.  
  551. This function was adapted from the CPUID.ASM program downloaded from
  552. CompuServe's CIS:INTELFORUM Library 4 (Math/CPU Processors) as CPUID.ZIP.
  553.  
  554.  
  555. ══════════════════  Cursor . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  556.  
  557. Hide, restore and set the size of the text mode screen cursor.
  558.  
  559. Command line format:
  560.  
  561.       Cursor SubCommandName
  562.             or
  563.       Cursor a b
  564.  
  565. where a and b are decimal numbers of the start and stop screen scan lines for
  566. the cursor.  The following are valid SubCommandNames: Default, Hide, Restore. 
  567. Each SubCommandName may be abbreviated to its first letter.  If the routine
  568. fails, error messages are displayed and the cursor size is not changed.
  569.  
  570. The Hide option works by setting the "invisible" bit code using Interrupt 10H
  571. Function 1.  The Restore option works by setting the "normal" bit code.  Some
  572. programs may modify this on their own.  There are known bugs in these
  573. functions in some EGA BIOS 43 line modes.
  574.  
  575. The Default option returns the cursor to the default values given below.
  576.  
  577. The start and stop scan lines are numbered with line 1 at the bottom and
  578. increasing towards the top.  Using this convention, the following cursor
  579. values apply:
  580.  
  581.                           │ 25 line │ 43/50 line │
  582.                   Adapter │ Default │  Default   │ Maximum
  583.                   ────────┼─────────┼────────────┼────────
  584.                   CGA     │   1 2   │     ---    │     8
  585.                   EGA/MDA │   2 3   │     2 2    │    14
  586.                   VGA+    │   2 3   │     2 2    │    16
  587.  
  588. This numbering scheme is a little more consistent than what the BIOS expects
  589. and lets the program calculate the values required by the BIOS.  If a number
  590. greater than the maximum number of scan lines is entered, it is truncated to
  591. the maximum.
  592.  
  593. Note that after a mode reset (via EGA25, EGA43, VGA25, VGA43 or VGA50) the
  594. cursor will be returned to its default size by the BIOS.  You will need to
  595. issue the appropriate command to return it to its desired state.  This
  596. function may not be compatible with UltraVision (unable to test).
  597.  
  598. Video adapter BIOS' implement the cursor functions differently.  You may not
  599. get the results you expect when you specify scan lines, depending on your
  600. adapter.  Keep trying until you end up with a shape you like.
  601.  
  602. Example command lines:
  603.  
  604.       Cursor Hide
  605.       Cursor 2 2
  606.  
  607. This function was written by the author.
  608.  
  609.  
  610. ══════════════════  Dates and Times  . . . . . . . . . . . . . . . . . [BATCH]
  611.  
  612. Determine the return value for the appropriate function.
  613.  
  614. Command line format consists of only the CommandName.  Valid CommandNames and
  615. the range of their return ErrorLevels are:
  616.  
  617.       WeekDay  . . . . . 0-6
  618.       Day  . . . . . . . 1-31
  619.       Month  . . . . . . 1-12
  620.       Year . . . . . . . 0-119
  621.       FullYear . . . . . 0-99
  622.       Hour . . . . . . . 0-23
  623.       Minute . . . . . . 0-59
  624.       Second . . . . . . 0-59
  625.       AM . . . . . . . . 0-1
  626.       PM . . . . . . . . 0-1
  627.  
  628. For WeekDay, an ErrorLevel of 0 corresponds to Sunday.  For Year, the
  629. ErrorLevel corresponds to the number of years since 1980.  FullYear gives the
  630. last two digits of the current year.  For AM and PM, an ErrorLevel of 1 is
  631. True, 0 is False.
  632.  
  633. These functions were adapted from the BATCHMAN utility written by Michael J.
  634. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  635.  
  636.  
  637. ══════════════════  DESQview . . . . . . . . . . . . . . . . . . . . . [BATCH]
  638.  
  639. Determine if Quarterdeck's DESQview is running.
  640.  
  641. Command line format:
  642.  
  643.       DESQview
  644.  
  645. Exit ErrorLevels:
  646.  
  647.       0    = DESQview is not running
  648.       Else = DESQview version [(32 * major) + minor]
  649.  
  650. Version 1.x will be identified as version 1.0.
  651.  
  652. This function was written by the author.
  653.  
  654.  
  655. ══════════════════  DirExist . . . . . . . . . . . . . . . . . . . . . [BATCH]
  656.  
  657. Determine if the requested directory exists on disk.
  658.  
  659. Command line format:
  660.  
  661.       DirExist [d:][/path]DirectoryName
  662.  
  663. Exit ErrorLevels:
  664.  
  665.       0 = Directory does not exist
  666.       1 = Directory exists
  667.  
  668. This function was adapted from the BATCHMAN utility written by Michael J.
  669. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  670.  
  671.  
  672. ══════════════════  Display  . . . . . . . . . . . . . . . . . . . . . [BATCH]
  673.  
  674. Determine the display combination code.
  675.  
  676. Command line format:
  677.  
  678.       Display
  679.  
  680. Exit ErrorLevels:
  681.  
  682.        1 = MDA
  683.        2 = CGA
  684.        4 = EGA color
  685.        5 = EGA mono
  686.        6 = PGS
  687.        7 = VGA mono
  688.        8 = VGA color
  689.       11 = MCGA mono
  690.       12 = MCGA color
  691.  
  692. This function was adapted from the BATCHMAN utility written by Michael J.
  693. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  694.  
  695.  
  696. ══════════════════  DOSversion . . . . . . . . . . . . . . . . . . . . [BATCH]
  697.  
  698. Determine the DOS version.
  699.  
  700. Command line format consists of only the CommandName.  Valid CommandNames are:
  701.  
  702.       DOSmajor
  703.       DOSminor
  704.       DOSversion
  705.  
  706. For DOS minor, the return ErrorLevel is 10 for DOS 3.10, 31 for DOS 3.31, etc. 
  707. For DOSversion, the return ErrorLevel is equal to 32*DOSmajor+DOSminor.  Note
  708. that DOS 4.01 reports itself as 4.00.
  709.  
  710. These functions were adapted from the BATCHMAN utility written by Michael J.
  711. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  712.  
  713.  
  714. ══════════════════  Drive  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  715.  
  716. Determine the current default drive.
  717.  
  718. Command line format:
  719.  
  720.       Drive [/A]
  721.  
  722. Exit ErrorLevels:
  723.  
  724.       1 = A:, 2 = B:, etc.
  725.  
  726. The /A switch causes an ASCII drive designator to be written to StdOut.  If C:
  727. is the current drive, the function will write "C:" to StdOut and exit with an
  728. ErrorLevel of 3.
  729.  
  730. This function was written by the author.
  731.  
  732.  
  733. ══════════════════  DriveExist . . . . . . . . . . . . . . . . . . . . [BATCH]
  734.  
  735. Determine if the requested drive letter is a valid DOS drive.
  736.  
  737. Command line format:
  738.  
  739.       DriveExist d
  740.  
  741. Exit ErrorLevels:
  742.  
  743.       0 = Invalid
  744.       1 = Valid
  745.  
  746. where d corresponds to the drive to be tested.
  747.  
  748. This function was adapted from the BATCHMAN utility written by Michael J.
  749. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  750.  
  751.  
  752. ══════════════════  DriveReady . . . . . . . . . . . . . . . . . . . . [BATCH]
  753.  
  754. Determine if a drive is ready for access.
  755.  
  756. Command line format:
  757.  
  758.       DriveReady d
  759.  
  760. Exit ErrorLevels:
  761.  
  762.       0 = Drive not ready
  763.       1 = Drive ready
  764.  
  765. where d corresponds to any single drive letter.  The DriveExist function is
  766. called first.  The function then installs a replacement DOS Critical Error
  767. Handler to trap the resultant error if the drive is not ready when Interrupt
  768. 21H Function 1CH (Get Allocation Information for Specific Drive) is executed.
  769.  
  770. This function was adapted from a debug script in a message in the CompuServe
  771. ZiffNet ZNT:PCCONTAC Forum Section 6 (HELP) in late September 1992.  The
  772. original source seemed to be a script written by Jeff Prosise [CompuServe:
  773. 72241,44] published in an issue of PC Contact.
  774.  
  775.  
  776. ══════════════════  DriveSize  . . . . . . . . . . . . . . . . . . . . [BATCH]
  777.  
  778. Determine the size of the specified or default drive.
  779.  
  780. Command line format:
  781.  
  782.       DriveSize [/Dn] [d]
  783.  
  784. Exit ErrorLevels:
  785.  
  786.       0     = Invalid drive error
  787.       1-255 = Blocks of space on the drive
  788.  
  789. where d corresponds to the drive desired.  If the drive is omitted, the
  790. default drive is used.  The function returns the number of full blocks on the
  791. drive.  Partial blocks are ignored.  The default block size is 100 kilobytes. 
  792. A different block size may be specified with the /Dn switch.  The /Dn switch n
  793. value for this command is measured in kilobytes.  If more than 255 blocks are
  794. on the drive, the returned ErrorLevel will be 255.
  795.  
  796. This function was written by the author.
  797.  
  798.  
  799. ══════════════════  DriveSpace . . . . . . . . . . . . . . . . . . . . [BATCH]
  800.  
  801. Determine the amount of free disk space on the specified or default drive.
  802.  
  803. Command line format:
  804.  
  805.       DriveSpace [/Dn] [d]
  806.  
  807. Exit ErrorLevels:
  808.  
  809.       0     = No blocks available or invalid drive error
  810.       1-255 = Blocks of space available
  811.  
  812. where d corresponds to the drive desired.  If the drive is omitted, the
  813. default drive is used.  The function returns the number of full blocks
  814. available.  Partial blocks are ignored.  The default block size is 100
  815. kilobytes.  A different block size may be specified with the /Dn switch.  The
  816. /Dn switch n value for this command is measured in kilobytes.  If more than
  817. 255 blocks are available, the returned ErrorLevel will be 255.
  818.  
  819. This function was written by the author.
  820.  
  821.  
  822. ══════════════════  Echo . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  823.  
  824. Send a comment line to the screen.
  825.  
  826. Command line format:
  827.  
  828.       Echo [/C] [/N] [Text]
  829.  
  830. The /C switch is used to output a carriage return only at the end of the Text,
  831. returning the cursor to the first column for overwriting the previous output. 
  832. The /N switch is used to eliminate the final carriage return/line feed,
  833. leaving the cursor at the end of the String just displayed.  For batch file
  834. execution, the format characters described below are not required.  Use Cecho
  835. to output text in a specific color.
  836.  
  837. Since DOS capitalizes everything in CONFIG.SYS during its parsing scan, a
  838. carat (^) is used as the default character to toggle between upper and lower
  839. case for the displayed string.  If a carat is desired on the displayed line,
  840. two carats (^^) should be used on the input line.  Used without text, Echo
  841. outputs a carriage return/line feed sequence.
  842.  
  843. A tilde (~) is the default character for insertion of a carriage return/line
  844. feed sequence in the displayed line.  If a tilde is desired on the displayed
  845. line, two tildes (~~) should be used on the input line.
  846.  
  847. If the first character of Text is a double quote, the displayed Text starts at
  848. the first character following the double quote.  This allows for leading
  849. spaces and tabs.  If the first character of Text is not a double quote, the
  850. displayed Text starts at the first non-separator character following the
  851. CommandName.  All leading spaces are removed.
  852.  
  853. Example command lines:
  854.  
  855.       Echo       S^tart ^DEVICE ^section...~
  856.       Echo "     S^tart ^DEVICE ^section...~
  857.  
  858. The first command line would display "Start DEVICE section..." with two
  859. trailing carriage return/line feeds.  The second command line would display
  860. "     Start DEVICE section..." with two trailing carriage return/line feeds.
  861.  
  862. This function was adapted and expanded from the device driver COMMENT.SYS
  863. written on 19 May 1985 and uploaded as COMENT.ARC to CompuServe CIS:IBMSYS
  864. Library 1 (DOS/DOS Utils [S]) on 21 December 1990 by Skip Gilbrech
  865. [CompuServe: 71445,534].
  866.  
  867.  
  868. ══════════════════  EchoPause  . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  869.  
  870. Suspend execution after printing a prompt message on the screen that is
  871. specified on the command line.
  872.  
  873. Command line format:
  874.  
  875.       EchoPause [/C] [/N] [Text]
  876.  
  877. Pressing any key resumes execution.  The /C and /N switches are the same as
  878. the Echo command.  The use of the Text string starting double quote is also
  879. the same.  For CONFIG.SYS execution, command line Text should be formatted as
  880. in the Echo command.  Use KeyPause for optional pausing, Pause for a standard
  881. pause message or WaitFor for timed pausing.
  882.  
  883. This function was written by the author based on the Echo and Pause commands.
  884.  
  885.  
  886. ══════════════════  EGA25  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  887.  
  888. Set a 25 line color EGA screen.
  889.  
  890. Command line format:
  891.  
  892.       EGA25 [/C]
  893.  
  894. Performs a mode 3 reset of the display adapter using Interrupt 10H Function 0. 
  895. This works on EGA in a display independent way.  The /C switch clears the
  896. screen after switching modes, if ANSI is installed, to set the screen color.
  897.  
  898. This function was written by the author.
  899.  
  900.  
  901. ══════════════════  EGA43  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  902.  
  903. Set a 43 line EGA screen.
  904.  
  905. Command line format:
  906.  
  907.       EGA43 [/C]
  908.  
  909. Forces the use of the display adapter's internal 8x8 font.  Interrupt 10H
  910. Function 11H Subfunction 12H performs an adapter mode reset when it executes. 
  911. This works on EGA in a display independent way.  The /C switch clears the
  912. screen after switching modes, if ANSI is installed, to set the screen color.
  913.  
  914. This function was written by the author.
  915.  
  916.  
  917. ══════════════════  EMSversion . . . . . . . . . . . . . . . . . . . . [BATCH]
  918.  
  919. Determine the EMS driver version if installed.
  920.  
  921. Command line format:
  922.  
  923.       EMSversion
  924.  
  925. Exit ErrorLevels:
  926.  
  927.       0    = EMS driver is not installed or driver error
  928.       Else = EMS version [(16 * EMSmajor) + EMSminor]
  929.  
  930. This function was written by the author.
  931.  
  932.  
  933. ══════════════════  Env  . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  934.  
  935. Determine size and use of the DOS master environment.
  936.  
  937. Command line format:
  938.  
  939.       Env SubCommandName [/Dn]
  940.  
  941. NOTE:  This function uses information that is undocumented.  The function uses
  942. verifications to try to ensure accuracy, but the data structures examined may
  943. change in future DOS versions.
  944.  
  945. This function returns information about the DOS master environment that is
  946. created through the /E switch on the SHELL line in CONFIG.SYS.  All
  947. information is returned via ErrorLevel.  The following are valid
  948. SubCommandNames:  Total, Used, Free, Strings.  Each SubCommandName may be
  949. abbreviated to its first letter.  The default block size is 16 bytes.  A
  950. different block size may be specified with the /Dn switch.  The /Dn switch n
  951. value for this command is measured in bytes.
  952.  
  953. The Total option reports the number of blocks of space in the environment. 
  954. Because of the way DOS allocates memory, the size in bytes will always be a
  955. multiple of 16.
  956.  
  957. The Used option reports the total number of blocks of space currently in use. 
  958. This will be dependent on the number of environment variables created with the
  959. SET command.  This value includes the null bytes that terminate each string.
  960.  
  961. The Free option reports the number of blocks of space available for use.  This
  962. is equal to Total minus Used.
  963.  
  964. The Strings option reports the number of strings currently defined in the
  965. environment.
  966.  
  967. This function was written by the author.
  968.  
  969.  
  970. ══════════════════  FileDTC  . . . . . . . . . . . . . . . . . . . . . [BATCH]
  971.  
  972. Compare the date and time stamps of two files.
  973.  
  974. Command line format:
  975.  
  976.       FileDTC [d:][/path]File1 [d:][/path]File2
  977.  
  978. Exit ErrorLevels:
  979.  
  980.       0 = Command line error
  981.       1 = File1 is older than File2
  982.       2 = (Date1 = Date2) and (Time1 = Time2)
  983.       3 = File2 DOS error on opening
  984.       4 = File1 DOS error on opening
  985.       5 = (Date1 = Date2) but Time2 is older than Time1
  986.       6 = Date2 is older than Date1
  987.  
  988. FileDTC (File Date Time Compare) compares the date and time stamps of two
  989. files.  FileDTC does not accept wildcards in the file names.  An ErrorLevel of
  990. 4 or higher indicates that File2 either does not exist or is older than File1. 
  991. FileDTC can be used as follows:
  992.  
  993.       IfCopy.Bat
  994.       ───────────────────────────────────────────────
  995.             @Echo Off
  996.             If [%1]==[...] GoTo 1
  997.             If [%2]==[] GoTo End
  998.             For %%A In (%1) Do Call IfCopy ... %%A %2
  999.             GoTo End
  1000.       :1
  1001.             CFG FileDTC %2 %3%2
  1002.             If ErrorLevel 4 GoTo End
  1003.             Copy %2 %3%2 >Nul
  1004.       :End
  1005.  
  1006. Issuing "IfCopy *.* A:" will copy all files from the current directory to the
  1007. A: drive that are older than those on the A: drive or do not exist.  This is a
  1008. little more discriminating than Xcopy /d since it also compares times.
  1009.  
  1010. This function was adapted from the DTC.ASM program written by Mike Spencer
  1011. [CompuServe: 74160,3116] and downloaded from CompuServe's CIS:IBMPRO Library 1
  1012. (General [P]) as DTC.ZIP.
  1013.  
  1014.  
  1015. ══════════════════  FileExist  . . . . . . . . . . . . . . . . . . . . [BATCH]
  1016.  
  1017. Determine if the specified file exists.
  1018.  
  1019. Command line format:
  1020.  
  1021.       FileExist [d:][/path]FileName
  1022.  
  1023. Exit ErrorLevels:
  1024.  
  1025.       0 = File does not exist
  1026.       1 = File exists
  1027.  
  1028. This function is identical to the DOS "IF EXIST" batch file command.
  1029.  
  1030. This function was written by the author.
  1031.  
  1032.  
  1033. ══════════════════  Files  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1034.  
  1035. Determine size and use of the DOS System File Table.
  1036.  
  1037. Command line format:
  1038.  
  1039.       Files SubCommandName
  1040.  
  1041. NOTE:  This function uses information that is undocumented.  It has been
  1042. verified to work accurately for DOS versions 3.0 through 5.0.  The function
  1043. uses redundant verifications to try to ensure accuracy, but the data
  1044. structures examined may change in future DOS versions.
  1045.  
  1046. This function returns information about the DOS System File Table (SFT) that
  1047. is created through the FILES command in CONFIG.SYS.  All information is
  1048. returned via ErrorLevel.  The following are valid SubCommandNames:  Total,
  1049. Used, Free, Orphan, Previous, Margin, Blocks.  Each SubCommandName may be
  1050. abbreviated to its first letter.  This function requires DOS 3.0+.
  1051.  
  1052. The Total option reports all entries available in the SFT, including any that
  1053. may have been created by later programs such as Qemm's FILES or PC Magazine's
  1054. UMBFILES.
  1055.  
  1056. The Used option reports the number of entries currently in use.  Typically,
  1057. this will be 3 unless files have been orphaned.
  1058.  
  1059. The Free option reports the number of entries available for use.  This is
  1060. equal to Total minus Used.
  1061.  
  1062. The Orphan option reports the number of entries that are orphaned, typically
  1063. by redirecting the output of a resident program to the NUL device during
  1064. installation.  This number is a subset of the Used files.
  1065.  
  1066. The Previous option reports the maximum number of files that had previously
  1067. been open at any one time since the computer was last booted.  Since DOS
  1068. reuses entries after they have been closed, this value may be looked at as the
  1069. "high water mark" of SFT use.
  1070.  
  1071. The Margin option reports the minimum margin that existed at the above "high
  1072. water mark" of previous use.  This is equal to Total minus Previous.  This
  1073. value is essentially how close the system has gotten to a DOS file error due
  1074. to no more file handles being available.
  1075.  
  1076. The Blocks option reports the number of blocks the SFT is divided into.  A
  1077. large number of blocks has little effect on performance, but may use up more
  1078. memory.
  1079.  
  1080. UNABASHED PLUG:  If you are interested in actually seeing the contents of the
  1081. SFT as well as the major DOS data structures, download my FreeFile utility
  1082. from the same library that you got CFG from.  Look for FREEFI.ZIP.  This
  1083. function is essentially a stripped down version of FreeFile.  FreeFile will
  1084. also free orphaned file handles, returning them to DOS for reuse.  Very
  1085. educational and useful.
  1086.  
  1087. This function was written by the author.
  1088.  
  1089.  
  1090. ══════════════════  FileSize . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1091.  
  1092. Determine the size of the specified file.
  1093.  
  1094. Command line format:
  1095.  
  1096.       FileSize [/Dn] [d:][/path]FileName
  1097.  
  1098. Exit ErrorLevels:
  1099.  
  1100.       0     = File error or file size less than one block
  1101.       1-255 = Blocks of the file
  1102.  
  1103. The function returns the number of full blocks in the file.  Partial blocks
  1104. are ignored.  The default block size is 1024 bytes (1 kilobyte).  A different
  1105. block size may be specified with the /Dn switch.  The /Dn switch n value for
  1106. this command is measured in bytes.  If more than 255 blocks are on the drive,
  1107. the returned ErrorLevel will be 255.
  1108.  
  1109. This function was written by the author.
  1110.  
  1111.  
  1112. ══════════════════  FileText . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1113.  
  1114. Determine if the Text string exists in the specified file.
  1115.  
  1116. Command line format:
  1117.  
  1118.       FileText [d:][/path]FileName "String"
  1119.  
  1120. Exit ErrorLevels:
  1121.  
  1122.       0 = String not present
  1123.       1 = String present
  1124.  
  1125. This function performs a case sensitive search of the designated file for the
  1126. text string.
  1127.  
  1128. This function was written by the author.
  1129.  
  1130.  
  1131. ══════════════════  GetKey . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1132.  
  1133. Get any keyboard input or limit the allowed keys to those specified on the
  1134. command line.
  1135.  
  1136. Command line format:
  1137.  
  1138.       GetKey [/F] ["String"] [[F]n]
  1139.  
  1140. Exit ErrorLevels:
  1141.  
  1142.       With list    = Position of key in list (1, 2, 3, etc.)
  1143.       Without list = Scan code of key pressed
  1144.       255          = Ctrl-Break/Ctrl-C pressed
  1145.  
  1146. where String is a series of characters representing valid keyboard input
  1147. (String must be enclosed in either single or double quotes), and n represents
  1148. function key numbers (which may be preceded by an "F").  The /F switch causes
  1149. GetKey to flush the keyboard buffer prior to execution.
  1150.  
  1151. Used without options, GetKey returns the scan code of the key that was
  1152. pressed.  GetKey's optional key list provides additional functionality.  If
  1153. you supply the optional "String" or Fn argument to GetKey, Cfg will wait
  1154. either until one of those keys listed has been pressed or until you break out
  1155. of the command with Ctrl-Break or Ctrl-C.  All other keypresses are ignored. 
  1156. GetKey is not case sensitive, so if either "Y" or "y" is pressed, the
  1157. ErrorLevel will be the same.
  1158.  
  1159. If you want the single quote included as a valid keypress, enclose it in
  1160. double quotes and vice versa for double quotes.
  1161.  
  1162. You can include the function keys (F1 through F12) in the GetKey list by
  1163. listing the key numbers without quotes.  They may or may not be further
  1164. identified with a leading "F".  Multiple function keys must be separated.  A
  1165. special case is F0 which represents the Return or Enter key.
  1166.  
  1167. Example command lines:
  1168.  
  1169.       GetKey "yn" F1 F2 F0
  1170.       GetKey "yn" 1 2 0
  1171.  
  1172. If F1 is now pressed, the returned ErrorLevel will be 3, since F1 is the third
  1173. entry in the list.  Both examples yield the same result.
  1174.  
  1175. Used without arguments, GetKey can also be used with the Shift command to
  1176. detect Alt- or Ctrl- key combinations.  The scan code for the "Q" key is 16. 
  1177. To check for an Alt-Q keypress, you would use the following batch file:
  1178.  
  1179.       @Echo Off
  1180.       :GetKey
  1181.       Cfg GetKey
  1182.       If Not ErrorLevel 16 GoTo GetKey
  1183.       Cfg Shift-OR Alt
  1184.       If Not ErrorLevel 1 GoTo GetKey
  1185.       Echo Alt-Q was pressed.
  1186.  
  1187. This function was adapted and expanded from the BATCHMAN utility written by
  1188. Michael J. Mefford and published in the 30 January 1990 Utilities section of
  1189. PC Magazine.
  1190.  
  1191.  
  1192. ══════════════════  IACAfill . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  1193.  
  1194. Write up to 16 bytes to the Inter-Application Communication Area for
  1195. communication between CONFIG.SYS and AUTOEXEC.BAT.
  1196.  
  1197. Command line format:
  1198.  
  1199.       IACAfill String
  1200.  
  1201. There are 16 bytes at address 0040:00F0 called the Inter-Application
  1202. Communications Area (IACA).  These bytes can be modified by any program, but
  1203. few applications actually use them since they are subject to change by any
  1204. program and do not provide much storage.
  1205.  
  1206. The IACAfill command moves the command line String to the IACA.  The String
  1207. must be a single word.  A space or carriage return will end the transfer.
  1208.  
  1209. The advantage of IACAfill is that it allows communication between CONFIG.SYS
  1210. and AUTOEXEC.BAT.  When managing multiple configurations, this will allow you
  1211. to set a variable in each separate CONFIG.SYS file for appropriate action in
  1212. AUTOEXEC.BAT.  Use the IACAread function to read the string from the IACA.
  1213.  
  1214. Example command line:
  1215.  
  1216.       IACAfill 386Max
  1217.  
  1218. This will store "386MAX" in the IACA.
  1219.  
  1220. This function is based on the IACAFILL.SYS driver from the IACATALK.ZIP file
  1221. written on by Robert W. Babcock [Internet: peprbv@cfaamp.harvard.edu or
  1222. babcock@cfa.harvard.edu] [BIX: rbabcock] [BITNET: babcock@cfa].  Sande Nissen
  1223. provided the IACATALK.ZIP file.
  1224.  
  1225.  
  1226. ══════════════════  IACAread . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1227.  
  1228. Read up to 16 bytes from the Inter-Application Communication Area and writes
  1229. them to DOS StdOut.
  1230.  
  1231. Command line format:
  1232.  
  1233.       IACAread [/F] [String]
  1234.  
  1235. where String may be any combination of characters that are desired to precede
  1236. the string read from the IACA.  The /F switch causes the old data to be
  1237. flushed from the IACA.
  1238.  
  1239. IACAread functions by checking the IACA for a string.  It then scans its
  1240. command line and writes anything it finds there to StdOut.  It then writes the
  1241. IACA to StdOut and terminates.  Writing to StdOut allows you to use DOS
  1242. command line redirection to place the temporary batch file where you want.  A
  1243. RAM disk is ideal.  You can easily write your own program to handle IACAread's
  1244. output since no error is generated for lack of command line input to IACAread. 
  1245. IACAread will simply write the IACA to StdOut.  The IACA is not cleared by
  1246. IACAread.
  1247.  
  1248. The original IACAread program included with the IACATALK.ZIP file was written
  1249. in C (I dislike C) and manipulated the DOS master environment directly.  While
  1250. I have done quite a bit of programming using undocumented DOS, I did not want
  1251. to want to manipulate the master environment directly.  If you have the
  1252. original C version of IACAread, it will operate the same as before with the
  1253. CFG IACAfill command replacing the IACAFILL.SYS device driver.
  1254.  
  1255. Example command lines:
  1256.  
  1257.       CFG IACAread @SET EnvName=>%TEMP%IACA.BAT
  1258.       CALL %TEMP%IACA.BAT
  1259.       DEL %TEMP%IACA.BAT
  1260.  
  1261. where EnvName is the name of the environment variable to be set.  This will
  1262. write "@SET EnvName=String" to DOS StdOut.  An error message will be displayed
  1263. if there is no string in the IACA with an exit ErrorLevel of 1.  An ErrorLevel
  1264. of 0 indicates proper function.
  1265.  
  1266. If the SET command in the example IACA.BAT file does not work, you should have
  1267. received an "Out of environment space" error from DOS during execution.  Check
  1268. the available environment space using the Env command.  Environment space may
  1269. be increased by placing a larger number after the /E: switch on the CONFIG.SYS
  1270. SHELL line or adding such a line with a /E: switch to the file if none exists
  1271. and rebooting.  See the sample CONFIG.SYS file below.
  1272.  
  1273. This function was written by the author.
  1274.  
  1275.  
  1276. ══════════════════  Intense  . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1277.  
  1278. Enable intense background colors.
  1279.  
  1280. Command line format:
  1281.  
  1282.       Intense
  1283.  
  1284. Calls Interrupt 10H Function 10H Subfunction 3 to enable intense background
  1285. colors on EGA and above.  Any blinking characters will stop blinking and have
  1286. intense backgrounds.
  1287.  
  1288. This function was written by the author.
  1289.  
  1290.  
  1291. ══════════════════  IsVol  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1292.  
  1293. Determine if a particular disk volume exists on the named drive.
  1294.  
  1295. Command line format:
  1296.  
  1297.       IsVol [d:]VolumeName
  1298.  
  1299. Exit ErrorLevels:
  1300.  
  1301.       0 = Volume does not exist
  1302.       1 = Volume exists
  1303.  
  1304. This function was adapted from the BATCHMAN utility written by Michael J.
  1305. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  1306.  
  1307.  
  1308. ══════════════════  KeyFlush . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1309.  
  1310. Flush any waiting keys from the keyboard buffer.
  1311.  
  1312. Command line format:
  1313.  
  1314.       KeyFlush
  1315.  
  1316. This function checks for available keys and repeatedly reads the keyboard
  1317. until they are all cleared from the keyboard buffer.
  1318.  
  1319. This function was written by the author.
  1320.  
  1321.  
  1322. ══════════════════  KeyPause . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1323.  
  1324. Suspend execution if any of the Shift, Alt or Ctrl keys are pressed.
  1325.  
  1326. Command line format:
  1327.  
  1328.       KeyPause
  1329.  
  1330. Exit ErrorLevels:
  1331.  
  1332.       0 = Pause not executed
  1333.       1 = Pause executed
  1334.  
  1335. One of the listed keys must be held down before program execution.  Execution
  1336. resumes once the key is released.  Use EchoPause to display a customized pause
  1337. message, Pause for a standard pause message or WaitFor for timed pausing.
  1338.  
  1339. This function was adapted from a debug script in a message in the CompuServe
  1340. ZiffNet ZNT:TIPS Forum Section 4 (User-to-User) from Neil Rubenking
  1341. [CompuServe: 72241,50] on 8 July 1992.  The script was also published in the
  1342. 27 October 1992 User-to-User section of PC Magazine.
  1343.  
  1344.  
  1345. ══════════════════  KeyPress . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1346.  
  1347. Determine if there is a key waiting in the keyboard buffer.
  1348.  
  1349. Command line format:
  1350.  
  1351.       KeyPress
  1352.  
  1353. Exit ErrorLevels:
  1354.  
  1355.       0 = No keys available
  1356.       1 = Keys are available
  1357.  
  1358. This function was written by the author.
  1359.  
  1360.  
  1361. ══════════════════  Locate . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1362.  
  1363. Set cursor position on active video page.
  1364.  
  1365. Command line format:
  1366.  
  1367.       Locate r c
  1368.  
  1369. Exit ErrorLevels:
  1370.  
  1371.       0   = No errors
  1372.       255 = Input parsing error
  1373.  
  1374. where r corresponds to the row number and c corresponds to the column number. 
  1375. The top row is row 1.  The furthest left column is column 1.  Decimal numbers
  1376. are required.
  1377.  
  1378. This function was adapted from the BATCHMAN utility written by Michael J.
  1379. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  1380.  
  1381.  
  1382. ══════════════════  LptHide  . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  1383.  
  1384. Hide and restore the printer port base addresses.
  1385.  
  1386. Command line format:
  1387.  
  1388.       LptHide SubCommandName
  1389.  
  1390. The following are valid SubCommandNames: Hide, Restore.  Each SubCommandName
  1391. may be abbreviated to its first letter.  Error messages are displayed if the
  1392. routine fails.  (See the error message section below.)
  1393.  
  1394. The specific program this was written for is the Iomega Bernoulli Box RCD.SYS
  1395. driver.  During RCD.SYS execution, it interrogates the printer ports to
  1396. determine if there are any parallel port Bernoulli Boxes installed. 
  1397. Unfortunately, some printers respond to this interrogation by printing the
  1398. interrogation sequence.
  1399.  
  1400. LptHide hides the printer port base addresses by copying them to another
  1401. location in memory when the Hide command is used.  On restoration with the
  1402. Restore command, LptHide verifies the signature and checksum stored with the
  1403. port addresses to ensure that they were not accidently over-written during
  1404. RCD.SYS execution.  LptHide then copies the base addresses back to their
  1405. normal location.
  1406.  
  1407. The default location for the hidden data is 7000:0000.  This is below the 512
  1408. Kb boundary in the event that the machine only has that much base memory
  1409. available, and high enough to keep it from being over-written during execution
  1410. of other device drivers while the data is hidden.
  1411.  
  1412. Example command lines:
  1413.  
  1414.       CFG.COM LptHide Hide
  1415.       RCD.SYS /M0
  1416.       CFG.COM LptHide Restore
  1417.  
  1418. This function was adapted and expanded from the device driver LPTHIDE.SYS
  1419. uploaded as LPTHID.SYS to CompuServe CIS:PCVENE Library 3 (Iomega Corp.) on 13
  1420. March 1992 by Ronald Routh [CompuServe: 75300,2511].
  1421.  
  1422.  
  1423. ══════════════════  LptSwap  . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1424.  
  1425. Swap the printer base port addresses for the two printer ports specified.
  1426.  
  1427. Command line format:
  1428.  
  1429.       LptSwap a b
  1430.  
  1431. where a and b are the numbers of the printer ports to be swapped.  Valid
  1432. numbers are 1, 2 and 3.  An error message will be given if one of the ports is
  1433. missing or invalid.
  1434.  
  1435. LptSwap switches the two ports as far as DOS is concerned.  This is useful if
  1436. you need to shift the printer ports around and are loading a software print
  1437. buffer as a device driver.  The contents of the port addresses are not checked
  1438. during the swap.
  1439.  
  1440. Example command line:
  1441.  
  1442.       LptSwap 1 3
  1443.  
  1444. This function was written by the author.
  1445.  
  1446.  
  1447. ══════════════════  Memory . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1448.  
  1449. Determine amount of memory available.
  1450.  
  1451. Command line format:
  1452.  
  1453.       Memory SubCommandName k [/R] [/Dn]
  1454.  
  1455. Exit ErrorLevels:
  1456.  
  1457.       Without the /R switch
  1458.       ─────────────────────
  1459.       0   = Requested amount of memory is not available or format error
  1460.       1   = Requested amount of memory is available
  1461.  
  1462.       With the /R switch
  1463.       ──────────────────
  1464.       0     = Requested memory is not available or format error
  1465.       Other = Number of blocks of memory available
  1466.  
  1467. where k is the number of kilobytes of memory required.  Valid SubCommandNames
  1468. are: Base, Extended, Xpanded, Main.  Each SubCommandName may be abbreviated to
  1469. its first letter.  With the /R switch specified, a screen report is made and
  1470. the exit ErrorLevel is set to the number of full blocks of available memory. 
  1471. The /Dn switch n value for this command is measured in kilobytes.  The /Dn
  1472. switch has no meaning without the /R switch.  Without the /R switch, CFG scans
  1473. the command line for a decimal number after the SubCommandName.  A format
  1474. error is generated if a number is not found.  This number is compared to the
  1475. number of available kilobytes of the requested type of memory.  If available
  1476. memory is greater than or equal to that requested, an ErrorLevel of 1 is
  1477. returned.  If available memory is less than that requested, an ErrorLevel of 0
  1478. is returned.
  1479.  
  1480. For the "B" base memory option, CFG executes BIOS Interrupt 12H to get the
  1481. among of contiguous memory installed in the system.  For this option only, the
  1482. /R switch does not change the exit ErrorLevel.  It will always give the number
  1483. of blocks of base memory.  The default block size is 16 kilobytes.
  1484.  
  1485. For the "E" extended memory option, CFG checks the machine ID byte at
  1486. F000:FFFE for 286 or better machines.  CFG then executes Interrupt 15H
  1487. Function 88H to get the amount of available extended memory.  The default
  1488. block size is 64 kilobytes.
  1489.  
  1490. For the "X" expanded memory option, CFG checks for the existence of an
  1491. expanded memory driver.  CFG then executes Interrupt 67H Function 42H to get
  1492. the number of free expanded memory pages.  The pages are converted to
  1493. kilobytes for reporting.  The default block size is 64 kilobytes.
  1494.  
  1495. For the "M" main memory option, CFG shrinks its own program memory to zero
  1496. then attempts to allocate FFFFH paragraphs to generate a DOS error returning
  1497. the number of free paragraphs of memory.  This will be the amount of memory
  1498. available to a program run from the command line or a batch file.  The
  1499. paragraphs are converted to kilobytes for reporting.  The default block size
  1500. is 16 kilobytes.
  1501.  
  1502. If the screen report is not desired but the ErrorLevel is, redirect CFG's
  1503. output to the NUL device.
  1504.  
  1505. Example command lines:
  1506.  
  1507.       CFG Memory M 512              --- Test for 512 KB main memory
  1508.       CFG Memory Xpanded 2048       --- Text for 2 MB expanded memory
  1509.       CFG Memory Base /R/D64        --- Report base memory in 64 KB blocks
  1510.  
  1511. This function was adapted and expanded from the BATCHMAN utility written by
  1512. Michael J. Mefford and published in the 30 January 1990 Utilities section of
  1513. PC Magazine.
  1514.  
  1515.  
  1516. ══════════════════  Mono . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1517.  
  1518. Set a 25 line monochrome screen.
  1519.  
  1520. Command line format:
  1521.  
  1522.       Mono
  1523.  
  1524. Performs a mode 7 reset of the display adapter using Interrupt 10H Function 0. 
  1525. This works in a display independent way.  Use this function only if a
  1526. monochrome monitor is installed.
  1527.  
  1528. This function was written by the author.
  1529.  
  1530.  
  1531. ══════════════════  Page . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1532.  
  1533. Select the active video display page.
  1534.  
  1535. Command line format:
  1536.  
  1537.       Page [n]
  1538.  
  1539. where n corresponds to the desired video display page.  If n is omitted, no
  1540. page change occurs.  This function always returns an ErrorLevel corresponding
  1541. to the current display page.  For modes 0 and 1, pages 0-7 are valid.  For
  1542. modes 2 and 3, pages 0-3 are valid.  If anything else is specified on the
  1543. command line, no page change occurs.
  1544.  
  1545. Note that some programs write by default to page zero.
  1546.  
  1547. This function was written by the author.
  1548.  
  1549.  
  1550. ══════════════════  Pause  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1551.  
  1552. Suspend execution after printing a prompt message on the screen.
  1553.  
  1554. Command line format:
  1555.  
  1556.       Pause
  1557.  
  1558. Pressing any key resumes execution.  The standard prompt is "CFG 2.0 Pause -
  1559. Press any key to continue . . .".  Use EchoPause to display a customized pause
  1560. message, KeyPause for optional pausing or WaitFor for timed pausing.
  1561.  
  1562. This function was adapted from a Debug script for PAUSE.SYS written by Jeff
  1563. Prosise and published in the 30 June 1992 Tutor section of PC Magazine.
  1564.  
  1565.  
  1566. ══════════════════  Protected  . . . . . . . . . . . . . . . . . . . . [BATCH]
  1567.  
  1568. Determine if 80286+ processor is in protected mode.
  1569.  
  1570. Command line format:
  1571.  
  1572.       Protected
  1573.  
  1574. Exit ErrorLevels:
  1575.  
  1576.       0 = Real mode
  1577.       1 = Protected mode
  1578.  
  1579. Calls the CPU function then determines if the processor protected mode flag is
  1580. set for 80286+ processors.
  1581.  
  1582. This function was written by the author.
  1583.  
  1584.  
  1585. ══════════════════  PrtScr . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1586.  
  1587. Print the screen or controls print screen operation.
  1588.  
  1589. Command line format:
  1590.  
  1591.       PrtScr [/F] [+|-|?]
  1592.  
  1593. Exit ErrorLevels:
  1594.  
  1595.       0 = Disabled
  1596.       1 = Enabled
  1597.  
  1598. Prints the current screen using BIOS Interrupt 5.  A form feed is appended if
  1599. the /F switch is used.
  1600.  
  1601. If the optional arguments are present, no printer output is generated.  The +
  1602. and - arguments turn the BIOS function on and off by changing its status byte
  1603. in the BIOS data area.  The BIOS bases its action on receipt of an Interrupt 5
  1604. Print Screen on this status byte.  If the byte indicates that a print screen
  1605. is currently in progress, the BIOS aborts the new request.  This provides
  1606. control of Interrupt 5 without a memory resident program.  A status message is
  1607. provided for each change in state.  The ? argument reports the current print
  1608. screen interrupt status.
  1609.  
  1610. This function was written by the author.
  1611.  
  1612.  
  1613. ══════════════════  RamDrive . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1614.  
  1615. Detect if the specified drive is a ramdrive or search for one.
  1616.  
  1617. Command line format:
  1618.  
  1619.       RamDrive [/S] [/A] [d:]
  1620.  
  1621. Exit ErrorLevels:
  1622.  
  1623.       Without /S switch
  1624.       ─────────────────
  1625.       0 = Drive is not a ramdrive
  1626.       1 = Drive is a ramdrive
  1627.  
  1628.       With /S switch
  1629.       ──────────────
  1630.          0 = Ramdrive not found
  1631.       Else = Ramdrive found (A:=1, B:=2, etc.)
  1632.  
  1633. This command has several variations.  If d: is specified, that drive is
  1634. tested.  If d: is omitted, the default drive is tested.
  1635.  
  1636. If the /S switch is specified, the command searches for the first ramdrive it
  1637. can find.  If d: is specified with the /S switch, the search starts with that
  1638. drive and moves up the drive letter chain.  If d: is not specified, the search
  1639. starts with the D: drive.  The search stops when the first ramdrive is found
  1640. or the first nonexistent drive letter is encountered.  DriveExist is called to
  1641. determine if a drive exists.
  1642.  
  1643. The /A switch causes an ASCII drive specification to be written to DOS StdOut. 
  1644. This switch is functional only if the /S switch is specified.
  1645.  
  1646. Since there is no official way of detecting a ramdrive, this function makes
  1647. its determination by searching for three characteristic features:  The drive
  1648. is non-removable, has only one FAT copy and has a cluster size of one sector. 
  1649. If the first is true at least one of the last two are true, the drive is
  1650. considered to be a ramdrive.  The tests are not completely foolproof.  The
  1651. following are the ramdrives tested to date:
  1652.  
  1653.       YES:  Microsoft Vdisk
  1654.       NO:   Qualitas 386disk
  1655.  
  1656. This function was written by the author.
  1657.  
  1658.  
  1659. ══════════════════  Rem  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  1660.  
  1661. Indicate the use of descriptive comments in the CONFIG.SYS file.
  1662.  
  1663. Command line format:
  1664.  
  1665.       Rem [Text]
  1666.  
  1667. This allows the entry of remarks in CONFIG.SYS for all DOS versions without
  1668. generating errors.
  1669.  
  1670. REM is implemented in DOS Version 5.0, but is not available in earlier
  1671. versions.  For people who need to maintain standard machine configurations,
  1672. this can be an impediment to clear documentation.  While it slows CONFIG.SYS
  1673. execution slightly, this is the best that can be done (easily) for DOS prior
  1674. to version 5.0.
  1675.  
  1676. This function was written by the author based on a request by Sande Nissen
  1677. [Internet: snissen@carleton.edu] [CompuServe: 74716,3673].
  1678.  
  1679.  
  1680. ══════════════════  RenDir . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1681.  
  1682. Rename a directory.
  1683.  
  1684. Command line format:
  1685.  
  1686.       RenDir old new
  1687.  
  1688. Exit ErrorLevels:
  1689.  
  1690.       0   = No errors
  1691.       255 = DOS error or DOSmajor < 3
  1692.  
  1693. This function requires DOS 3.0+.  Include the complete path for both old and
  1694. new directory names.  The path is not required if the directory being renamed
  1695. is off the default directory.
  1696.  
  1697. This function was adapted from the BATCHMAN utility written by Michael J.
  1698. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  1699.  
  1700.  
  1701. ══════════════════  ROMdate  . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1702.  
  1703. Display the date of the ROM BIOS.
  1704.  
  1705. Command line format:
  1706.  
  1707.       ROMdate
  1708.  
  1709. The displayed date is the string of ASCII characters found at F000:FFF5 in
  1710. memory.  Not all BIOS may have the date at this location.
  1711.  
  1712. This function was adapted from the BATCHMAN utility written by Michael J.
  1713. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  1714.  
  1715.  
  1716. ══════════════════  ROMmodel . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1717.  
  1718. Display the model bytes of the ROM BIOS.
  1719.  
  1720. Command line format:
  1721.  
  1722.       ROMmodel
  1723.  
  1724. The displayed bytes are in hexadecimal.  If the system supports Interrupt 15H
  1725. Function C0H, then the model, submodel and BIOS revision bytes of the ROM
  1726. configuration table are displayed.  If the system does not support this call,
  1727. the machine model byte at F000:FFFE is displayed.  The exit ErrorLevel is
  1728. equal to the model byte.
  1729.  
  1730. This function was written by the author.
  1731.  
  1732.  
  1733. ══════════════════  Rows . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1734.  
  1735. Determine the number of displayed rows.
  1736.  
  1737. Command line format:
  1738.  
  1739.       Rows
  1740.  
  1741. The returned level is based on the value stored in the BIOS data area.
  1742.  
  1743. This function was written by the author.
  1744.  
  1745.  
  1746. ══════════════════  Share  . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1747.  
  1748. Determine if SHARE.EXE is installed.
  1749.  
  1750. Command line format:
  1751.  
  1752.       Share
  1753.  
  1754. Exit ErrorLevels:
  1755.  
  1756.         0 = Not installed, OK to install
  1757.         1 = Not installed, not OK to install
  1758.         2 = Installed
  1759.       255 = Invalid DOS version
  1760.  
  1761. The function executes Interrupt 2FH Function 10H Subfunction 0.  Note that if
  1762. DOS 4.01 SHARE was automatically loaded due to large disk volumes, file
  1763. sharing is in an inactive state until this call is made.  This function
  1764. requires DOS version 3.0 or higher.
  1765.  
  1766. This function was written by the author.
  1767.  
  1768.  
  1769. ══════════════════  Shift-AND  . . . . . . . . . . . . . . . . . . . . [BATCH]
  1770.  
  1771. Determine if desired shift keys are depressed.
  1772.  
  1773. Command line format:
  1774.  
  1775.       Shift-AND [Alt] [Ctrl] [Shift]
  1776.  
  1777. Exit ErrorLevels:
  1778.  
  1779.       0 = Some or none of the keys listed are depressed
  1780.       1 = All keys listed are depressed
  1781.  
  1782. The routine will work with either of the paired keys on the keyboard.  The
  1783. requested keys are considered to be AND, meaning all keys listed must be
  1784. depressed.  The arguments may be shortened to just the first letter, but must
  1785. always be separated by at least one space.  Use the Shift-OR function to do an
  1786. OR comparison of the shift keys.  Use the ShiftState function for identifying
  1787. individual shift keys.
  1788.  
  1789. This function was written by the author.
  1790.  
  1791.  
  1792. ══════════════════  ShiftLock  . . . . . . . . . . . . . . . . . . . . [BATCH]
  1793.  
  1794. Determine status of keyboard NumLock, CapsLock, ScrollLock and Insert.
  1795.  
  1796. Command line format:
  1797.  
  1798.       ShiftLock [SubCommandName]
  1799.  
  1800. Exit ErrorLevels:
  1801.  
  1802.       With SubCommandName
  1803.       ───────────────────
  1804.       0 = Lock state is inactive
  1805.       1 = Lock state is active
  1806.  
  1807.       Without SubCommandName
  1808.       ──────────────────────
  1809.       0 = No lock states are active
  1810.       1 = ScrollLock is active
  1811.       2 = NumLock is active
  1812.       4 = CapsLock is active
  1813.       8 = Insert is active
  1814.  
  1815. The following are valid SubCommandNames:  Caps, Insert, Num, Scroll.  Each
  1816. SubCommandName may be abbreviated to its first letter.
  1817.  
  1818. Issued without a SubCommandName or with a wrong one, the function returns the
  1819. ErrorLevels noted above.  These ErrorLevels are additive.  The ErrorLevel
  1820. returned can be in the range of 0 to 15.
  1821.  
  1822. This function was written by the author.
  1823.  
  1824.  
  1825. ══════════════════  Shift-OR . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1826.  
  1827. Determine if desired shift keys are depressed.
  1828.  
  1829. Command line format:
  1830.  
  1831.       Shift-OR [Alt] [Ctrl] [Shift]
  1832.  
  1833. Exit ErrorLevels:
  1834.  
  1835.       0 = None of the keys listed are depressed
  1836.       1 = At least one of the keys listed is depressed
  1837.  
  1838. The routine will work with either of the paired keys on the keyboard.  The
  1839. requested keys are considered to be OR, meaning at least one of the keys
  1840. listed must be depressed.  The arguments may be shortened to just the first
  1841. letter, but must always be separated by at least one space.  Use the Shift-AND
  1842. function to do an AND comparison of the shift keys.  Use the ShiftState
  1843. function for identifying individual shift keys.
  1844.  
  1845. This function was written by the author.
  1846.  
  1847.  
  1848. ══════════════════  ShiftState . . . . . . . . . . . . . . . . . . . . [BATCH]
  1849.  
  1850. Determine which shift keys are depressed.
  1851.  
  1852. Command line format:
  1853.  
  1854.       ShiftState
  1855.  
  1856. Exit ErrorLevels:
  1857.  
  1858.        0 = None of the shift keys are depressed
  1859.        1 = Right shift
  1860.        2 = Left shift
  1861.        4 = Right ctrl
  1862.        8 = Left ctrl
  1863.       16 = Right alt
  1864.       32 = Left alt
  1865.  
  1866. The exit ErrorLevels are additive.  The final ErrorLevel is the sum of the
  1867. listed values for the keys which are depressed.  Use the Shift-OR function to
  1868. do an OR comparison of the shift keys.  Use the Shift-AND function to do an
  1869. AND comparison of the shift keys.
  1870.  
  1871. This function was written by the author.
  1872.  
  1873.  
  1874. ══════════════════  StacInst . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1875.  
  1876. Identify the presence of a Stacker device driver in memory and optionally
  1877. determine if a specific drive is a Stacker volume.
  1878.  
  1879. Command line format:
  1880.  
  1881.       StacInst [d]
  1882.  
  1883. Exit ErrorLevels:
  1884.  
  1885.       Without argument:
  1886.             0    = Driver not installed
  1887.             Else = Driver installed (32*Major + Minor)
  1888.  
  1889.       With argument:
  1890.             0   = Not a Stacker volume
  1891.             1   = Valid stacker volume
  1892.             255 = Invalid drive letter
  1893.  
  1894. where d represents an optional drive letter to be checked as being a Stacker
  1895. volume.
  1896.  
  1897. When run without command line arguments, the program will display a message as
  1898. to whether a Stacker device driver is loaded into the system's memory.  The
  1899. version 2.01 driver will return an ErrorLevel of 65.
  1900.  
  1901. If any character is included on the command line, the program checks to see if
  1902. it is a valid drive letter from A to Z.  For legal drive letters, the program
  1903. checks to see if that drive corresponds to a valid Stacker volume.  The
  1904. appropriate message is displayed in each case.  The drive does not have to be
  1905. a valid DOS drive to be checked.  The Stacker device driver consults an
  1906. internal table to determine if the drive is a Stacker volume.  If a removable
  1907. disk drive is checked (such as a floppy disk or a Bernoulli), the drive must
  1908. be mounted in order to provide a valid response.  A reserved removable drive
  1909. that does not have a volume mounted will return an invalid response.
  1910.  
  1911. This function was adapted from the SDETECT.ASM program downloaded from
  1912. CompuServe's CIS:PCVENE Forum Section 12 (Stac Electronics) as DETECT.ZIP.  It
  1913. is also available on Stac's BBS as SDETECT.ZIP.
  1914.  
  1915.  
  1916. ══════════════════  Toggle . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1917.  
  1918. Modifies the current shift state of the keyboard NumLock, CapsLock or
  1919. ScrollLock keys.
  1920.  
  1921. Command line format:
  1922.  
  1923.       Toggle [N[+|-]] [C[+|-]] [S[+|-]] [/S]
  1924.  
  1925. where N represents the NumLock state, C represents the CapsLock state and S
  1926. represents the ScrollLock state.  Toggle changes the current shift state of
  1927. the keyboard NumLock, CapsLock or ScrollLock keys when used with just the
  1928. letters.  The state of the three keys is explicitly turned on or off if the
  1929. optional + or - argument is supplied.  The /S switch will write to the
  1930. keyboard port to synchronize the keyboard LEDs of systems that have a BIOS
  1931. that does not automatically perform the update.
  1932.  
  1933. This function was adapted and modified from the TOGGLE utility written by Jeff
  1934. Prosise and published in the 31 May 1988 Utilities section of PC Magazine.
  1935.  
  1936.  
  1937. ══════════════════  Tones  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1938.  
  1939. Programs the system's speaker port to emit a rising (Upward) or falling
  1940. (Downward) series of tones.
  1941.  
  1942. Command line format:
  1943.  
  1944.       Tones SubCommandName
  1945.  
  1946. The following are valid SubCommandNames: Down, Up.  Each SubCommandName may be
  1947. abbreviated to its first letter.  Error messages are displayed if the routine
  1948. fails.  (See the error message section below.)
  1949.  
  1950. Example command line:
  1951.  
  1952.       Tones Up
  1953.  
  1954. This function was written by the author and is based on the sound routines
  1955. contained in the ALLKEYS.COM program written by Robert L. Morton and published
  1956. in the 28 June 1988 Utilities section of PC Magazine.
  1957.  
  1958.  
  1959. ══════════════════  Typematic  . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1960.  
  1961. Set the keyboard typematic rate and delay.
  1962.  
  1963. Command line format:
  1964.  
  1965.       Typematic [m,n|Fast]
  1966.  
  1967. Exit ErrorLevels:
  1968.  
  1969.       0   = No errors
  1970.       255 = Invalid value
  1971.  
  1972. where m corresponds to the typematic rate (1-32) and n corresponds to the
  1973. delay (1-4) in 1/4 second increments.  For the rate, the larger the number,
  1974. the faster the rate.  The Fast option is equivalent to options of 32,1,
  1975. setting the fastest repeat rate and shortest delay.  If no arguments are
  1976. given, default values are used, equivalent to options of 20,2.  The values
  1977. that the BIOS accepts are divisors that cannot be easily translated into
  1978. characters per second.  The table below lists some of the rate values and the
  1979. equivalent number of characters per second:
  1980.  
  1981.       1 = 2.0  │  12 = 5.0  │  20 = 10.0  │  28 = 20.0
  1982.       6 = 3.0  │  14 = 6.0  │  22 = 12.0  │  30 = 24.0
  1983.       9 = 4.0  │  17 = 8.0  │  25 = 16.0  │  32 = 30.0
  1984.  
  1985. This function was adapted from the BATCHMAN utility written by Michael J.
  1986. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  1987.  
  1988.  
  1989. ══════════════════  Verify . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1990.  
  1991. Return status of DOS Verify option.
  1992.  
  1993. Command line format:
  1994.  
  1995.       Verify
  1996.  
  1997. Exit ErrorLevels:
  1998.  
  1999.       0 = Off
  2000.       1 = On
  2001.  
  2002. This function was written by the author.
  2003.  
  2004.  
  2005. ══════════════════  VGA25  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2006.  
  2007. Set a 25 line color VGA screen.
  2008.  
  2009. Command line format:
  2010.  
  2011.       VGA25 [/C]
  2012.  
  2013. Performs a mode 3 reset of the display adapter using Interrupt 10H Function 0. 
  2014. This works on VGA in a display independent way.  The /C switch clears the
  2015. screen after switching modes, if ANSI is installed, to set the screen color.
  2016.  
  2017. This function was written by the author.
  2018.  
  2019.  
  2020. ══════════════════  VGA43  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2021.  
  2022. Set a 43 line VGA screen.
  2023.  
  2024. Command line format:
  2025.  
  2026.       VGA43 [/C]
  2027.  
  2028. Forces the use of the display adapter's internal 8x14 font.  Interrupt 10H
  2029. Function 11H Subfunction 11H performs an adapter mode reset when it executes. 
  2030. This works on VGA in a display independent way.  The /C switch clears the
  2031. screen after switching modes, if ANSI is installed, to set the screen color.
  2032.  
  2033. This function was written by the author.
  2034.  
  2035.  
  2036. ══════════════════  VGA50  . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2037.  
  2038. Set a 50 line VGA screen.
  2039.  
  2040. Command line format:
  2041.  
  2042.       VGA50 [/C]
  2043.  
  2044. Forces the use of the display adapter's internal 8x8 font.  Interrupt 10H
  2045. Function 11H Subfunction 12H performs an adapter mode reset when it executes. 
  2046. This works on VGA in a display independent way.  The /C switch clears the
  2047. screen after switching modes, if ANSI is installed, to set the screen color.
  2048.  
  2049. This function was written by the author.
  2050.  
  2051.  
  2052. ══════════════════  VideoMode  . . . . . . . . . . . . . . . . . . . . [BATCH]
  2053.  
  2054. Determine the current video mode.
  2055.  
  2056. Command line format:
  2057.  
  2058.       VideoMode
  2059.  
  2060. The returned level is based on the value stored in the BIOS data area.
  2061.  
  2062. This function was written by the author.
  2063.  
  2064.  
  2065. ══════════════════  WaitFor  . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2066.  
  2067. Delay program execution for the number of minutes and seconds given on the
  2068. command line.
  2069.  
  2070. Command line format:
  2071.  
  2072.       WaitFor [m:]s
  2073.  
  2074. Where m is the delay time in minutes and s is in seconds.  If a single number
  2075. is on the command line, it is assumed to be seconds.  The default is one
  2076. second.
  2077.  
  2078. CFG only checks for a ':' between the minutes and seconds.  Any other
  2079. character or separator will cause the minutes value to be treated as seconds
  2080. and the seconds value to be ignored.  Spaces should not be used on either side
  2081. of the colon.
  2082.  
  2083. Pressing any key during the wait period will cancel the wait.  WaitFor checks
  2084. the keyboard buffer at one second intervals for a key press.
  2085.  
  2086. This function was adapted from the BATCHMAN utility written by Michael J.
  2087. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  2088.  
  2089.  
  2090. ══════════════════  WaitTo . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2091.  
  2092. Delay execution until the specified time of day.
  2093.  
  2094. Command line format:
  2095.  
  2096.       WaitTo hh:mm[:ss]
  2097.  
  2098. Exit ErrorLevels:
  2099.  
  2100.       0   = Timed out as requested
  2101.       1   = Exited prior to time out due to key press
  2102.       255 = Format error
  2103.  
  2104. where hh is the hour (0-23), mm is the minute (0-59) and ss is the second (0-
  2105. 59).  If the seconds are omitted, 0 is assumed.
  2106.  
  2107. Pressing any key during the wait period will cancel the wait.
  2108.  
  2109. This function was adapted from the BATCHMAN utility written by Michael J.
  2110. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  2111.  
  2112.  
  2113. ══════════════════  WarmBoot . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2114.  
  2115. Perform a keyboard (Ctrl-Alt-Delete) system reset.
  2116.  
  2117. Command line format:
  2118.  
  2119.       WarmBoot
  2120.  
  2121. All disk buffers that may not yet be written are flushed to disk via Interrupt
  2122. 21H Function 0DH (Disk Reset) prior to system reset.  The function jumps to
  2123. FFFF:0000 after setting the warm boot flag in the BIOS data area.
  2124.  
  2125. This function was adapted from the BATCHMAN utility written by Michael J.
  2126. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  2127.  
  2128.  
  2129. ══════════════════  Window . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2130.  
  2131. Draw boxes on the screen in the desired color.
  2132.  
  2133. Command line format:
  2134.  
  2135.       Window r c w h [b ["Fore [on] Back"]]
  2136.  
  2137. where r is the top row of the box, c is the left column of the box, w is the
  2138. box width, h is the box height and b is the box type (0-2).  The color must be
  2139. enclosed by double quotation marks and follows the same requirements as the
  2140. Cls command.  The top left screen corner is 1 1.
  2141.  
  2142. Three box types are available.  For b=0, the box is drawn without borders. 
  2143. For b=1, the box has single-line borders.  For b=2, the box has double-line
  2144. borders.  If b is omitted, b=0 is assumed.  A value for b must be specified in
  2145. order to include a color.  If a color is not specified, the current screen
  2146. colors are used.
  2147.  
  2148. The smallest window allowed is 2 characters in width and height.  The area
  2149. inside the border is blanked with spaces.  Text can be added to the frame
  2150. using the Locate and Cecho commands.
  2151.  
  2152. This function was adapted from the BATCHMAN utility written by Michael J.
  2153. Mefford and published in the 30 January 1990 Utilities section of PC Magazine.
  2154.  
  2155.  
  2156. ──────────────────────────────────────────────────────────────────────────────
  2157.                            DISCLAIMER - RESTRICTIONS
  2158. ──────────────────────────────────────────────────────────────────────────────
  2159.  
  2160.  
  2161. CFG is freeware, or what is known as "zero-cost shareware".  CFG is not what
  2162. is generally called "public domain" software because the author retains the
  2163. copyright.  However, the CFG package can be copied, used and distributed
  2164. freely as long as CFG.COM, CFG.DOC and CFG.ZIF are not altered and are
  2165. distributed together, preferably in the original Zip file.
  2166.  
  2167. CFG can be included in shareware packages as long as CFG and all its related
  2168. files are included in the shareware package.  If you have received CFG as part
  2169. of some larger shareware package, please be aware that you may freely use,
  2170. copy and distribute CFG without paying a fee for, or registering, the larger
  2171. package.
  2172.  
  2173. The original IACAFILL.SYS driver is copyright 1991 by R. W. Babcock and WSS
  2174. Division of DDC.  BATCHMAN is copyright 1989 Ziff Communications, Co.
  2175.  
  2176. CFG is supplied as is.  The author disclaims all warranties, expressed or
  2177. implied, including, without limitation, the warranties of merchantability and
  2178. of fitness for any purpose.  The author assumes no liability for damages,
  2179. direct or consequential, which may result from the use of CFG.
  2180.  
  2181. If you find CFG useful, I would like to know.  I would appreciate a short note
  2182. via US Mail or CompuServe Mail telling me what you like or dislike about CFG. 
  2183. If you need other functions or output, please contact me.
  2184.  
  2185. I will upload the most recent version of CFG to various forums on CompuServe
  2186. and ZiffNet under the file name "CFG.ZIP".  If the file does not appear with
  2187. my PPN, it may not be the most recent upload.
  2188.  
  2189.  
  2190. ──────────────────────────────────────────────────────────────────────────────
  2191.                                ACKNOWLEDGEMENTS
  2192. ──────────────────────────────────────────────────────────────────────────────
  2193.  
  2194.  
  2195. My thanks and recognition goes to the authors noted above for their original
  2196. versions of the utilities presented here.  Thanks to Sande Nissen for passing
  2197. IACAtalk my way.  A special tip of the hat goes to Rod Pullman [CompuServe:
  2198. 76226,3120] for his very useful DEVICE.COM utility.  DEVICE loads DOS
  2199. character device drivers subsequent to system boot.  It also works great to
  2200. test nonresident character device drivers like CFG.  Without it, initial
  2201. testing and debugging of CFG would have been too hard to contemplate.
  2202.  
  2203.  
  2204. ──────────────────────────────────────────────────────────────────────────────
  2205.                                 ERROR MESSAGES
  2206. ──────────────────────────────────────────────────────────────────────────────
  2207.  
  2208. ANSI not installed.
  2209. ───   Issued if CFG determines that the ANSI driver has not been loaded into
  2210.       memory when required for a command.
  2211.  
  2212. Cannot find File.
  2213. ───   Issued if the requested file cannot be located by the DOS file system.
  2214.  
  2215. Cannot swap the same port.
  2216. ───   Issued if the ports requested are the same.
  2217.  
  2218. Checksum invalid, ports not restored.
  2219. ───   The checksum stored with the hidden ports shows that the data has been
  2220.       changed since it was written, probably due to being over-written.
  2221.  
  2222. Command not available.
  2223. ───   Issued if the command is not available in the current program mode. 
  2224.       Check this document to see which commands are available from CONFIG.SYS
  2225.       and which are available from batch files.
  2226.  
  2227. Could not locate hidden ports.
  2228. ───   Issued if the signature is missing from the upper memory hidden storage
  2229.       location.  This could be due to the area having been over-written or due
  2230.       to a Restore being run without a preliminary Hide operation.
  2231.  
  2232. File error.
  2233. ───   Issued if DOS returns any error when attempting to open or perform other
  2234.       file operations.
  2235.  
  2236. Hidden ports already present.
  2237. ───   Issued if Hide is run twice in succession without a Restore in between. 
  2238.       A second Hide action is prevented since it would permanently erase the
  2239.       base port addresses.
  2240.  
  2241. IACA already in use.
  2242. ───   Issued if the first character of the IACA is not an ASCII 0, indicating
  2243.       other information has already been placed in the IACA.
  2244.  
  2245. IACA is empty.
  2246. ───   Issued if the first character of the IACA is an ASCII 0, indicating that
  2247.       nothing has been written to the IACA.
  2248.  
  2249. Invalid color.
  2250. ───   Issued if anything appears after the CommandName that cannot be parsed
  2251.       as a screen color.
  2252.  
  2253. Invalid command.
  2254. ───   Issued if specified CommandName is incorrect or missing.
  2255.  
  2256. Invalid drive designation.
  2257. ───   Issued if StacInst does not find a valid drive character when something
  2258.       is specified on the command line.
  2259.  
  2260. Invalid format.
  2261. ───   Issued if the command line format does not match that required by the
  2262.       command.
  2263.  
  2264. Invalid SFT format.
  2265. ───   Issued if the Files command finds an unexpected System File Table format
  2266.       when performing its initial verification.
  2267.  
  2268. Invalid SubCommandName.
  2269. ───   Issued if CommandName Option does not begin with the correct letter. 
  2270.       CFG only checks the first character after the CommandName, the rest of
  2271.       the line is ignored.
  2272.  
  2273. Missing or incorrect command option.
  2274. ───   Issued if CommandName Option is missing or does not begin with the
  2275.       expected letter or number.  CFG only checks the first character after
  2276.       the CommandName for the ComHide, LptHide and Tone commands.  The rest of
  2277.       the line is ignored.
  2278.  
  2279. Missing or invalid port.
  2280. ───   Issued if only one port is given on the command line or if the port
  2281.       requested is other than 1/2/3/4 for ComSwap or 1/2/3 for LptSwap.
  2282.  
  2283. Wrong color format or spelling.
  2284. ───   Issued if anything appears after the CommandName that cannot be parsed
  2285.       as screen colors.
  2286.  
  2287. Wrong DOS version.
  2288. ───   Issued if the function requires a specific minimum DOS version that does
  2289.       not match the version currently running.
  2290.  
  2291.  
  2292. ──────────────────────────────────────────────────────────────────────────────
  2293.                                REVISION HISTORY
  2294. ──────────────────────────────────────────────────────────────────────────────
  2295.  
  2296.  
  2297. Version 1.0  ---  28 August 1992
  2298.    *  First version.  Supported Beep, Cls, ComHide, ComSwap, Echo, EchoPause,
  2299.       EGA25, EGA43, KeyPause, LptHide, LptSwap, Mono, Pause, Tones, VGA25,
  2300.       VGA43, VGA50 and WaitFor commands.
  2301.  
  2302. Version 1.1 --- 11 September 1992
  2303.    *  Revised command line parsing.  Now recognizes the plus sign, equals sign
  2304.       and comma as separators.
  2305.    *  Revised the method for detecting ANSI.  Previously, the ANSI Device
  2306.       Status Report sequence was used.  This proved unreliable on some systems
  2307.       when StdIn did not reflect a valid Cursor Position Report from ANSI. 
  2308.       The new method uses cursor positioning sequences.
  2309.    *  Changed several things in Cls command:  Fixed a bug that caused bright
  2310.       colors to sometimes be displayed in low intensity, removed a mismatch
  2311.       between the DOS and ANSI color values, and added color parsing error
  2312.       messages.
  2313.    *  Corrected error which made the Tones command unavailable.
  2314.    *  Added the Color, IACAfill and Rem commands as well as the IACAread
  2315.       companion program.
  2316.    *  Revised and updated the documentation.
  2317.  
  2318. Version 2.0 --- 1 January 1993
  2319.    *  Program is now dual mode with a .COM extension.  The separate IACAread
  2320.       program is no longer required since that function is incorporated from
  2321.       the command line.
  2322.    *  The Cls command now sets the screen border color to that of the
  2323.       background and restores the cursor to its previous size.
  2324.    *  The screen mode commands (EGA25, EGA43, VGA25, VGA43 and VGA50) now
  2325.       optionally issue a ANSI escape sequence to clear the screen after the
  2326.       mode change to reset the screen color.
  2327.    *  The KeyPause command now also sets an ErrorLevel.
  2328.    *  The Beep command now optionally allows specification of frequency and
  2329.       length of sound, with the ability to do multiple sounds from a single
  2330.       command line.
  2331.    *  Added the AM, ANSI, ASCII, Blink, Border, Break, CanCopy, Cecho,
  2332.       ColdBoot, Cols, Compare, CoProc, CPU, Cursor, Day, DESQview, DirExist,
  2333.       Display, DOSmajor, DOSminor, DOSversion, Drive, DriveExist, DriveReady,
  2334.       DriveSize, DriveSpace, EMSversion, Env, FileDTC, FileExist, Files,
  2335.       FileSize, FileText, FullYear, GetKey, Hour, IACAread, Intense, IsVol,
  2336.       Locate, Memory, Minute, Month, Page, PM, Protected, PrtScr, RamDrive,
  2337.       RenDir, ROMdate, ROMmodel, Rows, Second, Share, Shift-AND, ShiftLock,
  2338.       Shift-OR, ShiftState, StacInst, Toggle, Typematic, Verify, VideoMode,
  2339.       WaitTo, WarmBoot, WeekDay, Window and Year commands.  (Whew!)
  2340.    *  Improved error handling and reporting.
  2341.    *  Deleted the plus sign from the list of separator characters.
  2342.    *  Revised, updated and reformatted the documentation.
  2343.  
  2344.  
  2345. ──────────────────────────────────────────────────────────────────────────────
  2346.                                   DISCUSSION
  2347. ──────────────────────────────────────────────────────────────────────────────
  2348.  
  2349.  
  2350.    Many utilities exist for use from the command line, but none were available
  2351. for use in CONFIG.SYS.  When I added Qualitas' BlueMax 6.0 to my system (see
  2352. below), what was once a relatively short boot display became quite a
  2353. protracted affair.  I wanted to organize and add color to the device driver
  2354. installation phase as well as add messages (if necessary) and optional pauses. 
  2355. I foresaw my disk becoming overrun by numerous small device drivers (more so
  2356. than it already was), so I wrote the basic CFG shell handler and then started
  2357. looking around for useful utilities.
  2358.  
  2359.    When CFG is executed during the device driver installation phase of system
  2360. boot, it does not remain resident in memory and may be run multiple times. 
  2361. CFG sets up its own 512 byte stack during device driver execution to avoid
  2362. overflowing the DOS stack.  The program then moves the command line from the
  2363. system buffer to a local buffer for parsing.  The CommandName is scanned and
  2364. the appropriate function is executed.  The function is responsible for any
  2365. additional command line parsing.  Upon completion of the function, the command
  2366. handler regains control and performs the final clean-up processing required by
  2367. DOS for termination of the driver.  The DOS stack in use at program entry is
  2368. restored and CFG ends with a Far Return to DOS.
  2369.  
  2370.    Since I wanted to access many CFG routines from the DOS command line or a
  2371. batch file, I rewrote CFG as a dual mode program: both device driver and
  2372. command line utility.  Not all commands are available in each mode.  An error
  2373. message will be displayed if a command is requested when it cannot be run.  If
  2374. the file is renamed CFG.SYS, it will function identically as versions 1.0 and
  2375. 1.1.
  2376.  
  2377.    General parsing allows any of the standard DOS separator characters to be
  2378. ignored.  With the exception of the bright Cls colors noted above, the number
  2379. of spaces between command line words does not matter.
  2380.  
  2381.    Not many DOS functions are available during device driver installation,
  2382. since the program fragments that will be the whole operating system are still
  2383. being assembled when the drivers' initialization routines are run.  DOS
  2384. (Interrupt 21H) functions that are available are:  01-0CH (various character
  2385. and string input and output routines), 25H (Set Interrupt Vector), 30H (Get
  2386. MS-DOS Version Number), and 35H (Get Interrupt Vector).  All BIOS video and
  2387. keyboard routines are available.  Within these limits, some very useful things
  2388. can be done.
  2389.  
  2390.  
  2391. ──────────────────────────────────────────────────────────────────────────────
  2392.                                SAMPLE CONFIG.SYS
  2393. ──────────────────────────────────────────────────────────────────────────────
  2394.  
  2395.  
  2396. The following is a recent copy of my CONFIG.SYS file showing usage of several
  2397. of the commands.  Line wrap is indicated by indentation.
  2398.  
  2399. Break=On
  2400. Buffers=10
  2401. Dos=High
  2402. FCBS=1
  2403. Files=8
  2404. LastDrive=G
  2405. Stacks=0,0
  2406. Switches=/W
  2407. Shell=C:\Dos\Command.Com C:\Dos\ /E:512 /P /F
  2408. Device=C:\Dos\Start\Cfg.Com VGA50
  2409. Device=C:\Dos\Start\Cfg.Com Cls Bright White on Blue
  2410. Device=C:\BlueMax\BlueMax.Sys Pro=C:\BlueMax\BlueMax.Pro Dos5
  2411. Device=C:\Dos\Start\Cfg.Com Cursor Hide
  2412. Device=C:\Dos\Start\Cfg.Com KeyPause
  2413. Device=C:\BlueMax\386Load.Sys Terse Size=1184 PrgReg=4 FlexFrame
  2414.                                                 Prog=C:\Dos\Start\DASDDrvr.Sys
  2415. Device=C:\Norton\Ncache.Exe /Install /Ini=C:\Norton
  2416. Device=C:\Dos\Start\Cfg.Com KeyPause
  2417. Device=C:\BlueMax\386Load.Sys Terse Size=37056 PrgReg=3 FlexFrame
  2418.                                       Prog=C:\Dos\Start\Mouse.Sys Ser 2 S06 NB
  2419. Device=C:\Dos\Start\Cfg.Com KeyPause
  2420. Device=C:\BlueMax\386Load.Sys Terse Size=5280 FlexFrame
  2421.                                        Prog=C:\Dos\Start\Bridge_B.Drv /PS60:1B
  2422. Device=C:\Dos\Start\Cfg.Com LptHide Hide
  2423. Device=C:\Dos\Start\Cfg.Com KeyPause
  2424. Device=C:\BlueMax\386Load.Sys Terse Size=30880 PrgReg=3 FlexFrame
  2425.                                                  Prog=C:\Dos\Start\RCD.Sys /M0
  2426. Device=C:\Dos\Start\Cfg.Com LptHide Restore
  2427. Device=C:\Dos\Start\Cfg.Com KeyPause
  2428. Device=C:\Dos\Start\Cfg.Com Cls Bright White on Blue
  2429. Device=C:\BlueMax\386Load.Sys Terse Size=6768 PrgReg=2 FlexFrame
  2430.                                   Prog=C:\BlueMax\386Disk.Sys 1024 512 64 /XMS
  2431. Device=C:\Dos\Start\Cfg.Com KeyPause
  2432. Device=C:\BlueMax\386Load.Sys Terse Size=9040 PrgReg=2 FlexFrame
  2433.                                                     Prog=C:\Dos\Start\ANSI.Sys
  2434. Device=C:\Dos\Start\Cfg.Com Color Bright White on Blue
  2435. Device=C:\Dos\Start\Cfg.Com KeyPause
  2436. Device=C:\Stacker\Screate.Sys F:
  2437. Device=C:\Dos\Start\Cfg.Com KeyPause
  2438. Device=C:\BlueMax\386Load.Sys Terse Size=40907 PrgReg=3 FlexFrame
  2439.                       Prog=C:\Stacker\Stacker.Com D:\StacVol.Dsk @ F: /EMS /NB
  2440. Device=C:\Dos\Start\Cfg.Com KeyPause
  2441. Device=C:\Stacker\Sswap.Com D:\StacVol.Dsk
  2442. Device=C:\Dos\Start\Cfg.Com KeyPause
  2443. Device=C:\BlueMax\386Load.Sys Terse Size=62573 PrgReg=3 FlexFrame
  2444.                                                        Prog=C:\NAV\NAV_.Sys /W
  2445. Device=C:\Dos\Start\Cfg.Com KeyPause
  2446. Device=C:\Dos\Start\Cfg.Com VGA25 /C
  2447. Device=C:\Dos\Start\Cfg.Com Cursor 2 2
  2448.