home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersguides-&-software / pirate26-1.zip / XE.DOC < prev    next >
Text File  |  1995-11-03  |  49KB  |  1,383 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.      A. Title........................................................... 1
  9.      B. DISCLAIMER...................................................... 2
  10.      C. Introduction.................................................... 3
  11.      D. Starting heXEdit................................................ 4
  12.      E. Command Line Options............................................ 4
  13.      F. Environment Variable - XEOPT.................................... 5
  14.      G. Loadfile box.................................................... 5
  15.         1. File/Directory Attributes.................................... 7
  16.      H. Main Display.................................................... 7
  17.      I. Commands........................................................ 8
  18.         1. Help......................................................... 8
  19.         2. ASCII chart.................................................. 9
  20.         3. Convert a number............................................. 9
  21.         4. Change colors............................................... 10
  22.         5. Decimal offset ............................................. 11
  23.         6. Shell out to DOS prompt or another program.................. 11
  24.         7. Edit........................................................ 11
  25.         8. Search forward.............................................. 13
  26.         9. Goto an offset.............................................. 13
  27.         10. Hexadecimal offset ........................................ 14
  28.         11. Load a new file............................................ 14
  29.         12. Push position on marker stack.............................. 14
  30.         13. Search again............................................... 14
  31.         14. Octal offset .............................................. 15
  32.         15. Retrieve position from marker stack........................ 15
  33.         16. Search..................................................... 15
  34.         17. Clear marker stack......................................... 16
  35.         18. Goto marked position....................................... 16
  36.      J. Other Notes.................................................... 17
  37.      K. Comments....................................................... 17
  38.      L. Appendix....................................................... 17
  39.         1. Version History............................................. 18
  40.         2. Trademark information....................................... 20
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  ---  heXEdit  -------------------------------------  Page i  ---
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. A. Title
  73.  
  74.  
  75.  
  76.                                     heXEdit
  77.  
  78.  
  79.  
  80.                                   Version 4.3
  81.  
  82.                                     11-27-94
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.                                  Robert Stuntz
  92.                                  2120 Aspen Dr.
  93.                              Woodstock, IL.  60098
  94.                                      U.S.A.
  95.  
  96.                              CompuServe : 71043,117
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  ---  heXEdit  -------------------------------------  Page 1  ---
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. B.  DISCLAIMER
  139.  
  140.        THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
  141.        WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
  142.        WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS
  143.        HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
  144.        PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED AND
  145.        ALL LIABILITY IN THE USE AND EFFECTS OF THIS PROGRAM SHALL REST
  146.        WITH THE USER.
  147.  
  148.        THIS PROGRAM HAS THE ABILITY TO ALTER YOUR FILES! YOU ARE
  149.        RESPONSIBLE!  (Sorry, but I have to warn you ...)
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  ---  heXEdit  -------------------------------------  Page 2  ---
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. C. Introduction
  205.  
  206.  
  207.  
  208.         heXEdit (XE) is a program that will allow you to display and/or
  209.         edit any file. It doesn't have a fancy interface but serves my
  210.         purposes perfectly. I wrote this program because I became
  211.         frustrated with a couple of other commercial programs. They either
  212.         had some annoying peculiarities or required too much thought on my
  213.         part just to search for and change a couple of bytes.
  214.  
  215.  
  216.         heXEdit was written using Turbo Pascal v6.0, although it doesn't
  217.         use any of Borland's object libraries. It does however write
  218.         directly to video memory for speed when scrolling thru the file.
  219.         If you're using a CGA monitor you may see some 'snow' as I don't
  220.         check for the vertical retrace period before writing to video
  221.         memory.
  222.  
  223.  
  224.         heXEdit will keep no more than 1760 bytes of the file you load in
  225.         memory at a time, as I didn't feel like messing with a variable
  226.         amount of memory available. heXEdit requires about 160k bytes of
  227.         free memory in order to execute.
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  ---  heXEdit  -------------------------------------  Page 3  ---
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. D. Starting heXEdit
  271.  
  272.  
  273.         To start heXEdit, enter
  274.  
  275.         XE [options] [<drive>:][<filename>] [options]
  276.  
  277.  
  278.         The drive designator, filename and options are ... optional on the
  279.         command line. If only a drive designator is specified, XE will
  280.         show you the files from that drive's current directory.  If a file
  281.         is specified XE will try to load that file, if not, you will see a
  282.         list of files from the current directory. All of the available
  283.         command line options are explained in the following section.
  284.  
  285.  
  286. E. Command Line Options
  287.  
  288.  
  289.         Available command line options are as follows :
  290.  
  291.     1. /C or /M
  292.  
  293.        /C  This option tells XE to use it's default color set.
  294.  
  295.        /M  This option tells XE to use black and white colors; for
  296.            monochrome monitors.
  297.  
  298.     3. /? or /H
  299.  
  300.         Either of these two options will display a short message about the
  301.         start-up syntax.
  302.  
  303.     4. /Lc[c[c]]
  304.  
  305.         The files and directories in the Loadfile box (described in the
  306.         next section) are sorted, depending on the value of this option.
  307.  
  308.         /L is followed by 1-3 characters listed below which describe the
  309.         actual sort options.
  310.  
  311.         c = U, D, F   N, E, S, T   A, Z
  312.  
  313.                 (group 1)
  314.                 U - unsorted; directory and file entries are listed as
  315.                     they are read from the disk, then list drive
  316.                     designators
  317.                 D - put directory entries at the top of the list, followed
  318.                     by files, then drive designators
  319.                     (default)
  320.                 F - put file entries at the top of the list, followed by
  321.                     directories, then drive designators
  322.  
  323.                 (group 2)
  324.  
  325.  
  326.  
  327.  ---  heXEdit  -------------------------------------  Page 4  ---
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.                 N - sort files/dirs by name
  337.                     (default)
  338.                 E - sort files/dirs by extension then name
  339.                     (sorting by ext slows down the speed at which the list
  340.                     is sorted and displayed, more than the other options)
  341.                 S - sort files by size, dirs by name
  342.                     (physical size of dir entry irrelevant)
  343.                 T - sort files/dirs by date/time
  344.  
  345.                 (group 3)
  346.                 A - sort files/dirs in ascending order
  347.                     (default)
  348.                 Z - sort files/dirs in descending order
  349.  
  350.  
  351.         Note that it is possible to specify options that are in conflict
  352.         with each other. However, the last option specified belonging to
  353.         each group is the one used. For example, you could use /LDNF, and
  354.         in this case the F would take precedence over the D. For /LES, the
  355.         S will take precedence. If you do not specify an option for a
  356.         group, a default value will be used (D for group 1, N for group 2,
  357.         and A for group 3).
  358.  
  359.         If there is an invalid option or sub-option specified, XE will
  360.         exit with an error message.
  361.  
  362.  
  363. F. Environment Variable - XEOPT
  364.  
  365.         All of the command line options can also be specified thru an
  366.         environment variable called 'XEOPT'. To set the value of XEOPT,
  367.         use the DOS SET command at a DOS prompt before running XE. For
  368.         example:
  369.  
  370.                 SET XEOPT=/LFEA/C
  371.  
  372.         If command line options are used, they will override environment
  373.         variable options if they conflict with each other.
  374.  
  375.  
  376. G. Loadfile box
  377.  
  378.         If a drive designator is specified on the command line, XE will
  379.         show you the files from that drive's current directory. If a file
  380.         is specified XE will try to load that file, if not, you will see a
  381.         list of files from the current directory of the current drive. If
  382.         a file or directory has it's hidden attribute set, it will be
  383.         displayed in lower case. At the end of the list, you will see one
  384.         or more drive designators. The drives you can choose from are all
  385.         the available drives, including remote (or network) drives.  If a
  386.         drive is a removeable media device (like a floppy drive), then you
  387.         will see the characters '(  )' surrounding the drive letter.  If a
  388.         drive is a fixed media device (like a hard disk drive), then you
  389.         will see the characters '[  ]' surrounding the drive letter.  If a
  390.  
  391.  
  392.  
  393.  ---  heXEdit  -------------------------------------  Page 5  ---
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.         drive is a remote device, whether it's fixed or removeable, then
  403.         you will see the characters '{  }' surrounding the drive letter.
  404.         If a drive is local and fixed, then the VolumeID will be displayed
  405.         to the right of the drive letter.  Selecting one of these will
  406.         show you the contents of that drive's current directory.
  407.  
  408.         To load a file, simply use the UP and DOWN arrow keys to move the
  409.         highlight bar to the file you want to load, then press ENTER. You
  410.         can also use the PAGEUP and PAGEDOWN keys to scroll thru the list
  411.         of files a page at a time. Pressing the HOME key will move you to
  412.         the top of the list, pressing END moves you to the end of the
  413.         list.
  414.  
  415.         New with version 4.1 * You can now do a 'hypersearch' to jump
  416.         right to a file, directory, or drive designator rather than
  417.         scrolling thru the list. While in the Loadfile box, if you press a
  418.         letter or number, or any other valid filename character, the
  419.         highlight bar will move to the first file or directory whose name
  420.         begins with the character you pressed. The search starts from your
  421.         current highlight bar position and stops at the first match it
  422.         finds. It will wrap around to the top, if nothing matches, and
  423.         continue searching up to your current position. If no match is
  424.         found, you will hear a short, low pitch beep. XE will also check
  425.         the drive designator entries, at the end of the list, for your
  426.         'hyper-character'. For ex., if you don't have any files or
  427.         directories that start with the letter 'B', and you press 'B', the
  428.         highlight bar will move to the drive designator '[ - B: - ]'.
  429.         Pressing the period '.' key will move you to the directory entry
  430.         of '..' (the parent directory label).
  431.  
  432.         Also new with version 4.1 * On the left border of the Loadfile box
  433.         is a percentage indicator (either '', '', or '' - ascii codes
  434.         #25, #18, #24) of how far up or down you are in the list of
  435.         files/directories. When you (the highlight bar) are at the first
  436.         file/directory in the list, the indicator is at the top of the
  437.         border. If you are 70% of the way down the list, the indicator is
  438.         about 70% of the way down the border; etc, etc. It is there as a
  439.         quick reference, not an exact measurement. * And on the right
  440.         border, the options that you specified (or the default options)
  441.         for the Loadfile box sort options (/L) will be displayed.
  442.  
  443.         Pressing ENTER on a directory entry or a drive letter will change
  444.         to that directory or drive.
  445.  
  446.  
  447.         While using the Loadfile box, you may encounter an error, for one
  448.         reason or another. Generally speaking, you will be given one, some
  449.         or all of the options below :
  450.  
  451.           1 - (A)bort : if you press 'A' XE will abort the operation.
  452.  
  453.           2 - (R)etry : press 'R' to retry the operation. (Maybe the
  454.               drive door was opened before you hit ENTER to load the
  455.               file.)
  456.  
  457.  
  458.  
  459.  ---  heXEdit  -------------------------------------  Page 6  ---
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.           3 - (Q)uit XE : press 'Q' to quit XE and return to the DOS
  469.               prompt (or wherever it was that you came from).
  470.  
  471.           4 - Any other key : if you hit any other key than the ones
  472.               described above you will be returned to the Loadfile box.
  473.  
  474.  
  475.         While in the Loadfile box, pressing ESC will exit the Loadfile box
  476.         and either 1) return you to the last file you were viewing, or 2)
  477.         if no file was previously loaded, exit XE altogether.
  478.  
  479.  
  480.  
  481.  
  482.   1. File/Directory Attributes
  483.  
  484.         One last feature of the Loadfile box is that you can change the
  485.         attributes of a file simply by pressing F5-F8 (providing the file
  486.         is available; i.e., the disk is in the drive etc). And starting
  487.         with version 3.64, you can also change the Hidden attribute bit of
  488.         a subdirectory. Move the highlight bar to the file you want to
  489.         work with and then simply press one of the following keys,
  490.         depending on what you want to do.
  491.  
  492.                 F5 - toggles the Archive bit
  493.                 F6 - toggles the System bit
  494.                 F7 - toggles the Hidden bit
  495.                 F8 - toggles the Read_Only bit
  496.  
  497.         If the attribute change was successful you will hear a high pitch
  498.         tone, otherwise you will hear a low tone indicating that the
  499.         attribute could not be changed for one reason or another.  You
  500.         should also see the attribute change in the Loadfile box if the
  501.         change was successful.
  502.  
  503.     *** NOTE : Be sure you know what affect changing an attribute will
  504.         have on your system. Some programs act on the attributes of a
  505.         file or may even require certain attributes to be set.
  506.  
  507.  
  508. H. Main Display
  509.  
  510.  
  511.         Once the file is loaded you will see the main display.  At the top
  512.         is the name of the file loaded. On the left side of the display
  513.         are numbers (in hexadecimal,decimal or octal) indicating the
  514.         offset into the file. In the middle are 22 rows of 16 bytes which
  515.         are the file's contents. On the right, the ASCII character for
  516.         each byte in that row. In the ASCII portion of the display, any
  517.         characters past the EOF (end-of-file) are shown as a '.' (ASCII
  518.         #249). On the bottom is a status word indicating your current
  519.         operation, a three letter abbrev indicating whether the offset
  520.         display is in 'hex'adecimal, 'dec'imal, or 'oct'al, the percentage
  521.         into the file from the top line, and the size of the file in
  522.  
  523.  
  524.  
  525.  ---  heXEdit  -------------------------------------  Page 7  ---
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.         decimal.
  535.  
  536.  
  537. I. Commands
  538.  
  539.  
  540.         Following is a list of commands once you are in XE and then a
  541.         brief explanation of each :
  542.  
  543.  
  544.         F1      - Help
  545.         A/Alt+A - ASCII table
  546.         B/Alt+B - Base conversion (decimal-hexadecimal-binary)
  547.         C       - Change colors
  548.         D       - Change offset display to Decimal
  549.         Alt+D   - Shell out to a DOS prompt, or other program
  550.         E       - Edit the file
  551.         F       - Search forward from current position
  552.         G       - Goto offset
  553.         H       - Change offset display to Hexadecimal
  554.         L       - Bring up the Loadfile box
  555.         M       - Push position on marker stack
  556.         N       - Search again (using last used search parameters)
  557.         O       - Change offset display to Octal
  558.         R       - Retrieve position from marker stack
  559.         S       - Search (from beginning of file)
  560.         Z       - Clear all entries from marker stack
  561.         ALT+1 thru ALT+9 - Goto marked position
  562.  
  563.         UP/DOWN arrow keys - scroll up and down one line at a time
  564.         PAGEUP/PAGEDOWN    - move up/down one page at a time
  565.         HOME               - move to the beginning of the file
  566.         END                - move to the end of the file
  567.         ESC/Alt+X          - quit XE
  568.  
  569.  
  570.  
  571.   1. Help
  572.  
  573.         F1
  574.  
  575.         Pressing F1 will display a help screen. You now have the following
  576.         commands available :
  577.  
  578.         F1 : Help on Help
  579.         F2 : Display index (keywords) for items in the help file
  580.         F3 : Goto the previous screen (limited)
  581.         F5 : Zoom/Unzoom the help screen
  582.  
  583.         ENTER           : Get help on a highlighted keyword
  584.         Arrow keys      : Scroll the help screen contents left, right,
  585.                           up and down
  586.         ESC             : Exits help
  587.         TAB / SHFT+TAB  : Highlight the next/previous visible
  588.  
  589.  
  590.  
  591.  ---  heXEdit  -------------------------------------  Page 8  ---
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                           keyword
  601.         PAGEUP/PAGEDOWN : Move up and down a page at a time
  602.         HOME/END        : Goto the beginning/end of the help info for
  603.                           the current item
  604.  
  605.  
  606.  
  607.         In the upper left corner of the help screen (in the border), you
  608.         may see a number and possibly one of three arrow characters. The
  609.         number is the left column, of the help info, you are at. If you
  610.         are at column one, it will not be displayed.  The arrow characters
  611.         indicate if there is more info either above or below (or both) of
  612.         your position.
  613.  
  614.  
  615.         A couple of notes on the help file.
  616.  
  617.         1. heXEdit expects the help file (XE.HLP) to be in the directory
  618.         that XE.EXE is in. If it is not, you will get an error message
  619.         when you invoke help.
  620.  
  621.         2. If you modify the help file, make sure your keywords are
  622.         capitalized and start in column one. It will probably be easier to
  623.         just look at the help file that came with heXEdit to see how it's
  624.         done.
  625.  
  626.         3. There is a limit of 75 lines of information per keyword.
  627.  
  628.         4. Keyword information begins with it's keyword and ends with a
  629.         slash (#47).
  630.  
  631.         5. To create a keyword in a help screen, precede the keyword with
  632.         a tilde (#126) and end it with a back-quote (#96).
  633.  
  634.  
  635.  
  636.   2. ASCII chart
  637.  
  638.         A or Alt+A
  639.  
  640.         Display an ASCII chart.
  641.  
  642.         ASCII chart commands :
  643.           LEFT arrow key  : go back 16 characters
  644.           RIGHT arrow key : go forward 16 characters
  645.           PAGEUP          : go back 128 characters
  646.           PAGEDOWN        : go forward 128 characters
  647.           D               : display numbers in decimal
  648.           H               : display numbers in hexadecimal
  649.           ESC or ENTER    : exits ASCII chart
  650.  
  651.  
  652.   3. Convert a number
  653.  
  654.  
  655.  
  656.  
  657.  ---  heXEdit  -------------------------------------  Page 9  ---
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.         B or Alt+B
  667.  
  668.         Convert a number from either decimal, hexadecimal or binary to the
  669.         other two.
  670.  
  671.         Base convert commands :
  672.           UP/DOWN arrow keys  : select the base of the input number
  673.           ENTER               : convert the number
  674.           ESC                 : exit the base convert routine
  675.  
  676.         Using the arrow keys, move the highlight bar to the base of the
  677.         input number and then either 1) press ENTER and enter the number
  678.         or 2) just start typing the number. After the number has been
  679.         converted, press any key to select the base for another conversion
  680.         or press ESC to exit.
  681.  
  682.         When you enter the number, I only check for validity with the
  683.         first character. If you try to convert an invalid number an error
  684.         message will be displayed. The largest number that can be
  685.         accurately converted is a 32 bit number. It has a very simple
  686.         input routine, so don't be surprised if you can enter an invalid
  687.         number.  The conversion will be incorrect of course. I leave it
  688.         mostly up to you to enter a valid number.
  689.  
  690.  
  691.   4. Change colors
  692.  
  693.         C
  694.  
  695.         This command will allow you to change the color of just about
  696.         anything. You can also save the colors you choose so that XE will
  697.         startup with those colors.
  698.  
  699.         Simply select the area you want to change the color in by pressing
  700.         a letter 'A' thru 'P'. A colorbox of all possible colors will
  701.         appear. The current color of the item you selected will have two
  702.         white bars on either side of an 'X'. You can now move those white
  703.         bars around with the arrow keys to select a new color. With the
  704.         white bars around the color scheme you want, press ENTER. If you
  705.         change your mind and don't want to change the color of that item,
  706.         press ESC.
  707.  
  708.         There are a couple areas that have a color selection restriction.
  709.         Area 'G', Altered bytes background, you can only select the
  710.         background, the foreground is the same as the main bytes (area
  711.         'A'). The border for Help, 'M', only the foreground can be
  712.         selected as it's background is the same as the Help text (area
  713.         'L'). And the edit cursor position color, 'P', only the background
  714.         can be changed.
  715.  
  716.         Color Change Commands :
  717.  
  718.         F1        : get help
  719.         A-P       : select the area you want to change
  720.  
  721.  
  722.  
  723.  ---  heXEdit  -------------------------------------  Page 10  ---
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.         S         : save the currently selected colors to XE.EXE
  733.         ESC/ENTER : exit the color change screen
  734.  
  735.         The 'S' command will save the currently selected colors to the
  736.         executable file (XE.EXE). If XE.EXE is not available where it was
  737.         started from, an error message will be displayed to that effect,
  738.         which means your colors have not been saved.
  739.  
  740.         If you want the default colors back, start-up XE with the /C
  741.         option. If you want to retain the default colors make sure you
  742.         then save the colors, otherwise the next time you start XE you
  743.         will have whatever colors were last saved in XE.EXE.
  744.  
  745.  
  746.   5. Decimal offset #'s
  747.  
  748.         D
  749.  
  750.         Change the offset display to base 10, decimal.
  751.  
  752.  
  753.   6. Shell out to DOS prompt or another program
  754.  
  755.         Alt+D
  756.  
  757.         This command will shell out to a DOS prompt or another program.
  758.  
  759.         When this command is pressed, XE first looks for an environment
  760.         variable called XESHELL. If found, XE will try to run the program
  761.         name specified by that environment variable. When using XESHELL,
  762.         the entire pathname needs to be used if the program you want to
  763.         shell too is not in your current directory. XE does not search the
  764.         directories in your PATH for the program specified.  Also, the
  765.         program specified has to have an extension of EXE or COM and
  766.         command line parameters can be included. The following is an
  767.         example of how to set the value of XESHELL (from a DOS prompt):
  768.  
  769.                 SET XESHELL=C:\UT\LIST.COM /4
  770.  
  771.         If XE does not find a value for XESHELL, it looks for COMSPEC. The
  772.         rules above also apply to COMSPEC. COMSPEC is normally set to the
  773.         command processor COMMAND.COM. If neither environment variable
  774.         exists, you will receive an error message stating so.
  775.  
  776.         If COMMAND.COM is the program shelled to, typing EXIT will return
  777.         you to heXEdit. If XESHELL is used to run a different program,
  778.         exiting that program will return you to heXEdit.
  779.  
  780.  
  781.   7. Edit
  782.  
  783.         E
  784.  
  785.         Begin editing the file at the current position.  If the file is a
  786.  
  787.  
  788.  
  789.  ---  heXEdit  -------------------------------------  Page 11  ---
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.         READ ONLY file, a short message to that affect will appear and you
  799.         will be returned to the view mode. Of course, you could just press
  800.         'L' to bring up the Loadfile box and change the READ ONLY
  801.         attribute of the file with F8.  And then go back and edit.  But,
  802.         it might be READ ONLY for a reason ...
  803.  
  804.         If you had previously searched the file successfully (meaning you
  805.         found an item) then if that exact item is displayed on screen when
  806.         you go to edit mode, then the cursor will be positioned at the
  807.         first character of that item. When I say exact item, I mean the
  808.         last item that you found in your search (this does not quite work
  809.         as I'd like it too...).  Also, shown at the bottom is the offset
  810.         of the cursor position.
  811.  
  812.         Edit commands :
  813.           F1              : get help
  814.           Alt+A           : displays the ASCII chart
  815.           Alt+B           : base number conversion
  816.           Alt+D           : shell out to DOS or other prog
  817.  
  818.           BACKSPACE/LEFT arrow key  : move cursor left 1 byte
  819.           RIGHT arrow key : move cursor right 1 byte
  820.           PAGEUP          : move cursor to first line on page
  821.           PAGEDOWN        : move cursor to last line on page
  822.           HOME            : move cursor to beginning of line
  823.           END             : move cursor to end of line
  824.  
  825.           TAB : toggle cursor position between the hexadecimal display
  826.                 and the ASCII display of the file. The above editing
  827.                 commands will move the cursor within the area the
  828.                 cursor is in.  You can edit the file making changes in
  829.                 both areas at the same time, if so desired.
  830.  
  831.           ENTER : quit editing. If you made changes to whole bytes you
  832.                   will be prompted to save the changes or not.  Press
  833.                   'Y' to save the changes or 'N' to lose the changes.
  834.                   Only the portion of the file that is in memory is
  835.                   actually saved. So don't worry about waiting for a
  836.                   long save if you are editing a large file.  You are
  837.                   then returned to the View mode.
  838.  
  839.           ESC : quit editing. If you made changes to whole bytes you will
  840.                 be prompted to discard the changes or not. Press 'Y' to
  841.                 discard the changes and return to view mode, or 'N' to
  842.                 return to edit mode.
  843.  
  844.         After pressing either ENTER or ESC (as above), you can press ESC
  845.         to cancel the request and return to edit mode.
  846.  
  847.         To change a value when in the hexadecimal portion, just type in
  848.         it's new value. The background of the character will change,
  849.         indicating which bytes have been changed.  Valid values are
  850.         $00 - $FF. Obviously, pressing a key like 'P' will do nothing
  851.         because 'P' is not a valid hexadecimal character.
  852.  
  853.  
  854.  
  855.  ---  heXEdit  -------------------------------------  Page 12  ---
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.         To change a value when in the ASCII portion of the display, simply
  865.         press the key of the new value. Or, hold down the ALT key while
  866.         typing the ASCII code, on the numeric keypad, of the character you
  867.         want, then release the ALT key. Using the ALT key in this area,
  868.         you can enter a value from 32-255. Again, the background will
  869.         change indicating a change.
  870.  
  871.  
  872.   8. Search forward
  873.  
  874.         F
  875.  
  876.         This command is the same as the main search command, 'S', in
  877.         every respect, except that the search begins from your current
  878.         position in the file. Not from the beginning of the file.
  879.  
  880.  
  881.   9. Goto an offset
  882.  
  883.         G
  884.  
  885.         Goto an offset in the file. You are prompted for an offset to go
  886.         to. You can enter either a decimal number or a hexadecimal number.
  887.         If you press ESC while entering a number you will be placed back
  888.         in the View mode with no repositioning taking place.  The
  889.         BACKSPACE key can be used to edit your entry. If you enter an
  890.         offset that is beyond the EOF (or < 0) you will be prompted again
  891.         for a number.
  892.  
  893.         New with version 4.0 * If you've done at least one Goto command,
  894.         you can also select any past offsets you've entered by pressing H,
  895.         (H for History). After pressing H, the most recent offset entered
  896.         is displayed. If you want to see other offsets that are in
  897.         history, press the UP ARROW key. Using the UP and DOWN ARROW keys
  898.         you can see all the offsets in history.  When you've found the
  899.         offset you want to goto just press ENTER.  Pressing ESC while
  900.         viewing the history items will return you to the input offset
  901.         prompt. There can be a maximum of 50 offsets saved in history.
  902.         Anytime a Goto command is done, the offset is added to history.
  903.         The oldest entries will be lost from history when new offsets are
  904.         added and there are already 50 offsets in history.  Duplicate
  905.         offsets are not re-saved to history.
  906.  
  907.         If you are displaying the file offsets in hexadecimal, then a '$'
  908.         character is placed on the input line for you. The '$' character
  909.         tells heXEdit that the number you are entering is in base 16. If
  910.         you were displaying the file offsets in decimal the '$' is not put
  911.         on the input line. You can press the BACKSPACE key to erase the
  912.         '$' if necessary.
  913.  
  914.         To enter the offset, just type in the number, no commas, and press
  915.         ENTER.
  916.  
  917.         Also, if at anytime while entering a number, you enter an 'A'
  918.  
  919.  
  920.  
  921.  ---  heXEdit  -------------------------------------  Page 13  ---
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.         through 'F' and you do not have a '$' as the first character, it
  931.         will be inserted into the input line at the beginning and your
  932.         entry will be taken as a hexadecimal number.  For example:
  933.  
  934.                 Keystroke               Screen
  935.                 3                       3
  936.                 5                       35
  937.                 1                       351
  938.                 E                       $351E
  939.                 etc ...
  940.  
  941.  
  942.   10. Hexadecimal offset #'s
  943.  
  944.         H
  945.  
  946.         Change the offset display to base 16, hexadecimal.
  947.  
  948.  
  949.   11. Load a new file
  950.  
  951.         L
  952.  
  953.         You will enter the Loadfile box in order to select a new file (as
  954.         described earlier in this document under 'Loadfile box').
  955.  
  956.         Since you can't leave the edit mode without either saving any
  957.         changes or losing changes, you needn't worry about saving the
  958.         current file before loading a new one.
  959.  
  960.  
  961.   12. Push position on marker stack
  962.  
  963.         M
  964.  
  965.         Your current position in the file can be saved with this command
  966.         and then be retrieved later on.
  967.  
  968.         Your position is saved on a stack. If the stack is full the oldest
  969.         position will be deleted and the rest of the entries will move
  970.         down the stack to make room for the new entry. The maximum number
  971.         of positions you can save is 100. Also, when your position is
  972.         saved, it's location on the stack is reported to you so you can
  973.         see how full the marker stack is.
  974.  
  975.         This command can also be used while searching. If the search
  976.         string is found, you can press 'M' to save that position on the
  977.         marker stack and then continue searching.
  978.  
  979.  
  980.   13. Search again
  981.  
  982.         N
  983.  
  984.  
  985.  
  986.  
  987.  ---  heXEdit  -------------------------------------  Page 14  ---
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.         Search again using the last used search parameters. If you have
  997.         not done at least one search, you will be prompted as if you
  998.         pressed 'S', to enter a search string.
  999.  
  1000.         If your previous search was a global search ('S'), then this
  1001.         search will also be global. If your previous search was a forward
  1002.         search ('F'), then this will be a forward search. If you have not
  1003.         done at least one search, this will be a global search.
  1004.  
  1005.  
  1006.   14. Octal offset #'s
  1007.  
  1008.         O
  1009.  
  1010.         Change the offset display to base 8, octal.
  1011.  
  1012.         If you happen to be looking at a REALLY BIG file, any offsets
  1013.         greater than 134,217,727 bytes will appear as '+++++++++' in the
  1014.         left side of the main display.
  1015.  
  1016.  
  1017.   15. Retrieve position from marker stack
  1018.  
  1019.         R
  1020.  
  1021.         While viewing the file, if you do this command you will be moved
  1022.         to the location specified by the top marker stack entry.  Once you
  1023.         have been moved to the new location, the entry you retrieved will
  1024.         be deleted from the marker stack. If there are no markers on the
  1025.         stack, then nothing will happen.
  1026.  
  1027.  
  1028.   16. Search
  1029.  
  1030.         S
  1031.  
  1032.         Search the file for a byte or text sequence. You will be prompted
  1033.         for the type of search (B)yte or (T)ext.
  1034.  
  1035.         New with version 4.0 * If you've done at least one search, you can
  1036.         also select any past items you've searched for by pressing H (H
  1037.         for History) when you are asked for the type of search to perform.
  1038.         After pressing H, the most recent search item is displayed. If you
  1039.         want to see other search items that are in history, press the UP
  1040.         ARROW key. Using the UP and DOWN ARROW keys you can see all the
  1041.         items in history. When you've found the item you want to search
  1042.         for just press ENTER. Pressing ESC while viewing the history items
  1043.         will return you to view mode. There can be a maximum of 50 items
  1044.         saved in history. Anytime a (B)yte or (T)ext search is done, the
  1045.         item is added to history. The oldest items will be lost from
  1046.         history if new items are searched for and there are already 50
  1047.         items in history. Duplicate items are not saved to history.
  1048.  
  1049.         For a byte sequence, enter the bytes in hexadecimal notation then
  1050.  
  1051.  
  1052.  
  1053.  ---  heXEdit  -------------------------------------  Page 15  ---
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.         press ENTER.  As with editing, you must enter a complete byte, for
  1063.         the search to work correctly, although I don't check for that
  1064.         here. You can use the BACKSPACE key to go back and make
  1065.         corrections.  The maximum length for a byte sequence is 9 bytes. I
  1066.         think that is plenty long enough, even 4 bytes would probably be
  1067.         enough to find what you're looking for. For example, you might see
  1068.         this prompt :
  1069.  
  1070.                 Enter search bytes :
  1071.  
  1072.         Now you would just press the numbers or letters that make up the
  1073.         bytes you want to search for, like :
  1074.  
  1075.                 D3 45 FF 00 C4 6E
  1076.  
  1077.         There is no need to enter a space between each byte as I do that
  1078.         for you while you're entering your numbers.
  1079.  
  1080.         For a text sequence, just type in the text to search for, no
  1081.         quotes are needed, and press ENTER. The maximum length for a text
  1082.         sequence is 25 characters.  The search is case insensitive.
  1083.  
  1084.         If the search string is found, the display will move to that
  1085.         string's location in the file and will be highlighted at the top
  1086.         of the screen. You can now press any key to continue the search,
  1087.         press 'M' to Mark the position or press ESC to stop searching.
  1088.  
  1089.         While XE is searching, you can press any key to interrupt and stop
  1090.         the search.
  1091.  
  1092.         The search starts at the beginning of the file.
  1093.  
  1094.         And beginning with v3.5, the searching is done using the
  1095.         Boyer-Moore algorithm. This should significantly speed up
  1096.         searching compared to my previous method; on ANY computer.
  1097.  
  1098.  
  1099.   17. Clear marker stack
  1100.  
  1101.         Z
  1102.  
  1103.         This command will delete all entries from the marker stack.
  1104.         Careful, there is no turning back from the results of this
  1105.         command.
  1106.  
  1107.  
  1108.   18. Goto marked position
  1109.  
  1110.         Alt+1 thru Alt+9
  1111.  
  1112.         Using these commands will move you to a previously marked position
  1113.         without deleting the mark information.  The retrieve command 'R'
  1114.         moves you to the last position and deletes the mark, using Alt+1 -
  1115.         Alt+9 does not delete the mark. Alt+1 moves you to the first
  1116.  
  1117.  
  1118.  
  1119.  ---  heXEdit  -------------------------------------  Page 16  ---
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.         marked position, Alt+2 moves you to the second marked position,
  1129.         etc etc. If you try to move to a position that has not been marked
  1130.         yet, nothing will happen except a message telling you so.
  1131.  
  1132.  
  1133. J. Other Notes
  1134.  
  1135.         If for some reason you rename XE.EXE you will need to rename the
  1136.         help file, XE.HLP. For example, if you rename XE.EXE to XEDIT.EXE,
  1137.         the help file should be renamed to XEDIT.HLP.
  1138.  
  1139.         And if for some other reason you have XE.EXE loaded under XE, and
  1140.         then save new color information, you may need to force a re-read
  1141.         of the last part of the file to get the correct information
  1142.         loaded.
  1143.  
  1144.         The Loadfile box has a limit of 2500 files or directories that it
  1145.         can display for you. If you change to a directory with more than
  1146.         2500, you will not see all of the files.  2500 is about as high as
  1147.         I can go due to stack space limitations. If you want to load a
  1148.         file that is in a directory with more than 2500 files, you'll have
  1149.         to specify that filename on the command line when you start XE.
  1150.  
  1151.         XE does not support any video modes other than 80x25 text but will
  1152.         work with a monochrome monitor. Just don't forget to include the
  1153.         '/M' option on the command line and then save the color
  1154.         configuration to retain the monochrome 'colors'.
  1155.  
  1156.         This program should NOT be compressed with PKLITE. It will not run
  1157.         if it is. Because, XE reads the current color setup from itself,
  1158.         compressing it with PKLITE will cause a runtime error.
  1159.  
  1160.  
  1161. K. Comments
  1162.  
  1163.  
  1164.         I would STRONGLY suggest that you make a backup copy of any file
  1165.         you're going to modify, just in case you decide later you want the
  1166.         original file back. You should have a backup copy anyway as a
  1167.         matter of safeguarding your files in case of catastrophe.
  1168.  
  1169.         I have a 40Mhz 386dx AT running MS-DOS 6.2. XE should work with
  1170.         most system configurations though.
  1171.  
  1172.         Also, I don't expect any payment for use of this program. Feel
  1173.         FREE to use it how you like, but be careful :).
  1174.  
  1175.  
  1176.         Rob
  1177.  
  1178.  
  1179.  
  1180. L. Appendix
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  ---  heXEdit  -------------------------------------  Page 17  ---
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.   1. Version History
  1195.  
  1196.             v1.0  04-08-91 - Initial writing
  1197.             v1.1  05-16-91 - Minor internal changes
  1198.             v1.2  07-04-91 - added Marker commands
  1199.             v1.21 08-03-91 - increased marker stack size to 100
  1200.                              added Z command; clear marker stack
  1201.             v1.3  08-12-91 - added Goto Offset command
  1202.                              fixed a bug or two
  1203.             v2.0  09-25-91 - added Loadfile box (instead of typing in
  1204.                                the filename)
  1205.                              set to video page 0 at startup
  1206.                                (this was done in case you shell out from
  1207.                                another program and that program puts you
  1208.                                in a video page other than 0, like Turbo
  1209.                                Debugger. XE needs to be in video page
  1210.                                0.  XE returns to the video page you
  1211.                                where at before it started when you exit)
  1212.                              added backspace key use while editing (acts
  1213.                                like left arrow key)
  1214.                              added 'D', 'H' and 'O' commands while viewing
  1215.                              changed Help command to 'F1' from 'H'
  1216.                              made Search command case insensitive
  1217.                              added ability to enter a drive designator
  1218.                                on cmd line to start Loadfile box on that drive
  1219.                              and of course fixed some bugs ...
  1220.             v2.1  10-19-91 - decided I better try and trap most of the
  1221.                                I/O, as opposed to only some, for errors,
  1222.                                to avoid a possible run-time error
  1223.                              allow loading of read-only files
  1224.                              allow entry of ASCII chars 32-255 when
  1225.                                editing in ASCII portion of display
  1226.                                (formerly 32-126)
  1227.                              check for and handle extremely long path names
  1228.                                in display
  1229.                              swapped ability to change Help screen color
  1230.                                with Base convert
  1231.                              search command now highlights found text,
  1232.                                (no flashing arrow!)
  1233.                              hidden files (and directories) are lowercase
  1234.                                in Loadfile box
  1235.                              and the usual bug fixes ...
  1236.             v2.11 10-21-91 - fixed base convert color saving and loading
  1237.                                from cfg file
  1238.             v3.0  11-11-91 - fixed pagedown problem of going past EOF on
  1239.                                display for files with a length approaching
  1240.                                that of the buffer size
  1241.                              added '%' into file indicator
  1242.                              you can now call up the ascii chart and
  1243.                                base convert from edit mode with
  1244.                                Alt+A, Alt+B
  1245.                              in edit mode, Pg Up/Dn now just goto first/
  1246.                                last line. column position is not changed
  1247.                              totally new help system  (yea!)
  1248.  
  1249.  
  1250.  
  1251.  ---  heXEdit  -------------------------------------  Page 18  ---
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.             v3.01 11-12-91 - fixed extra '%' char left when going from
  1261.                                100% to <100%
  1262.                              allow config file to take on same name as
  1263.                                executable; in case you rename XE.EXE
  1264.             v3.02 11-18-91 - fixed bug when executing from second level
  1265.                                or deeper sub-dir.
  1266.             v3.1  11-25-91 - fixed configuration file saving problem
  1267.                              added ALT+1 thru ALT+9 commands (goto
  1268.                                marked position)
  1269.                              restricted input length for base conversion
  1270.             v3.2  01-23-92 - added colorbox for color selection, instead
  1271.                                of entering numbers.
  1272.             v3.3  01-29-92 - XE.CFG file is now history. Color
  1273.                                information is saved in the executable
  1274.                              added cmd line options /C, /M, /?, ?, /H
  1275.                              slight (very) improvement in display speed
  1276.                              restore cursor from a Ctrl-Brk input
  1277.                              no more editing past the EOF
  1278.             v3.31 02-05-92 - fixed byte search problem with char case
  1279.             v3.32 02-07-92 - fixed byte search problem with char case
  1280.                                (this time for real. haste makes waste...)
  1281.             v3.33 02-23-92 - change Loadfile box to show files in the
  1282.                                current directory of a drive (previously
  1283.                                root dir)
  1284.             v3.4  04-04-92 - added ability to abort searching
  1285.                              update '%' into file indicator during search
  1286.                              added Alt+A for ASCII chart cmd from View mode
  1287.                              added Alt+B for Base convert cmd from View mode
  1288.                              cursor is positioned at location of last search
  1289.                                item when going to edit mode; if that search
  1290.                                item is visible on screen in same file
  1291.                              changed default colors a little
  1292.                              file list in Loadfile box is now sorted by name
  1293.                              fixed PgUp bug in Loadfile box
  1294.             v3.5  04-23-92 - implemented the Boyer-Moore search algorithm
  1295.                                for a definite improvement in search
  1296.                                speed
  1297.             v3.51 06-10-92 - fixed search routine bug
  1298.             v3.52 06-29-92 - ditto
  1299.             v3.53 08-10-92 - allow 'C' (change colors) command in mono;
  1300.                                so you can save the mono colors to XE.
  1301.             v3.54 12-10-92 - allow ESC while editing when only half of
  1302.                                a byte has been changed.
  1303.             v3.6  02-06-93 - show offset of cursor when editing
  1304.                              line wrap cursor when moving
  1305.             v3.61 04-03-93 - fix display for files > 9999999 bytes long
  1306.                              set highlight bar to last position in
  1307.                                Load file box
  1308.             v3.62 04-10-93 - fix runtime error when specifying a legal
  1309.                                but unused drive letter on cmd line.
  1310.             v3.63 04-19-93 - minor change to an included unit
  1311.             v3.64 04-22-93 - allow Hidden attribute bit change on a
  1312.                                subdirectory (via F7 in Loadfile box)
  1313.             v3.65 09-16-93 - fix dash/dots not showing up in display
  1314.  
  1315.  
  1316.  
  1317.  ---  heXEdit  -------------------------------------  Page 19  ---
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.             v4.00 12-9-93  - added ALT+D command, shell to DOS/other prog
  1327.                              added history function for searching and
  1328.                                goto offset command
  1329.                              editing cmd ESC, now prompts to discard
  1330.                                chgs or not
  1331.                              changed included unit so Loadfile box can
  1332.                                load 2500 files versus 300!
  1333.                              check for DOS v3.0+ otherwise exit
  1334.                              check available memory, exit if not enough
  1335.             v4.10 02-16-94 - filename first char search in Loadfile box
  1336.                              take out available memory check
  1337.                              XEOPT environment var for options
  1338.                              if offset display is octal and you're at an
  1339.                                offset > 777777777 octal, dsply +++++++++
  1340.                                for offset
  1341.             v4.11 03-23-94 - fix backspace key not backing up a line
  1342.             v4.12 07-12-94 - chg Loadfile box to check for remote drives,
  1343.                                config.sys LASTDRIVE value not used anymore
  1344.                              check for DOS v3.1+ otherwise exit
  1345.             v4.13 07-21-94 - display date/time in Loadfile box of dirs
  1346.                              display volumeid of local, fixed drives
  1347.                              surround drive letter with symbols
  1348.                                representing the device type
  1349.             v4.14 08-03-94 - fix vol label display bug in Loadfile box
  1350.             v4.15 08-07-94 - fix .HLP filename construction bug
  1351.             v4.16 08-13-94 - fix .HLP filename construction bug
  1352.             v4.2  11-05-94 - added cursor position highlighting in edit
  1353.                              fix history storage of 9 byte search seq
  1354.                              highlight byte of Goto cmd
  1355.             v4.3  11-27-94 - added 'F' command
  1356.                              allow color read from XE.EXE if it's read-only
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.   2. Trademark information
  1363.  
  1364.         'Turbo Pascal' and 'Turbo Debugger' are registered trademarks
  1365.           of Borland International, Inc.
  1366.  
  1367.         'PKLITE' is a registered trademark of PKWARE, Inc.
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  ---  heXEdit  -------------------------------------  Page 20  ---