home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / wp / psedit33.zip / PSEDIT.DOC < prev    next >
Text File  |  1993-08-14  |  43KB  |  911 lines

  1.                                     PSEDIT
  2.                               Binary File Editor
  3.                                  USER'S GUIDE
  4.  
  5.                   Copyright 1990, 1993 by Gary C. Crider and
  6.                                Parity Solutions
  7.                                
  8.  
  9.  
  10. TABLE OF CONTENTS:
  11.  
  12.         What is PSEDIT? .................................. 1.0
  13.         Getting started .................................. 2.0
  14.           The SET PSEDIT= Environment Variable ........... 2.1
  15.           The PSEDIT Command Line ........................ 2.2
  16.         Operational notes ................................ 3.0
  17.         The Keyboard and Display ......................... 4.0
  18.         Modifying Data ................................... 5.0
  19.           Filling a block of data ........................ 5.1
  20.         Deleting Data .................................... 6.0  
  21.         Inserting Data ................................... 7.0  
  22.         Using the clipboard (Cut, Paste, Copy) ........... 8.0
  23.         Locating Data .................................... 9.0
  24.           Go to a Position in the File ................... 9.1
  25.           Search for Data ................................ 9.2
  26.         Print the File ................................... 10.0
  27.         Save the File .................................... 11.0
  28.         Hex/Decimal Conversions and Calculations.......... 12.0
  29.         Exiting PSEDIT ................................... 13.0
  30.         Help ............................................. 14.0
  31.         A Useful Example - 
  32.           Modification of DOS 5's EDIT ................... 15.0
  33.         Installation ..................................... Appendix A
  34.         Disclaimer ....................................... Appendix B
  35.         Support .......................................... Appendix C
  36.         Registration ..................................... Appendix D
  37.  
  38.  
  39. 1.0 What Is PSEDIT?
  40.  
  41.    One thing most of us learned early while working on our first PC
  42. was that EDLIN, while useful, stank (stunk?)... was malodorous as an editor 
  43. of text files.  Soon there were hundreds of full screen text editors 
  44. available everywhere.  Even Microsoft finally came around and included EDIT 
  45. in DOS 5 to get us away from EDLIN.
  46.  
  47.    An early lesson that most who aspire to be power users learn is that not
  48. all changes we desire to make are in text files.  Sooner or later we end
  49. up patching an executable program, database, or strange format file that
  50. text editors will not handle.  Enter DEBUG.  Just as EDLIN was a pain for
  51. editing text files, DEBUG is a pain for editing binary files.  Strangely,
  52. few people have jumped out with binary editors and some of the few I have 
  53. seen are not much better than DEBUG.  
  54.  
  55.    PSEDIT is a very easy-to-use full screen editor for binary (or text) 
  56. files.  You simply type over the hex or ASCII data much as you would with
  57. any text editor.  PSEDIT ensures that you enter hex characters (0-9 and A-F)
  58. while you are in hex entry mode.  You will be able to see the hex and ASCII
  59. representations at all times whether you are editing in hex or ASCII.  
  60.  
  61.    Using PSEDIT is so intuitive, I don't know why I'm writing this documen-
  62. tation or why you are reading it.  Perhaps we both like to move cautiously.
  63.  
  64.    You see a full screen of data at all times, not just a few bytes.  Paging
  65. through the file is as easy as hitting PgUp and PgDn, you don't have to
  66. enter hex displacements to get to the next page.
  67.  
  68.    I think you'll find, as we have at a Fortune 100 company (my day job),
  69. that PSEDIT becomes one of the handiest tools you have.  You will use it
  70. much more than you now expect that you will.
  71.  
  72.    PSEDIT automatically detects and uses any available LIM 4.0 EMS expanded
  73. memory.  This allows very large files to be edited.
  74.  
  75.    PSEDIT was formerly distributed under the name BEDIT.
  76.  
  77.  
  78. 2.0 Getting Started
  79.  
  80. 2.1 The SET PSEDIT= Environment Variable
  81.  
  82.  
  83.    PSEDIT uses an environment variable and command line switches to customize
  84. its environment.  When PSEDIT is started with no switches and no environment
  85. variables, the following defaults apply:
  86.  
  87.   - EMS memory is used only if the file being edited is too large to load
  88.     in conventional memory.
  89.  
  90.   - Color display is assumed.
  91.  
  92.   - International characters are not displayed in the ASCII portion of the
  93.     edit screen.  They can only be entered in hex and cannot be entered in
  94.     an ASCII search string.
  95.  
  96.   - Video writes to the edit window are direct to video memory.  CGA and MDA 
  97.     are unsupported, since it is assumed that video memory starts at 
  98.     B800:0000.
  99.  
  100.    Each of these can be changed.  Since a user will normally want to use
  101. the same options over and over, the best way to change them is with the
  102. SET PSEDIT= command placed in AUTOEXEC.BAT.  The following parameters are
  103. allowed in the SET PSEDIT= command:
  104.  
  105.    EMS -  This forces the program to be edited to be loaded in expanded
  106.           memory (LIM 4.0 EMS specification).  The primary use for this 
  107.           parameter is for testing changes made to the PSEDIT program.  
  108.           Most users will want to use the default.  EMS may be specified
  109.           to allow additioinal file expansion with insertions.  Since you 
  110.           are limited by the amount of conventional or EMS memory available,
  111.           you may have access to more EMS memory than conventional memory.
  112.  
  113.    MONO - Displays the screens in monochrome.  If you use a Monochrome
  114.           Display Adapter instead of a VGA adapter, you will need to
  115.           also specify BIOS.
  116.  
  117.    INTL - Allows display of the ASCII international character set (128-
  118.           168).  It also allows international characters to be input while
  119.           editing in ASCII mode and in ASCII search strings.
  120.  
  121.    GRPH - Allows display of the ASCII international character set (128-
  122.           168) plus graphics characters (169-254).  
  123.  
  124.    BIOS - Uses the RAM BIOS interrupts to write to the edit window.  This
  125.           allows use of MDA, CGA and other non-VGA adapters.  It may also
  126.           be required for some extended text modes, depending on the
  127.           video adapter being used.  Specify BIOS if you expirience any
  128.           problems with the display of data in the edit window.
  129.  
  130.    To specify combinations of these parameters, seperate them with commas.
  131. Example:
  132.  
  133.    SET PSEDIT=MONO,BIOS,INTL
  134.  
  135.    Place the set command in your AUTOEXEC.BAT file so that it will always
  136. be present in your environment.  If you encounter an "Out of environment
  137. space" message, you can increase you environment size by specifying a new
  138. amount in your CONFIG.SYS file with the following statement"
  139.  
  140.    SHELL=c:\command.com /P /E:nnnn
  141.  
  142.    The nnnn should be replaced with the new environment space required.  512
  143. will give you quite a bit of space to work with.  If you use Microsoft 
  144. Windows 3.1, a value of 1024 or higher is recommended.
  145.    
  146.    For compatibility with BEDIT, the BEDIT= environment variable is also 
  147. accepted.
  148.  
  149.  
  150. 2.2 The PSEDIT Command Line
  151.  
  152.  
  153.    Format: PSEDIT [[path]filename] [/N] [/B] [/I] [/V /?] 
  154.  
  155.    The filename is the file name of the file that you want to edit.  PSEDIT 
  156. does not make an automatic backup, so back it up if you think there could    
  157. be problems.  You will be given a chance to change the file name before you
  158. save it.  The path is required if a file is specified and is not in the 
  159. current directory.  
  160.  
  161.    If no file name is specified, a pick list is displayed of all of the 
  162. files in the current directory.  To select a file, use the arrow keys to
  163. move the selection bar to the file you want, and press enter.
  164.    
  165.    /? Display command line help prompt.
  166.    
  167.    /N will cause PSEDIT to ignore the EMS parameter if it was specified in
  168.       the SET PSEDIT= command.  No attempt will be made to use EMS memory.
  169.  
  170.    /B reverses the effect of the MONO parameter of the SET PSEDIT= command.
  171.       If you have specified MONO, /B forces color display.  If you have
  172.       not specified MONO, back and white (monochrome) display is forced.
  173.  
  174.    /I reverses the effect of the INTL parameter of the SET PSEDIT= command.
  175.       If you have specified INTL, /I will cause international charcters to
  176.       not be recognized.  If you have not specified INTL, /I forces recog-
  177.       nition of international characters.
  178.  
  179.    /G reverses the effect of the GRPH parameter of the SET PSEDIT= command.
  180.       If you have specified GRPH, /G will cause international and graphics 
  181.       charcters to not be recognized.  If you have not specified GRPH, /G 
  182.       forces recognition of international and graphics characters.
  183.  
  184.    /V reverses the effect of the BIOS parameter of the SET PSEDIT= command.
  185.       If you have specified BIOS, /V will force direct video memory writes
  186.       for the edit window.  If you have not specified BIOS, /V will force
  187.       BIOS writes.
  188.  
  189.  
  190.    Brackets ([]) indicate optional parameters.  Do not include the brackets
  191. in the command line.
  192.  
  193.    
  194.  
  195. 3.0 Operational Notes   
  196.  
  197.    It bears repeating at this point that PSEDIT DOES NOT MAKE AN AUTOMATIC
  198. BACKUP of the edited file.  Since much of the usefulness of PSEDIT is to just
  199. view or print the contents of a binary file, I did not want PSEDIT cluttering
  200. up my directories with backup files.  You can, however, change the name 
  201. at SAVE time.
  202.  
  203.    If you intend to modify a file with PSEDIT, I highly recommend making
  204. a backup file first or saving with a different name for obvious reasons.  
  205. Since PSEDIT will allow you to change any file in any way, it is obviously 
  206. a very dangerous weapon in the hands of the unskilled or careless as well 
  207. as a very powerful tool in the hands of the skilled and careful.  Please 
  208. be careful!
  209.  
  210.    PSEDIT reads the entire file into memory before any edits are performed.
  211. All changes are made only to the copy in memory until a SAVE is done.  If
  212. you have LIM 4.0 compatible EMS memory, you are limited in editable file size
  213. to the amount of free expanded memory.  If you have no expanded memory, or
  214. use the /N parameter, the file is loaded into conventional memory.  Depending
  215. on your memory configuration, you should be able to load a file of 400-500 
  216. Kbytes without the use of expanded memory.  If your available expanded
  217. memory is less than your available conventional memory, use the /N option
  218. to load larger files.  Usually there is more expanded memory than conven-
  219. tional, so excluding the /N option allows larger files to load.
  220.  
  221.    PSEDIT must have at least one byte in its data buffer to function,
  222. therefore, if you load a file with a length of 0, or delete all bytes in a
  223. file, one byte will show up on the screen and its value will be x00.
  224.  
  225.    PSEDIT has three different display modes and three different ways of 
  226. selecting the one you prefer.  The normal default mode is to display U.S. 
  227. English characters and punctuation.  The second adds international characters 
  228. and the third adds graphics characters.  If you wish to change the default, 
  229. use the SET command described in the "Getting Started" section.  If you want 
  230. to change the initial mode for a single execution of PSEDIT, use the command 
  231. line switches /I or /G as described under "Getting Started."  If you want to 
  232. change the characters displayed after you have already loaded PSEDIT, use the 
  233. ALT-I and ALT-G toggles as described below under "The Keyboard and Display."
  234.  
  235.   The reason the U.S. English letters and puctuation were selected as the 
  236. default is first because most of the PSEDIT users are in the U.S., and
  237. second, because when most users refer to the ASCII portion, they are looking 
  238. for a particular text string or phrase.  Not displaying the graphics and
  239. international characters makes the phrase or word easier to spot.  If you
  240. know exactly what you are looking for, use the search feature to locate it
  241. quickly.  International users should not feel slighted, because you can 
  242. easily change the default to display international characters.  Unfortunately,
  243. you must display all international characters, not just the ones used in
  244. your language.
  245.  
  246.  
  247.  
  248. 4.0 The Keyboard and Display
  249.  
  250.    The top line of the display shows the name, size, date and time of the
  251. file being edited.  It also contains the status of EMS memory usage and
  252. shows whether coses-sensitivity is set on or off.  There is also an area
  253. that will taggle between "HEX" and "ASCII" depending on which edit mode
  254. you are in.  The bottom line contains a quick reference of function keys
  255. and their usage.
  256.  
  257.    Down the left side of the display is the offset from the start of the   
  258. file to the first byte displayed on that line.  The offset is in hex.   
  259.  
  260.   HINT: The easy way to see where your cursor is currently located is to
  261. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset on the
  262. left of the screen.  The hex/decimal conversion windows will pop up with 
  263. the current ursor location displayed in the operand field.  ALT-D displays
  264. the offset in Decimal, ALT-H displays it in hex.
  265.  
  266.    There are two modes of editing in PSEDIT.  When you first load a file, the
  267. screen appears with both hex data and its ASCII representation displayed in 
  268. separate sections of the screen.  The cursor is initially placed in the hex 
  269. portion of the screen for editing in hex.  The character (represented by two 
  270. hex digits) at the cursor location appears red on color monitors.  The same 
  271. character on the ASCII (right) side will be light cyan.  All other data 
  272. characters are yellow.  As the cursor moves, you will see the light cyan 
  273. highlighting on the ASCII display move with the cursor and red letters of the 
  274. hex display.  Pressing TAB places the cursor in the ASCII portion and the 
  275. display at the cursor becomes red.  The corresponding position in the hex 
  276. data becomes light cyan.  TAB toggles the cursor back and forth between the 
  277. two editing areas.
  278.  
  279.    The ASCII display does not display every displayable character, but only
  280. letters and numbers and the more common punctuation symbols that are common
  281. to most printers.  All other characters appear as periods.  You can only 
  282. enter these characters on the ASCII side.  To enter exotic characters you 
  283. must use the hex representation on the hex side.  If a blank appears on the
  284. ASCII display, it is  because there is a true blank (hex 20) at that position.
  285.  
  286.    The following keys function as shown during editing:
  287.  
  288.    Page Down    - Display the next page of data.
  289.    Page Up      - Display the previous page of data.
  290.    Home         - Position the cursor at the start of the file.
  291.    End          - Position the cursor at the end of the file.
  292.    Down Arrow   - Move the cursor down one line.
  293.    Up Arrow     - Move the cursor up one line.
  294.    Right Arrow  - Move the cursor right one byte.  If at the end of a line, 
  295.                   move to the first byte of next line.
  296.    Left Arrow   - Move the cursor left one byte.  If at the start of a line,
  297.                   move to the last byte of the previous line.
  298.    Enter        - Same as right arrow.
  299.    Tab          - Swap the edit cursor between hex and ASCII modes.
  300.    Back Tab     - Clears the byte.  You must then type something in the byte
  301.                   before the cursor can be moved.
  302.    Insert       - Insert one byte.  Everything beyond this byte is shifted one 
  303.                   position and a hex 00 byte is inserted at the cursor.
  304.    Delete       - Delete one byte at the cursor.
  305.  
  306.    Function keys:
  307.  
  308.    F1     - Display the help screen.
  309.    F2     - Save any changes to the file on disk.
  310.    F3     - Insert a specified number of bytes at cursor.
  311.    F4     - Delete a specified number of bytes at cursor.
  312.    F5     - Move the cursor to a specified address within the file.
  313.    F6     - Print the file to LPT1:.  It appears in basically the same format
  314.             as displayed.
  315.    F7     - Toggle case-sensitivity for ASCII string searches.
  316.    F8     - Specify a search argument and locate the first occurrence of it in
  317.             the file.
  318.    F9     - Locate the next occurrence of the search argument.
  319.    F10    - Display status of clipboard and blocked data.
  320.    
  321.    
  322.    Alt keys:
  323.  
  324.    ALT-C  - Hex/decimal calulator 
  325.    ALT-D  - Decimal to hex conversion
  326.    ALT-H  - Hex to Decimal conversion
  327.    ALT-X  - Exit PSEDIT.
  328.    ALT-V  - Toggle between 25-line and 43/50 line display modes.
  329.    ALT-F6 - Print an address range.
  330.    ALT-I  - Toggle displaying of international characters.
  331.    ALT-G  - Toggle displaying of international and graphics characters.
  332.    
  333.    Block keys:
  334.  
  335.    CTL-K B - Mark the start of a block to be deleted.
  336.    CTL-K K - Mark the end of a block to be deleted.
  337.    CTL-K H - Unmark a currently marked block.
  338.    CTL-K F - Fill a block with a given value.
  339.  
  340.    Clipboard function keys:
  341.  
  342.    CTL-INS  - Copy blocked data to clipboard.
  343.    CTL-DEL  - Cut bloacked data from the file and into the clipboard.
  344.    SHFT-INS - Paste clipboard contents at current cusor location.  The
  345.               contents are inserted.  Existing data is not overlaid.
  346.  
  347.    ESCAPE - Exit PSEDIT.
  348.  
  349.  
  350.  
  351. 5.0 Modifying Data
  352.  
  353.    Modifying data is very simple, just type over it.  Use the TAB key to 
  354. select the hex or ASCII area.  A MODE indicator on the top line will change 
  355. to indicate whether you are in hex or ASCII edit mode.  When typing in the 
  356. hex area, only valid hex characters, 0-9 and A-F are allowed and upper case 
  357. is forced.  When entering data in the ASCII portion, only common printable 
  358. characters are allowed and upper or lower case may be used.
  359.  
  360.  
  361. 5.1 Filling a block of data   
  362.  
  363.    You may mark a block of data (see Deleting Data below) and then press
  364. CTL-K F.  You will be prompted for a fill value (in HEX or ASCII depending 
  365. on your edit mode) to overlay the contents of the blocked data. You may press 
  366. ESCAPE at the prompt to abort the fill operation.  Once you enter the value 
  367. and press enter, the blocked data is filled with the value you specified.
  368.  
  369.  
  370. 6.0 Deleting Data
  371.  
  372.    First place the cursor on the first byte of the data that you want to 
  373. delete.  Pressing the DELETE key deletes one byte of data at this position.
  374. Press DELETE repeatedly to delete several bytes.  If a large block needs to
  375. be deleted, press the F4 key and reply to the prompt with the number of bytes 
  376. (up to 32,767) you want to delete starting with the byte at the cursor.
  377.  
  378.    There is also a facility to mark a block and then delete it.  Press 
  379. CTL-K B to mark the first byte of a block, then press CTL-K K to mark the
  380. last byte of a block.  Then press DELETE or F4 to delete the block.  You
  381. can unmark a block by pressing CTL-K H.  You can also change the start or 
  382. end of the block at any time before the block is deleted or unmarked.  These 
  383. keys conform to WordStar-type conventions used in many text editors and word 
  384. processors today.  You can mark and delete blocks up to 32,767 bytes long.
  385.  
  386.    PSEDIT cannot handle a file with no data.  If you delete all bytes in the
  387. file, PSEDIT will display a file with one byte of x00.
  388.  
  389.  
  390. 7.0 Inserting Data
  391.  
  392.    PSEDIT, rather than using an insert mode, lets you insert bytes of binary 
  393. zeros, hex 00, into the file.  You can then type over the inserted bytes with 
  394. the data that you require.
  395.  
  396.    Place the cursor at the byte where you want the data inserted.  The data
  397. is inserted BEFORE the byte at the cursor.  Pressing the INSERT key inserts 
  398. one byte at a time.  If a large block needs to be inserted, press F3 and 
  399. specify the number of bytes you want inserted up to 32,767.  Once the null 
  400. bytes appear, type over them if necessary.
  401.  
  402.    In order to add bytes to the end of the file, press END to go to the last
  403. byte of the file then press the right arrow.  Each press of the right arrow
  404. adds a byte to the file.  To enter a large block at the end of the file,
  405. press the right arrow once, then press F3 and specify the number of bytes
  406. needed less one (since you already added one when you pressed the right
  407. arrow).
  408.  
  409.    You can insert data from the clipboard by placing the cursor where you
  410. want the inserted data to begin and pressing SHIFT-INSERT.  If the clipboard
  411. is empty, nothing will happen.  Otherwise, the new data will appear inserted
  412. at the cursor location and marked as a block.  This is so that if you made a
  413. mistake and placed it improperly, you can just press DELETE to delete it,
  414. reposition your cursor and hit SHIFT-INSERT again to reinsert it.  Press
  415. CTL-K H to unmark the block.  The data remains in the clipboard, so it can 
  416. be inserted at multiple locations.
  417.  
  418.  
  419.  
  420. 8.0 Using the Clipboard (Cut, Paste, Copy)
  421.  
  422.    PSEDIT contains a 4k clipboard for use in cutting, pasting and copying
  423. marked blocks. The clipboard uses CUA keyboard conventions.
  424.  
  425.    First, mark a block of data (see Deleteing Data for instructions on
  426. marking blocks), then press CTRL-INSERT to copy the block to the clipboard.
  427. Press SHIFT-DELETE if you want to copy the block to the keyboard and 
  428. delete it from its current position in the file (Cut).
  429.  
  430.    Once you have cut or copied data into the clipboard, you may paste 
  431. (insert) it anywhere in the file by using SHIFT-INSERT.  See Inserting Data
  432. for details on using the paste feature.
  433.  
  434.    If you try to cut or copy a block that is greater than 4k (4096 bytes),
  435. a message window will pop up and the current block marks must be adjusted
  436. to select only 4k or less at a time.
  437.   
  438.  
  439.  
  440. 9.0 Locating Data
  441.  
  442.    There are basically three ways to move the cursor to an area you want
  443. to edit.
  444.  
  445.    First you can use Page Down and Page Up to visually look for that area you
  446. want.  Primitive, but effective.
  447.  
  448.    Second, if you know the offset into the program of the area you want to 
  449. modify, press F5 and type the offset in hex.  
  450.  
  451.    The third method is to let the computer search for a known byte config-
  452. uration.
  453.  
  454.  
  455.  
  456. 9.1 Go to a Position in the File
  457.  
  458.    An offset or displacement is measured from the start of the file.  The
  459. first byte is offset 0, the second is 1, etc.  When you press F5, you are
  460. prompted for an offset which you provide in hex.  The cursor is then placed 
  461. at that address and display is updated to show the data at the cursor.
  462.  
  463.    This method is often used in applying documented patches supplied by a 
  464. software vendor.
  465.  
  466.  
  467.  
  468. 9.2 Search for Data
  469.  
  470.    Pressing F8 pops up a dialogue box that requests entry of a search argument.
  471. After supplying this argument, the cursor is positioned to the first 
  472. occurrence of that value in the file.  If it is not found, the cursor will 
  473. appear on the last byte of the file.  If a first occurrence is found, pressing
  474. F9 searches for the next occurrence.  If a second is found, pressing F9 again
  475. searches for the third occurrence, and so on.
  476.  
  477.    If the cursor is in the hex editing area, you will be prompted for up to
  478. 16 hex bytes of search argument (32 hex digits).  When the cursor is in
  479. the ASCII editing area, you may enter up to 32 ASCII characters for a search
  480. argument.  Admittedly the search arguments are small, but I have found that
  481. when editing binary files, you are generally not looking for long strings.
  482.  
  483.    Hex data is normally entered in sets of two hex digits (nibbles) since it
  484. takes two hex digits to represent one byte.  If you enter an odd number of hex 
  485. digits, a zero nibble is prepended to the argument.  For example, if you
  486. enter 18A, the resulting two bytes that are located are 01 8A.  
  487.  
  488.   No byte swapping is ever done to accommodate the PC's low-high storage 
  489. scheme of integer data.  So if you are looking for an integer value of 
  490. 1000 (decimal), hex 3E8, which is stored as hex E8 03, the search argument 
  491. you would provide is E803.  If you don't have a clue what this means, you 
  492. probably don't need to be concerned about using PSEDIT in this manner.
  493.  
  494.   The F7 key is used to enable or disable case-sensitive searches when in
  495. ASCII character mode.  The current state is shown on the top line of the 
  496. display.  If ON, upper/lower case letters must match exactly.  If OFF,
  497. upper and lower case letters are equivalent.  The CASE mode has no effect
  498. on hex mode searches.
  499.  
  500.  
  501.  
  502. 10.0 Print the File
  503.  
  504.    Printing the file is easy.  You just press F6 and a window will pop up
  505. that tells you how many pages will be printed.  You may abort at this time
  506. by pressing ESCAPE or replying N to the "Continue? (Y/N)" prompt.  As pages
  507. are sent to the printer, the page number will be displayed.  You may press
  508. any key to cancel printing at the end of the current page.
  509.  
  510.    The output is sent to standard print (PRN).  The format is side-by-side 
  511. hex/ASCII like that displayed on the screen with offset addresses (dis-
  512. placements) at the start of each line.  880 (hex 370) bytes are printed on 
  513. each page.  The pages are numbered and the file name, size, date and time 
  514. appear at the beginning of each page.
  515.  
  516.    ALT-F6 allows you to supply a starting and ending address range to print.  
  517. The actual pages printed will probably not start and end with the adresses 
  518. you provided.  Rather the pages (as if you had printed the entire file) that 
  519. contain your starting address through your ending address will be the only
  520. pages printed.
  521.  
  522.    
  523.  
  524. 11.0 Saving the File
  525.  
  526.    Prior to pressing F2 to save the file, all modifications are only done in 
  527. memory.  F2 writes the image in memory over the file that was originally 
  528. loaded, and the changes become permanent.
  529.  
  530.    You may, however, change the file name at save time.  A dialogue box will
  531. appear with the current file name.  Accept it as is by pressing ENTER or
  532. modify it first.
  533.  
  534.    If the saved file name already exists you will be asked for verification
  535. before overwriting.
  536.  
  537.  
  538. 12.0 Hex/Decimal Conversions and Calculations
  539.  
  540.    Pressing ALT-D (Decimal-to-hex) pops up a window into which up to eight-
  541. digit decimal numbers can be entered.  Pressing ENTER displays the results 
  542. of converting this number to hexadecimal.  Pressing ESC exits the window.
  543. Initially, the current cursor position is displayed in the operand field.
  544.  
  545.    Pressing ALT-H (Hex-to-Decimal) pops up a window into which up to eight-
  546. digit hexadecimal numbers can be entered.  Pressing ENTER displays the 
  547. results of converting this number to decimal.  Pressing ESC exits the window.
  548. Initially, the current cursor position is displayed in the operand field.
  549.  
  550.    ALT-C pops up a hex/decimal calulator which will add, subtract, multiply 
  551. or divide two hex, decimal or mixed values.  The result is displayed in both\
  552. hex and decimal.  When entering the values to be calculated, preceed hex 
  553. values with an X (i.e. X31A0) and preceed decimal values with a D (i.e. 
  554. D4095).  Enter a plus (+) or minus (-) sign in the operator field.  Press 
  555. CTRL-ENTER when ready to calulate (or ENTER at the operator field).
  556.  
  557.    Since it is designed primarily to help you figure diplacements within a
  558. program, the calculator operates on unsigned long (4-byte) interger values.
  559. Thus decimal points and negative numbers are not allowed.  If you subtract a 
  560. number from a smaller number, the result will be the 32-bit two's compliment
  561. of the negative result, usually a very high number.  For instance, if you 
  562. subtract 1 from 0, the result will be 4,294,967,295, the maximum for an
  563. unsigned long interger.  If you compute a number with results higher than
  564. the above number, the results will be innacurate.  Let's hope you are not
  565. trying to edit any 4 Gb files!
  566.  
  567.   When you first invoke the calculator, the hex diplacement of the current
  568. cursor location will be in the first operand.  This facilitates calculating
  569. displacements forward or backward from the cursor.  You can change the value
  570. to anything you like.
  571.  
  572.   HINT: The easy way to see where your cursor is currently located is to
  573. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset 
  574. on the left of the screen.  The hex/decimal conversion windows will pop up 
  575. with the current cursor location displayed in the operand field.  ALT-D 
  576. displays the offset in Decimal, ALT-H displays it in hex.
  577.  
  578.  
  579. 13.0 Exiting PSEDIT
  580.  
  581.    To quit PSEDIT, press ESC from the main edit screen.  You will see a 
  582. prompt: "Exit Editor? (Y/N)".  Any response other than Y or y will return you 
  583. to the point you were when you pressed ESC.  A Y response returns you to DOS 
  584. if PSEDIT was invoked with a file name and to the file name pick list if 
  585. PSEDIT was invoked without a file name argument.  To exit from the pick list 
  586. screen to DOS, press ESC.  Once you exit to DOS or the pick list, any unsaved
  587. modifications in the editor are lost.
  588.  
  589.    If you wish to exit PSEDIT without having to reply to the prompt, press
  590. ALT-X for a quick exit.  Any modifications since the last save are lost.
  591.  
  592.  
  593. 14.0 Help
  594.  
  595.    Pressing F1 pops up a help screen describing the editing and function keys.
  596. Pressing ESCAPE (or any key when last page is displayed) removes the help
  597. window and returns you to the editor.  Page Down and Page Up can be used to 
  598. move between help pages.
  599.  
  600.  
  601.  
  602. 15.0 A Useful Example - Modification of DOS 5's EDIT
  603.  
  604.    I prefer DOS 5's EDIT command by leaps and bounds over the EDLIN of
  605. previous DOSes, but there is one thing I especially don't like about it.
  606. When you select File/Open, it comes up with a default file list specification
  607. of *.TXT, like that is the only extension ever used for ASCII text files.  I
  608. would prefer *.* and let me choose from all of my files.  After reviewing
  609. all of the options, it appeared to me that there was no way to set this
  610. value to *.*.
  611.  
  612.    My next thought is that since there doesn't appear to be any type of
  613. configuration file for EDIT, the *.TXT string must be in the program, so
  614. I'll just pull out my trusty PSEDIT and zap it to *.*.  Let's do it.
  615.  
  616.    Go to your directory where you keep DOS (usually C:\DOS).  Type PSEDIT
  617. EDIT.COM.  Since we know we are looking for an ASCII string of *.TXT, press
  618. TAB to swap the cursor to the ASCII area and press F8 to search.  Enter
  619. *.TXT and press ENTER.  You now find that your cursor is positioned on the 
  620. last byte of the file.  This means it didn't find the string we were
  621. looking for.  Strange.
  622.  
  623.    But look! Right above our cursor are some messages that EDIT.COM displays.
  624. One of them reads, "Can not find file QBASIC.EXE."  Oh yeah, I read somewhere
  625. that the EDIT editor with DOS 5 was a version of the QBASIC editor.  Let's
  626. press ESCAPE, answer 'Y' and get back to the DOS prompt.  Now let's enter
  627. PSEDIT QBASIC.EXE.
  628.  
  629.    Again let's go the ASCII area with TAB and search for *.TXT with F8.  
  630. Bingo! We found it.  
  631.    
  632.    In my copy of DOS 5.0's QBASIC.EXE, I am now at a displacement of hex 
  633. 3BCCA into the program and the cursor is positioned on the * of string *.TXT.  
  634. Hit the right arrow twice to position the cursor on the first T.  Type an 
  635. asterisk (*).  The string now shows *.*XT and the cursor is on the X.
  636. Lets change the X and T to hex 00s, which in most languages is used to 
  637. terminate a string.  Since we can't enter a binary zero field in the ASCII
  638. area, press TAB to switch the cursor back to the hex area.  Now type
  639. four 0s.  As you can see you have now changed the XT characters from
  640. hex 54 58 (the hex representation of X and T) to hex 00 00.
  641.  
  642.    This is what we wanted to do, so now let's save the file by pressing
  643. F2.  Since the file was not backed up beforehand, type in a new file name
  644. (QBASIC.1) just to make sure it works before we destroy the original. Exit 
  645. to DOS by pressing ESCAPE and Y.  Rename the original to QBASIC.BAK and 
  646. QBASIC.1 to QBASIC.EXE.  Now type EDIT and go to the File/Open screen.  Lo 
  647. and behold!  It now reads *.* and all of the files in the current directory 
  648. are displayed in the pick list.
  649.  
  650.    You can go delete QBASIC.BAK now.
  651.  
  652.  
  653.  
  654. APPENDIX A
  655.  
  656. Installation
  657.  
  658.     PSEDIT is distributed in a ZIP file called PSEDIT.ZIP.  It contains the
  659. following files:
  660.  
  661.         PSEDIT.EXE         The executable file for PSEDIT.
  662.         PSEDIT.DOC         The documentation file.
  663.         PSEDIT.HST         Modification descriptions for previous versions
  664.                            of PSEDIT. 
  665.         PSEDIT.Vnn         Modification descriptions for current version nn.
  666.         PRODUCTS.DOC       A description of other Parity Solutions products
  667.                            available on CompuServe and ZiffNet.
  668.  
  669.     For best results, unzip the file into a directory on your PATH.  If you
  670. don't use a directory in your path, you will have to designate the directory
  671. containing PSEDIT.EXE when executing the program.
  672.  
  673.     If you have a utility directory that is on your PATH, this is an excellent
  674. location for PSEDIT.  An example installation would be:
  675.  
  676.     C:
  677.     CD \UTIL
  678.     COPY [path]PSEDIT.ZIP
  679.     PKUNZIP PSEDIT
  680.     DEL PSEDIT.ZIP
  681.  
  682.     The PKUNZIP program is by PKWARE, Inc. and is available in many CompuServe
  683. forums under the file name of PKZ110.EXE or PK204x.EXE.  Since you are reading 
  684. this doc file, you have obviously already managed to unzip the distribution 
  685. file.  If it is not currently in your path, simply copy all of the files to a 
  686. directory in your path.  Keep the PSEDIT.ZIP file anywhere you like, but give 
  687. plenty of copies, as is, to your friends.  If you register PSEDIT, you are not 
  688. licensed to give your serial number to anybody without first removing the 
  689. serialization from your copy.
  690.  
  691.  
  692.  
  693.  
  694. APPENDIX B
  695.  
  696.  
  697. Disclaimer
  698.  
  699. BECAUSE OF THE DIVERSE NATURE OF COMPUTER EQUIPMENT AND EXPERTISE OF USERS,
  700. PARITY SOLUTIONS AND GARY C. CRIDER MAKE NO WARRANTY ON THE PSEDIT PROGRAM
  701. WHATSOEVER, EXPRESS OR IMPLIED.  THE USER ASSUMES ALL RISK OF DAMAGE TO DATA 
  702. OR EQUIPMENT RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OR MISUSE OF THIS 
  703. PROGRAM PRODUCT.  THE USER MUST BE AWARE THAT USING PSEDIT TO MAKE ALTERATIONS 
  704. TO PROGRAMS OR DATA CAN RENDER THAT PROGRAM OR DATA USELESS.
  705.  
  706. USERS ARE ADVISED TO TEST MODIFICATIONS MADE WITH PSEDIT THOROUGHLY ON FILES 
  707. FOR WHICH A BACKUP EXITS.  ANY LIABILITY OF THE AUTHOR OR PARITY SOLUTIONS IS 
  708. LIMITED TO REPLACEMENT OR REFUND OF THE REGISTRATION FEE.
  709.  
  710.  
  711.  
  712.  
  713. APPENDIX C
  714.  
  715.  
  716. Support
  717.  
  718.     I have tried to test the program to the fullest, but I am limited as to
  719. systems and configurations with which to test.  I have been programming for 18
  720. years and the one thing I know for sure is that bug free programs are very few
  721. and far between.  I can only promise to support the program to the best of my
  722. ability and provide fixes as expeditiously as possible.  PSEDIT has been used
  723. at my home and work site extensively for several years and has proven to be a
  724. reliable tool.
  725.  
  726.     Anyone can report problems and suggest changes.  Registered users get top
  727. priority in resolving their problems.  There are three ways you can report
  728. problems.  The preferred method is to contact me through CIS mail (not forum
  729. messages).  My CIS ID is 71760,3413.  You can also write me at:
  730.  
  731.    Gary C. Crider
  732.    Parity Solutions
  733.    1105 Burgess Court
  734.    Arlington, TX 76015
  735.  
  736.    After 10/31/93 we will move to:
  737.  
  738.    1903 Pavia Court
  739.    Arlington, TX 76006
  740.  
  741.     The last method is to phone (817) 467-7818.  Since I am the sole technical
  742. support and the line is also used for my network consulting business, it is
  743. often hard to get through to me.  Please call and leave a message between 7:30
  744. am and 5:30 pm Central time.
  745.  
  746.     No matter which method you use, please give a brief description of your
  747. problem, the relaese number of your program, your registration serial number 
  748. if you are registered, and your phone number.  If I need more information, I 
  749. will contact you as soon as I can.  When I have a solution, I will contact 
  750. you however you prefer.
  751.  
  752.     I work full time, have a consulting business to run in my spare time and
  753. write programs instead of sleeping.  So please be a little patient with me.
  754.  
  755.     Program updates are available on CompuServe or can be requested from us
  756. for a $5 shipping and handling charge.  Add $1 for international shipping
  757. outside the U.S., Canada and Mexico.  A distribution disk of all Parity 
  758. Solutions products will be sent to you.  Specify disk size and format.
  759.  
  760.  
  761.  
  762. APPENDIX D
  763.  
  764.  
  765. Registration
  766.  
  767.  
  768.     I begin with an apology.  I hate programs that in any way inhibit func-
  769. tionality or performance for the shareware version.  But when it came down to
  770. feeding the family and paying the bills, I had a change of heart and inserted
  771. a pesky notice that pops up at the beginning and gets on your nerves.  I
  772. chose this approach above that of limited functionality.  The program's full
  773. capabilities are available for you to evaluate before you invest your hard-
  774. earned money.
  775.  
  776.     Registered users will receive a unique serial number and instructions on
  777. how to serialize the program.  Serialization can be re-applied to updated
  778. versions and in no way hinders your use of the program.  You can compress or
  779. decompress the program with no effect (LZEXE or PKLITE).  I use Fabrice
  780. Bellard's LZEXE program on PSEDIT.EXE before distribution.
  781.  
  782.     As a registered user, you will be able to update without re-registration
  783. or additional fees.
  784.  
  785.     To register your copy, please send $24 US ($95 per file server on LANs) 
  786. check or money order (sorry, no credit cards yet) to:
  787.  
  788.    Gary C. Crider
  789.    Parity Solutions
  790.    1105 Burgess Court
  791.    Arlington, TX 76015
  792.  
  793.    After 10/31/93 use:
  794.  
  795.    1903 Pavia Court
  796.    Arlington, TX 76006
  797.  
  798.     Purchase orders for amounts of $72 or more are accepted from U.S. or
  799. Canadian companies and institutions.
  800.  
  801.     Add $1 to total order for postage outside the U.S., Canada and Mexico.
  802.     
  803.     Or, you can register single-use licenses online quickly and easily in 
  804. Compuserve.  Simply GO SWREG and register ID #751.  Your registration will be 
  805. added to your Compuserve bill.  International exchange was never easier, and
  806. you save the $1 postage charge.
  807.  
  808.     If you send your CIS ID or register via SWREG, your registration will be 
  809. sent to you via CIS mail, along with instructions on how to serialize your copy 
  810. of PSEDIT.  This usually involves one day or less turnaround.
  811.  
  812.     Program diskettes are not ormally shipped.  Normal distribution is via 
  813. CompuServe.  If you need a diskette, please see the instructions under Support 
  814. above.  You will receive a serial number and instructions for serializing your 
  815. copy of the program.
  816.     
  817.     Each license gives you or your company a single use permit for PSEDIT. It 
  818. is not restricted to a single machine as long as no two users can be simul-
  819. taneously using the program.  As Borland says, "treat it like a book."  As an 
  820. example, if you register PSEDIT for your home computer, but during the day you 
  821. use a portable or a computer at work,  you may keep PSEDIT on both machines as 
  822. long as no one is at home using it on your home computer.
  823.  
  824.     LAN licenses grant rights to all users of a file server.  If inter-
  825. networking, a license must exist for each file server that contains a copy
  826. of PSEDIT.EXE.  If two or more file servers exist on a single LAN strictly for
  827. mirroring data and fault-tolerance, these will be counted as a single file
  828. server for licensing purposes.  If in doubt, contact me.  We can work out
  829. an agreement.
  830.  
  831.     Site licensing is also available on a negotiated price basis.  I guarantee
  832. it will be an economical alternative to buying licenses for each user.
  833.  
  834.     You may freely distribute the original PSEDIT.ZIP file in any way you see
  835. fit other than selling it.  Users' groups and shareware distribution services
  836. may charge a reasonable fee for the medium and duplication costs.  Bulletin 
  837. boards may not charge additional fees for downloading this specific program, 
  838. other than normal connect-time and/or membership charges.
  839.  
  840.     You are NOT licensed to give anyone your serial number unless you first
  841. remove all serialization from your computer.  You may then no longer use that
  842. serial number.  Only Parity Solutions has the authority to issue serial
  843. numbers.
  844.  
  845.     Modification of PSEDIT.EXE in any way is prohibited and unlawful.
  846.     
  847.     Licensees of Parity Solutions' BEDIT program may serialize PSEDIT by
  848. renaming BEDIT.SER to PSEDIT.SER.
  849. ==============================================================================
  850.                 
  851.                           ORDER FORM FOR PSEDIT
  852.  
  853. Send checks payable to:
  854.  
  855.   Parity Solutions                 After 10/31/93, send to:
  856.   1105 Burgess Court               1903 Pavia Court
  857.   Arlington, TX 76015              Arlington, TX 76006
  858.  
  859.  
  860.  
  861. BILLING ADDRESS:                        SHIP TO (If different):
  862.  
  863. NAME:    _____________________________  NAME:      ___________________________
  864.       
  865. COMPANY: _____________________________  COMPANY: _____________________________
  866.  
  867. STREET:  _____________________________  STREET:  _____________________________
  868.  
  869.          _____________________________           _____________________________ 
  870.         
  871. CITY/ST: _____________________________  CITY/ST: _____________________________
  872.  
  873. ZIP/POSTAL CODE: _____________________  ZIP/POSTAL CODE: _____________________
  874.  
  875. COUNTRY: _____________________________  COUNTRY: _____________________________
  876.  
  877. PHONE:   _____________________________  PHONE:   _____________________________
  878.  
  879.  
  880. CompuServe ID: _______________________(Optional)
  881.  
  882.  
  883.    NOTE: Parity Solutions sends a serial number for each registration and 
  884.          instructions for serializing your program.  A diskette containing
  885.          the latest releases of all Parity Solutions shareware products is
  886.          available for $5.00 U.S.  The current release of PSEDIT is avail- 
  887.          able for downloading on CompuServe in the IBMSYS forum.
  888.  
  889.  
  890.    QTY   DESCRIPTION                             PRICE EA.   TOTAL PRICE
  891.  
  892.    ___   PSEDIT license and registration           $16.00    ___________
  893.  
  894.    ___   PSEDIT Network license and registration    45.00    ___________
  895.  
  896.    ___   Parity Solutions shareware diskette         5.00    ___________
  897.  
  898.          International postage outside U.S.,         1.00    ___________
  899.          Canada and Mexico.                
  900.  
  901.                              
  902.                                           Total Enclosed:    ___________
  903.  
  904.  
  905. Diskette size (if ordered): __ 5.25" 360k  __ 5.25" 1.2M  __ 3.5" 760k
  906.  
  907.  
  908. Thank you for doing business with Parity Solutions.  (817) 467-7818
  909. ==============================================================================
  910.  
  911.