   +--------------------------------------------------------------------------+
   |                                                                          |
   |                                  DUMP                                    |
   |                                                                          |
   |                            File Dump Utility                             |
   |                                                                          |
   |                             V3.21 90-10-11                               |
   |                                                                          |
   |                        Author: Peter C. Burrough                         |
   |                                                                          |
   +--------------------------------------------------------------------------+

   Program and supporting documentation:

       Copyright (c) 1988-1990 by Peter C. Burrough

   Function:

       Dump any file in hexadecimal, with character equivalents
       for all printable characters

   On-line help (operand summary) available by entering:

       DUMP   [no operands]

   System Requirements:

       DOS 2.1 or higher is required.
       ANSI.SYS (or equivalent) must be present.

   Distribution:

       ZIP file containing executable program and documentation file
       DUMPnnn.ZIP -> DUMPnnn.COM
                      DUMPnnn.DOC

       After UNZIPping the file, you may wish to rename DUMPnnn.COM
       to DUMP.COM.

   +--------------------------------------------------------------------------+
   |                                                                          |
   |                          Program Invocation                              |
   |                                                                          |
   +--------------------------------------------------------------------------+

   Within the following discussion, none of the parameters is case-sensitive.
   Lower case is used to indicate values that are supplied by you; upper case
   is used to signify values that must be coded as shown.

   All switches are shown preceded by a "/"; the switch character may be coded
   as "-" for those of you who prefer this character.

   The program is invoked as follows:

     DUMP filename [range] [/dest] [/hi-bit] [/width] [/base] [/quit] [/K:blks]

   where:

     "DUMP"     is coded as shown

     "filename" is a required parameter, and must be the first parameter
                specified.  A drive and/or path may be supplied.

     "range"    is optional; if omitted, the entire file will be dumped.
                If specified, then any of the following formats may be used:

                  (a) start           [default "stop" value = end of file]
                  (b) start stop
                  (c) Lnnn            [default "start" value = 0]
                  (d) start Lnnn
                  (e) Lnnn start
                  (f) [omitted]       [defaults to entire file]

                "4G-1" below indicates 4,294,967,295 (hex FFFFFFFF)

        "start" is the starting offset within the file (range 0 to 4G-1)
                   (default 0)
        "stop"  is the ending offset within the file (range "start" to 4G-1)
                   (default is last byte in file, unless "Lnnn" is coded)
        "L"     is coded as shown, to indicate 'length'
        "nnn"   is the number of bytes to be dumped (range 1 to 4G-1)
                   (default is remaining file length, unless "stop" is coded)

                For format (b), the "stop" value must not be less than the
                start value.

                For formats (d) and (e), the sum of "start"+"nnn" must not
                exceed 4G-1.

        Radix:  For "start", "stop", and "nnn", the value may be coded with a
                prefix indicating one of the following bases:

             $  (Hexadecimal):     $hhhhhhhh  (max. FFFFFFFF)
             ^  (Decimal    ):   ^nnnnnnnnnn  (max. 4294967295 [4G-1])
             %  (Octal      ):  %kkkkkkkkkkk  (max. 37777777777)
             #  (Binary     ):        #b...b  (max. 1...1 [32 digits])

                If the prefix is omitted, the default base is hexadecimal,
                unless otherwise overridden by the "/radix" switch (see
                below).

                In all cases, the print range will be converted to offset
                values, and shown on the listing in hexadecimal.

     "/dest"    is optional; if omitted, the default is "/D"

                This controls the destination of the output, and may be coded:

             /D (screen via DOS calls; no color coding)
             /S (screen via BIOS calls, with color coding)
             /M (screen via BIOS calls, monochrome)
             /P (printer direct, via DOS calls)

                If your video adapter card does not support color mode, then /S
                should be avoided (unpredictable results will occur).

                If you use DOS re-direction to the printer (rather than the /P
                switch), then you should also avoid /S.

                Refer to the "/width" and "/K:blks" switches below for output
                sizes.

                Refer to "Color and Character Translation" for color values
                in use for screen output.

     "/hi-bit"  is optional; if omitted, the default is "/7"

                This controls the high-order bit processing for the character
                portion of the dump for output via DOS calls.  Allowable values
                are:

             /7 (strip the high-order bit)
             /8 (leave the high-order bit as is)

                If /S or /M is in effect, /8 will be assumed unconditionally
                (/7 will be accepted without any indication of error).

                Refer to "Color and Character Translation" for character
                translation in the character portion of the output.

     "/width"   is optional; if omitted, the default is "/N"

                This controls the page width.  Allowable values are:

             /N (narrow) - print 16 bytes of data per line
             /W (wide)   - print 32 bytes of data per line

                For output to the screen, a check will be made to ensure that
                the current screen width is sufficient to permit /W to be in
                effect.  If /W output is directed to the printer, it is your
                responsibility to ensure that the printer has been set up to
                accept print lines of 132 characters.

     "/base"    is optional; if omitted, the default is "/$"

                This controls the radix for "start, "stop" and "nnn" (length)
                values, unless such values are explicitly coded with a radix
                indicator.  Allowable values are:

             /$ (hexadecimal)
             /^ (decimal)
             /% (octal)
             /# (binary)

     "/quit"    is optional; if omitted, the default is "/C"

                This controls the processing of the (Esc) key during program
                execution.  Allowable values are:

             /C (confirmation of Esc key required)
             /Q (quit immediately after Esc key is pressed)

     "/K:blks"  is optional; if omitted, the default is "/K:1" for screen
                output, and "/K:3" for printer output.

                This controls the page length.  The "blks" value must be coded
                as a one-digit decimal number (range 1 to 9), and defines the
                number of blocks of data lines per page, where a block consists
                of 16 print lines, corresponding to 100H bytes in /N mode, and
                200H bytes of data in /W mode.

                Note that the "/radix" switch has no effect on the
                interpretation of the number specified for "blks".

                Once the "page" is complete, a new set of header information
                will be printed (a formfeed will be sent to the printer if /P
                is in effect).

                If output is directed to the printer, it is your responsibility
                to ensure that the printer has been set up to accept a minimum
                of ((16*blks) + 12) lines per page.

   Page size:   The default "page" size for output to the screen is 16 lines,
                plus header information; the default "page" size for output to
                the printer is 48 lines, plus page header information (with a
                form-feed sent at the end of every page).

   +--------------------------------------------------------------------------+
   |                                                                          |
   |                          Parameter Validation                            |
   |                                                                          |
   +--------------------------------------------------------------------------+

   Parameter Parsing Tolerances
   ----------------------------

   The "filename" must be present, and must be the first parameter.  However,
   the remaining optional parameters may be coded in any order (with the single
   exception noted below), separated by at least one blank (optionally any
   number of additional blanks will be accepted).

   The "/" indicating switch values need not be preceded by a blank.

   If the "range" values are codes as 'start stop', then the "stop" value must
   follow the "start" value, although any switch values may occur between the
   two values.

   The following are acceptable forms:

     DUMP FILE.EXT /P $00F0/8 ^300  range 240 (hex F0)  to 300
     DUMP FILE.EXT L%40 #111        range   7 (bin 111) to  38 (7+32-1)

   Parameter errors
   ----------------

   Duplicate or conflicting parameters will cause an error to be reported.  For
   example, /D and /S may not appear together; the presence of 3 numeric values
   in the "range" specification is illegal, and so on.

   The "start" value may not exceed the file length.

   The "stop" value (whether coded explicitly or resulting from "Lnnn") must
   not be less than the "start" value and not greater than the file length.

   +--------------------------------------------------------------------------+
   |                                                                          |
   |                       Program Execution Control                          |
   |                                                                          |
   +--------------------------------------------------------------------------+

   While the program is executing the following keys will be recognized:

   1-9 and 0 (scroll delay rate for screen output)
   -----------------------------------------------

     The "1" key will cause a long delay at the end of each line
             (slow scrolling)
     The "9" key will cause a short delay at the end of each line
             (fast scrolling)
     Keys "2" to "8" cause the delay to be progressively decreased
             (i.e. the scroll rate will progressively increase)
     The "0" key will cause a zero delay at the end of each line
             ('express' scrolling)

     The program starts at speed "0" ('express')

   (spacebar) or "P" key to pause the listing
   ------------------------------------------

     After a pause has been requested, any key other than (Esc) will cause the
     dump program to resume.  The (Esc) key will cause the immediate
     termination of the program (regardless of the /C or /Q setting).

   (Esc) to request termination
   ----------------------------

     After termination has been requested, you will be prompted to confirm the
     request by pressing the (Esc) key a second time if /C is in effect; any
     other key will cause the program to resume.  If /Q is in effect, the
     program will terminate immediately.

   Recognition of keystrokes
   -------------------------

     Requests for termination or pause will be detected immediately, but will
     not be processed until the end of the current output line.

     Similarly, changes in the scroll rate will be detected immediately, but
     will not cause a change in the scroll rate until the end of the current
     output line.

   +--------------------------------------------------------------------------+
   |                                                                          |
   |                    Color and Character Translation                       |
   |                                                                          |
   +--------------------------------------------------------------------------+

   Color Values
   ------------

   For /D, the default DOS color settings will be used.

   For /S and /M, the following colors will be used:

     character range (hex)      Color for /S     Color for /M
     =======================    =============    =============
     00-1F                      red              white
     20-7F (printable ASCII)    bright yellow    white
     80-9F                      magenta          white
     A0-FF                      bright green     white

   Character Translation
   ---------------------

   For /S and /M, no character translation will occur (all bytes will be
   displayed as is).

   For /D and /P, the following character translation will occur:

     character range (hex)     /8            /7
     =======================   ==========    ===========
     00-1F                     . (period)    . (period)
     20-7E (printable ASCII)   as is         as is
     7F                        . (period)    . (period)
     80-9F                     . (period)    . (period)
     A0-FE                     as is         20-7E
     FF                        . (period)    . (period)

   +--------------------------------------------------------------------------+
   |                                                                          |
   |                       Program Execution Examples                         |
   |                                                                          |
   +--------------------------------------------------------------------------+

   1. DUMP FILE.EXT

      Dump the entire file FILE.EXT to the screen
      (note that /D/7 will be assumed)

   2. DUMP FILE.EXT/P

      Dump the entire file FILE.EXT to the printer
      (note that /7 will be assumed)

   3. DUMP FILE.EXT 100 200 /S/8

      Dump offset 100H-200H from file FILE.EXT to the screen (with color)
      (no translation will occur for bytes in range 80H-FFH)

   4. DUMP FILE.EXT 100 /8

      Dump file FILE.EXT to the screen starting at offset 100H, ending at EOF
      (note that /D will be assumed)

   5. DUMP FILE.EXT L^50

      Dump the first 50 (decimal) bytes of file FILE.EXT to the screen
      (note that /D/7 will be assumed)

   6. DUMP FILE.EXT 200 L80

      Dump the 80H bytes of file FILE.EXT to the screen, starting at offset 200H
      (note that /D/7 will be assumed)

   7. DUMP FILE.EXT $200 L%177

      Dump the 127 bytes (octal 177) of file FILE.EXT to the screen, starting at
      offset 512 (hex 200).
      (note that /D/7 will be assumed)

*** END OF DOCUMENT ***
