home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / DDUMP001.ZIP / DDUMP.DOC next >
Text File  |  1989-09-18  |  22KB  |  688 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                     ---------------------------------------------
  15.  
  16.                             DDUMP: Dual Dump File Utility
  17.                                 with Limited Editing.
  18.  
  19.                     ---------------------------------------------
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                        Copyright (c) 1989, Christopher Laforet
  39.                                  All Rights Reserved
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                       Chapter 1                                      Chapter 1
  53.  
  54.                             Introduction and Legal Stuff                            Introduction and Legal Stuff
  55.  
  56.  
  57.  
  58.                                   1.1  Introduction                                  1.1  Introduction
  59.  
  60.  
  61.                This utility was inspired somewhat by a similar utility
  62.           available in the DOS world called CABLE.  CABLE was written by
  63.           David Mitchell, an employee of IBM in England, a number of years
  64.           ago.  The utility was just so well designed and thought out that
  65.           it became quite a favorite among those programmers who had a
  66.           chance to use it.  The basic thrust of CABLE was to permit the
  67.           user to pull in one or two files for searching, editing (in ASCII
  68.           and hex), or simply for comparison.
  69.  
  70.                DDUMP is a similar utility for OS/2 programmers, a utility
  71.           to permit one to search for patterns in a file, to make minor
  72.           editing changes (in ASCII or in hex), to browse around, or to
  73.           compare two files.  DDUMP will work at the OS/2 command line or
  74.           will run in a text window in Presentation Manager.  I may make a
  75.           "pure" PM version at some time.  It is my hope that the users of
  76.           DDUMP will find it as powerful a little tool for their personal
  77.           toolkits as I found CABLE.
  78.  
  79.  
  80.  
  81.                            1.2  Copyright and Registration                           1.2  Copyright and Registration
  82.  
  83.  
  84.                DDUMP and all of its associated files including but not
  85.           limited to the executable and this documentation are copyrighted
  86.           material of their author, Christopher Laforet.  This program is
  87.           distributed under the shareware concept and is not Public Domain
  88.           material.  What this means is that you are encouraged to share
  89.           the original distribution files (including this documentation)
  90.           with your friends or to provide them on diskette or by means of
  91.           BBSes to other users.  You are allowed to use the program for a
  92.           period of time without registering it until you decide that you
  93.           really have a use for it.  This period of time can vary, but I
  94.           suggest that if you use it for a period of over a month, you
  95.           ought to do the honest thing and register your copy.
  96.  
  97.                Registration entitles you to the latest copy of DDUMP on
  98.           diskette and the means to contact me for reporting bugs or making
  99.           suggestions.  To register, please print, fill out, and mail the
  100.  
  101.  
  102.  
  103.                     ---------------------------------------------
  104.              Dual Dump File Utility                      Usage Page Two
  105.                        Copyright (c) 1989, Christopher Laforet
  106.  
  107.  
  108.  
  109.  
  110.  
  111.           accompanying REGISTER.DOC and enclose a check or money order made
  112.           out to Christopher Laforet for the amount of $15 US (NC residents
  113.           add 5% sales tax or $0.75) to the following address:
  114.  
  115.           Christopher Laforet
  116.           511-D Poplar St
  117.           Graham, NC  27253
  118.  
  119.  
  120.  
  121.                             1.3  Warranty and Disclaimer                            1.3  Warranty and Disclaimer
  122.  
  123.  
  124.                The LOG program and all accompanying documentation are
  125.           provided on an "AS IS" basis.  This means that Christopher
  126.           Laforet does not warrant, guarantee, or make any other
  127.           representations regarding the use, or results of use, of LOG or
  128.           the documentation in terms of accuracy, reliability, correctness,
  129.           currentness, or otherwise.  Christopher Laforet will not be held
  130.           responsible for any direct, indirect, incidental, or
  131.           consequential damages including damages for loss of business
  132.           profits, business interruption, loss of business information, or
  133.           otherwise arising from the use or inability to use LOG, even if
  134.           Christopher Laforet has been advised of the possibility of such
  135.           damages.  The use of this product is on an "AT YOUR OWN RISK"
  136.           basis.
  137.  
  138.  
  139.  
  140.                            1.4  Contacting Me and Support                           1.4  Contacting Me and Support
  141.  
  142.  
  143.                Non-registered users can feel free to forward suggestions or
  144.           bug reports to me at the above address, through Compuserve Email
  145.           (76120,110), through FidoNet mail (1:151/402), or can call my BBS
  146.           and leave me a message (Chris Laforet, The Programmer's Oasis,
  147.           919-226-6984 HST,2400,1200).  Flames will be sent directly to
  148.           NUL!
  149.  
  150.                If there is a decent response (as measured in registrations)
  151.           to this product, I will continue to upgrade it as new versions of
  152.           OS/2 arrive and as bugs appear (God forbid!).  It is for this
  153.           reason that I urge you to register your copy.
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.                     ---------------------------------------------
  169.             Dual Dump File Utility                      Usage Page Three
  170.                        Copyright (c) 1989, Christopher Laforet
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.                                       Chapter 2                                      Chapter 2
  183.  
  184.                                      Using DDUMP                                     Using DDUMP
  185.  
  186.  
  187.  
  188.                                  2.1  Starting DDUMP                                 2.1  Starting DDUMP
  189.  
  190.  
  191.                To run DDUMP, type DDUMP in the protected mode shell of
  192.           OS/2.  After signing-on, you will be presented with the main
  193.           screen which consists of a pull-down menu along the top, a status
  194.           line on the bottom, and two sections for files.  At this point
  195.           you may load a file (or files) to browse and/or edit by pressing
  196.           Alt-F to pull down the Files menu and then select the Open File
  197.           option by moving the light-bar over the choice and pressing
  198.           Enter.  (To load the files directly from the command line, you
  199.           may type DDUMP d:\path\file1 [d:\path\file2].)
  200.  
  201.  
  202.  
  203.                                  2.2  The Files Menu                                 2.2  The Files Menu
  204.  
  205.  
  206.                As you will see in the figure below, the files menu has a
  207.           number of different entries.  Alongside of the action description
  208.           (like "Open File") you can see the shortcut key (like "Alt+O")
  209.           which you may press without pulling down the menu every time you
  210.           need to complete an action.  To activate the files menu, press
  211.           Alt+F from the main screen.  If you are already in a menu, merely
  212.           press your left or right arrow keys to get to this menu.
  213.  
  214.                  Files     Search    Compare   opTions
  215.                 ┌─────────────────────┐────────────────
  216.                 │ Open File     Alt+O │
  217.                 │ Edit File     Alt+E │
  218.                 │ Browse File   Alt+B │
  219.                 │ Next File     Alt+N │
  220.                 │ Write File    Alt+W │
  221.                 │ Abs Offset    Alt+G │
  222.                 │ Plus Offset   Alt+P │
  223.                 │ Minus Offset  Alt+M │
  224.                 │ Exit          Alt+X │
  225.                 └─────────────────────┘
  226.                              Figure 2.1: The Files Menu                             Figure 2.1
  227.  
  228.                The options available include one to open a new file (if
  229.           there is already a file being browsed, the new one will replace
  230.  
  231.  
  232.  
  233.                     ---------------------------------------------
  234.              Dual Dump File Utility                      Usage Page Four
  235.                        Copyright (c) 1989, Christopher Laforet
  236.  
  237.  
  238.  
  239.  
  240.  
  241.           it), an option to toggle into Editing mode, another one to cancel
  242.           Editing and return to Browse mode (the default), and one to allow
  243.           you to flip between the two files that you are browsing/editing.
  244.  
  245.                If you have made an editing change to a file, you may choose
  246.           to write the changes out by selecting the "Write File" option.
  247.           The system will remind you that a file has changed whenever you
  248.           choose any option which may discard those changes and then it
  249.           will prompt you if it should write the changes out.  Hence the
  250.           Write File option is merely there if you want to make sure that
  251.           you flush changes out to the disk.
  252.  
  253.                To go to an absolute location in the file, choose the "Abs
  254.           Offset" option.  You will be presented with a window prompting
  255.           you for the position that you wish to seek to.  You may reply in
  256.           hex (if Hex Offsets option is active) or in decimal (if the
  257.           Decimal Offsets option is active).  The default is to accept
  258.           offsets in hex (use the opTions menu to change this if you so
  259.           desire).  If you select an invalid location, the pointer will not
  260.           be moved.
  261.  
  262.                To add an offset to your current position in the file, use
  263.           the "Plus Offset" option.  Depending upon the mode, you will be
  264.           prompted to enter this value either in hex or in decimal
  265.           notation.  If the combined offset is beyond EOF, the pointer will
  266.           not be moved.
  267.  
  268.                To subtract an offset from your current position in the
  269.           file, select the "Minus Offset" option from the menu.  The same
  270.           thing that we said about previously of the hex/decimal prompting
  271.           is true of this also.  If the combined offset is before the BOF,
  272.           the pointer will not be moved.
  273.  
  274.                To exit DDUMP, select exit from this menu.  Before you
  275.           leave, if you have made any unsaved changes to either file, you
  276.           will be prompted to save them before exiting.
  277.  
  278.  
  279.  
  280.                                 2.3  The Search Menu                                2.3  The Search Menu
  281.  
  282.  
  283.                The search menu can be activated by pressing Alt+S from the
  284.           main screen or if you are already in a menu, press the right or
  285.           left arrows until you reach this menu.
  286.  
  287.                  Search    Compare   opTions
  288.                 ┌─────────────────────┐──────
  289.                 │ Search Fwd       F5 │
  290.                 │ Search Back  Alt+F5 │
  291.                 │ Search Next  Shf+F5 │
  292.                 └─────────────────────┘
  293.                              Figure 2.2: The Search Menu                             Figure 2.2
  294.  
  295.  
  296.  
  297.  
  298.                     ---------------------------------------------
  299.              Dual Dump File Utility                      Usage Page Five
  300.                        Copyright (c) 1989, Christopher Laforet
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                Using this menu you may ask to search forward for a specific
  307.           string pattern by selecting the "Search Fwd" option.  A window
  308.           will then open in the middle of the screen and prompt you to
  309.           provide the desired pattern.  The search will then proceed until
  310.           a match is found, until EOF is hit, or until you press any key to
  311.           terminate the search.  The case sensitivity of the search is
  312.           dependent upon the sensitivity flag (by default sensitivity is
  313.           on) which can be set using the opTions menu.  The state of the
  314.           sensitivity flag can be seen on the status line.
  315.  
  316.                To do a reverse search from the current position, select the
  317.           "Search Back" option.  The same comments mentioned above hold
  318.           true here also.
  319.  
  320.                To repeat a previous search, select the "Search Next"
  321.           option.  This will search for the previous patter in the same
  322.           direction as before.
  323.  
  324.  
  325.  
  326.                                 2.4  The Compare Menu                                2.4  The Compare Menu
  327.  
  328.  
  329.                This will be implemented in the next beta release of this
  330.           product.
  331.  
  332.  
  333.  
  334.                                 2.5  The Options Menu                                2.5  The Options Menu
  335.  
  336.  
  337.                The options menu allows you to change the state of a number
  338.           of flags.  To select this menu, press Alt+T from the main screen
  339.           or use your arrow keys to select it if you already have a menu
  340.           pulled down.
  341.  
  342.                  opTions
  343.                 ┌─────────────────────┐
  344.                 │ Show Ctrl-Chars  F2 │
  345.                 │ Case Insensitive F3 │
  346.                 │ Lock Files       F4 │
  347.                 │ Edit in Hex      F7 │
  348.                 │ Offs in Decimal  F8 │
  349.                 └─────────────────────┘
  350.                             Figure 2.3: The Options Menu                            Figure 2.3
  351.  
  352.                The first option will show all characters in the ascii dump
  353.           portion of the file dump.  This option is suppressed by default
  354.           (all characters less than a space (0x20) are shown as periods) to
  355.           present a relatively uncluttered dump.  Should you desire to see
  356.           all of the characters, merely toggle the "Show Ctrl-Chars"
  357.           option.  You will notice that the option will change to "Hide
  358.           Ctrl-Chars".
  359.  
  360.  
  361.  
  362.  
  363.                     ---------------------------------------------
  364.              Dual Dump File Utility                      Usage Page Six
  365.                        Copyright (c) 1989, Christopher Laforet
  366.  
  367.  
  368.  
  369.  
  370.  
  371.                To toggle the search flag in charge of defining if searches
  372.           are case sensitive or not, choose the second option.  If they are
  373.           currently case sensitive, the option will read "Case Insensitive"
  374.           otherwise if they are case insensitive, the option will read
  375.           "Case Sensitive".
  376.  
  377.                The "Lock Files" (and conversely "Free Files") options are
  378.           related to the Comparison process.  When files are locked, any
  379.           scrolling that you do on one will be duplicated on the other.
  380.           This option will be implemented on the next beta release.
  381.  
  382.                The "Edit in Hex" option toggles the mode for editing files
  383.           (the default is ASCII).  When you select this option you can then
  384.           edit bytes in hexadecimal.  The option will change to "Edit in
  385.           ASCII".
  386.  
  387.                The "Offs in Decimal" option permits you to change the
  388.           number system under which you are prompted for offsets.  The
  389.           default is hexadecimal.  Should you select this option, it will
  390.           then become an "Offs in Hex" option.
  391.  
  392.  
  393.  
  394.                       2.6  Active Keystrokes in the Main Screen                      2.6  Active Keystrokes in the Main Screen
  395.  
  396.  
  397.                All of the shortcut keys presented on the pull-down menus
  398.           are active on the main screen.  An example of this is the option
  399.           to toggle between the two files (Files menu, Next File option).
  400.           If you wish to use the shortcut key, press Alt+N to toggle
  401.           between the top and bottom file.
  402.  
  403.                To move around in the files you may use the left and right
  404.           arrow keys (moves left or right by a byte at a time), the up and
  405.           down arrow keys (moves left or right by 16 bytes at a time), the
  406.           PgUp and PgDn keys (moves left or right by one screenful at a
  407.           time), or the Home and End keys (to go to BOF and EOF
  408.           respectively).
  409.  
  410.  
  411.  
  412.                                 2.7  The File Screen                                2.7  The File Screen
  413.  
  414.  
  415.                Each of the files being browsed/edited is presented with its
  416.           pathname and filesize in hex (on the top or at the bottom
  417.           depending upon which screen position it occupies), a hexadecimal
  418.           dump (with the current offset marked with a pointer in both hex
  419.           and decimal), an ASCII dump on the right hand side, and a linear
  420.           ASCII dump (under or over the hex dump depending upon its screen
  421.           position).
  422.  
  423.                Here is an example of the hexadecimal dump of a file along
  424.           with its linear ASCII dump:
  425.  
  426.  
  427.  
  428.                     ---------------------------------------------
  429.             Dual Dump File Utility                      Usage Page Seven
  430.                        Copyright (c) 1989, Christopher Laforet
  431.  
  432.  
  433.  
  434.  
  435.  
  436.                       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  437.           ┌─────────┐ 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00
  438.  
  439.           │0x0000040╞═0e 1f ba 0e 00 b4 09 cd 21 b8 01 4c cd 21 54 68
  440.           │       64│ 69 73 20 70 72 6f 67 72 61 6d 20 63 61 6e 6e 6f
  441.           └────────╥┘ 74 20 62 65 20 72 75 6e 20 69 6e 20 44 4f 53 20
  442.                    ║
  443.                    ╚══════════════════╕
  444.                       ............Ç.....║..┤.═!╕.L═!This program cann
  445.  
  446.                Figure 2.4: The Hexadecimal Dump and Linear ASCII Dump               Figure 2.4
  447.  
  448.           Here is an example of the block ASCII dump corresponding to the
  449.           hex dump previously presented:
  450.  
  451.                ................
  452.                ............Ç...
  453.                ..║..┤.═!╕.L═!Th
  454.                is program canno
  455.                t be run in DOS
  456.  
  457.                              Figure 2.5: The ASCII Dump                             Figure 2.5
  458.  
  459.  
  460.  
  461.                                  2.8  Editing a File                                 2.8  Editing a File
  462.  
  463.  
  464.                To edit a file in ASCII, merely select the correct position
  465.           using the arrow keys and make sure that you are in ASCII Edit
  466.           mode (look at the status line).  Select the "Edit File" option
  467.           from the Files menu or press Alt+E to toggle Edit mode.  At this
  468.           point, merely type in the changes that you wish to make.  After
  469.           each character, the current position moves to the next byte
  470.           location.
  471.  
  472.                To edit a file in hex, make sure that your status line
  473.           indicates that you are in Hex Edit mode.  If you are not, change
  474.           your setting using the opTions menu.  Select the position in the
  475.           file where you wish to do your edit and then begin editing.
  476.           Notice that the hex editor accepts two hex numbers (since there
  477.           are two nibbles) per byte and rotate the changes leftwise through
  478.           the byte.  After each two hex numbers, the current position moves
  479.           to the next byte.
  480.  
  481.                Please notice that this editor does not allow you to insert
  482.           bytes or add bytes to the end of the file.  It merely permits you
  483.           to change what is already there.
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.                     ---------------------------------------------
  494.             Dual Dump File Utility                      Usage Page Eight
  495.                        Copyright (c) 1989, Christopher Laforet
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.                                       Chapter 3                                      Chapter 3
  508.  
  509.                                   Revision History                                  Revision History
  510.  
  511.  
  512.           Version 0.01:
  513.  
  514.                First beta release version.  This version does not support
  515.           file comparisons nor does it allow files to be "locked" together.
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.                     ---------------------------------------------
  559.              Dual Dump File Utility                      Usage Page Nine
  560.                        Copyright (c) 1989, Christopher Laforet
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.                                     Contents                                    Contents
  573.  
  574.  
  575.  
  576.                Chapter 1  Introduction and Legal Stuff               2
  577.                   1.1  Introduction  . . . . . . . . . . . . . . . . 2
  578.                   1.2  Copyright and Registration  . . . . . . . . . 2
  579.                   1.3  Warranty and Disclaimer . . . . . . . . . . . 3
  580.                   1.4  Contacting Me and Support . . . . . . . . . . 3
  581.  
  582.                Chapter 2  Using DDUMP                                4
  583.                   2.1  Starting DDUMP  . . . . . . . . . . . . . . . 4
  584.                   2.2  The Files Menu  . . . . . . . . . . . . . . . 4
  585.                   2.3  The Search Menu . . . . . . . . . . . . . . . 5
  586.                   2.4  The Compare Menu  . . . . . . . . . . . . . . 6
  587.                   2.5  The Options Menu  . . . . . . . . . . . . . . 6
  588.                   2.6  Active Keystrokes in the Main Screen  . . . . 7
  589.                   2.7  The File Screen . . . . . . . . . . . . . . . 7
  590.                   2.8  Editing a File  . . . . . . . . . . . . . . . 8
  591.  
  592.                Chapter 3  Revision History                           9
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.                                           i
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.                                     Figures                                    Figures
  637.  
  638.  
  639.                Figure 2.1: The Files Menu  . . . . . . . . . . . . . 4
  640.                Figure 2.2: The Search Menu . . . . . . . . . . . . . 5
  641.                Figure 2.3: The Options Menu  . . . . . . . . . . . . 6
  642.                Figure 2.4: The Hexadecimal Dump and Linear ASCII
  643.                            Dump  . . . . . . . . . . . . . . . . . . 8
  644.                Figure 2.5: The ASCII Dump  . . . . . . . . . . . . . 8
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.                                          ii
  688.