                                    PSEDIT
                              Binary File Editor
                                 USER'S GUIDE

                  Copyright 1990, 1993 by Gary C. Crider and
                               Parity Solutions
                               


TABLE OF CONTENTS:

        What is PSEDIT? .................................. 1.0
        Customizing PSEDIT ............................... 2.0
          The PSEDIT.INI Configuration File .............. 2.1
          The PSEDIT= Environment Variable ............... 2.2
          The PECOLOR= Environment Variable .............. 2.3
          The PSEDIT Command Line and Switches ........... 2.4
          Customizing On A Network ....................... 2.5
        Operational Notes and Requirements................ 3.0
        The Keyboard and Display ......................... 4.0
        Modifying Data ................................... 5.0
          Filling a block of data ........................ 5.1
        Deleting Data .................................... 6.0  
        Inserting Data ................................... 7.0  
        Using the clipboard (Cut, Paste, Copy) ........... 8.0
        Locating Data .................................... 9.0
          Go to a Position in the File ................... 9.1
          Search for Data ................................ 9.2
        Print the File ................................... 10.0
        Save the File .................................... 11.0
        Hex/Decimal Conversions and Calculations.......... 12.0
        Exiting PSEDIT ................................... 13.0
        Help ............................................. 14.0
        A Useful Example - 
          Modification of DOS 5's EDIT ...................15.0
        Installation ..................................... Appendix A
        Disclaimer ....................................... Appendix B
        Support .......................................... Appendix C
        Registration ..................................... Appendix D


1.0 What Is PSEDIT?

   One thing most of us learned early while working on our first PC
was that EDLIN, while useful, stank (stunk?)... was malodorous as an editor 
of text files.  Soon there were hundreds of full screen text editors 
available everywhere.  Even Microsoft finally came around and included EDIT 
in DOS 5 to get us away from EDLIN.

   An early lesson that most who aspire to be power users learn is that not
all changes we desire to make are in text files.  Sooner or later we end
up patching an executable program, database, or strange format file that
text editors will not handle.  Enter DEBUG.  Just as EDLIN was a pain for
editing text files, DEBUG is a pain for editing binary files.  Strangely,
few people have jumped out with binary editors and some of the few I have 
seen are not much better than DEBUG.  

   PSEDIT is a very easy-to-use full screen editor for binary (or text) 
files.  You simply type over the hex or ASCII data much as you would with
any text editor.  PSEDIT ensures that you enter hex characters (0-9 and A-F)
while you are in hex entry mode.  You will be able to see the hex and ASCII
representations at all times whether you are editing in hex or ASCII.  

   Using PSEDIT is so intuitive, I don't know why I'm writing this documen-
tation or why you are reading it.  Perhaps we both like to move cautiously.

   You see a full screen of data at all times, not just a few bytes.  Paging
through the file is as easy as hitting PgUp and PgDn, you don't have to
enter hex displacements to get to the next page.

   I think you'll find, as we have at a Fortune 100 company (my day job),
that PSEDIT becomes one of the handiest tools you have.  You will use it
much more than you now expect that you will.

   PSEDIT automatically detects and uses any available conventional, expanded
or extended memory.  It will also use disk space to simulate memory when it
runs short.  This shared memory pool is referred to as virtual memory.  It 
allows very large files to be edited (up to 64 megabytes).

   PSEDIT was formerly distributed under the name BEDIT.


2.0 Customizing PSEDIT

   There are three ways to customize PSEDIT to fit your preferences and your
environment.  The first and most recommended is to make your settings in
the PSEDIT.INI file.  These become your default settings.  Sometimes you
may want to override one or more of them temporarily.  The PSEDIT= and 
PECOLOR= environment variables will override settings in the PSEDIT.INI
file.  Finally the command line switches will override both the PSEDIT.INI
file and the environment variables.  More options are configurable in the
PSEDIT.INI file than with environment variables or command line switches.


2.1 The PSEDIT.INI Configuration File

   A sample PSEDIT.INI file comes with PSEDIT and is initialized to all of
the defaults.  The defaults are used when the PSEDIT.INI file cannot be found
or when a particular setting is missing from the file.  

   The PSEDIT.INI file can be changed with any text file editor and should be
saved in a directory that is specified in DOS's PATH= environment variable,
unless you use the PSEINI= environment variable.  You can use a SET statement 
such as follows to tell PSEDIT where to look for the PSEDIT.INI file:

   SET PSEINI=D:\PSEDIT\

   Do not specify a file name, only the directory where PSEDIT.INI is
located.  The trailing backslash is only required if you want to specify
a root directory.  Place the SET statement in your AUTOEXEC.BAT file.

   If the PSEDIT.INI file is in a directory on your path, you do not need to
use the PSEINI= environment variable.

   All of the settings and values for the PSEDIT.INI file are documented
within the PSEDIT.INI file.  If you wish to add comments to the file,
the first non-blank character on the line should be a semi-colon (;).


2.2 The SET PSEDIT= Environment Variable


   This capability is for compatibility with versions of PSEDIT prior to 4.0,
and is probably of little use to users of the PSEDIT.INI file.
   
   Some of the settings of the PSEDIT.INI file can be overridden with the
PSEDIT= environment variable.  The following parameters are allowed in the 
SET PSEDIT= command:

   MONO - Displays the screens in monochrome.  If you use a Monochrome
          Display Adapter instead of a VGA adapter, you will need to
          also specify BIOS.

   INTL - Allows display of the ASCII international character set (128-
          168).  It also allows international characters to be input while
          editing in ASCII mode and in ASCII search strings.

   GRPH - Allows display and entry of the ASCII international character set 
          (128-168) plus graphics characters (169-254).  

   BIOS - Uses the ROM BIOS interrupts to write to the edit window.  This
          allows use of MDA, CGA and other non-VGA adapters.  It may also
          be required for some extended text modes, depending on the
          video adapter being used.  Specify BIOS if you experience any
          problems with the display of data in the edit window.

   To specify combinations of these parameters, separate them with commas.
Example:

   SET PSEDIT=MONO,BIOS,INTL

   If you encounter an "Out of environment space" message, you can increase 
your environment size by specifying a new amount in your CONFIG.SYS file with 
the following statement:

   SHELL=c:\command.com /P /E:nnnn

   The nnnn should be replaced with the new environment space required.  512
will give you quite a bit of space to work with.  If you use Microsoft 
Windows 3.1, a value of 1024 or higher is recommended.
   
   For compatibility with BEDIT, the BEDIT= environment variable is also 
accepted.


2.3 The PECOLOR= Environment variable

   This capability is for compatibility with versions of PSEDIT prior to 4.0,
and is probably of little use to users of the PSEDIT.INI file.
   
   You can override the display colors specified in PSEDIT.INI.  Use the 
PECOLOR environment variable to change any of the listed color options from 
the default (or PSEDIT.INI value) to the color of your choice.  Place the 
SET PECOLOR command in your AUTOEXEC.BAT if you want it to be in effect any 
time you start PSEDIT.  The format is:

   SET PECOLOR=xnnn,xnnn,xnnn,...

   The x is one of the letters from the table below indicating which color
options you want to change.  The number nnn is the attribute for the new
color.  Determining the attribute value is discussed below.

   COLOR OPTION LETTERS

   A - Main editor colors.            Default = yellow on blue (30).
   B - Data entry window color.       Default = white on magenta (95).
   C - Data entry field color.        Default = white on blue (31).
   D - Help window color.             Default = white on brown (111).
   E - Status lines color.            Default = black on light gray (112).
   F - Key id on status line color.   Default = red on light gray (116).
   G - Active cursor color.           Default = light red on blue (28).
   H - Inactive cursor color.         Default = light cyan on blue (27).
   I - Drop shadow color.             Default = dark gray on black (8).
   J - Pick list color.               Default = light gray on blue (23).
   K - Pick list selection bar color. Default = white on red (79).
   L - Blocked data color.            Default = black on light gray (112).
   M - Active cursor in block.        Default = red on light gray (116).
   N - Inactive cursor in block.      Default = magenta on light gray (117).

   The attribute is the sum of a background value plus a foreground value
from the table below.  Add 128 if you want it to blink.

  Background colors:       Foreground colors:

    0 Black                 0 Black
   16 Blue                  1 Blue
   32 Green                 2 Green
   48 Cyan                  3 Cyan
   64 Red                   4 Red
   80 Magenta               5 Magenta
   96 Brown                 6 Brown
  112 Light Gray            7 Light Gray
                            8 Dark Gray
                            9 Light Blue
                           10 Light Green
                           11 Light Cyan
                           12 Light Red
                           13 Light Magenta
                           14 Yellow
                           15 White


2.4 The PSEDIT Command Line and Switches


   Format: PSEDIT [[path]filename] [/B] [/I] [/V /?] 

   The filename is the file name of the file that you want to edit.  PSEDIT 
does not make an automatic backup, so back it up if you think there could    
be problems.  You will be given a chance to change the file name before you
save it.  The path is required if a file is specified and is not in the 
current directory.  

   If no file name is specified, a pick list is displayed of all of the 
files in the current directory.  To select a file, use the arrow keys to
move the selection bar to the file you want, and press enter.  If a file is
specified, but not found, a pick list will be displayed of all files in
the specified directory.
   
   /? Display command line help prompt.
   
   /B reverses the effect of the MonochromeVideo setting in PSEDIT.INI or
      the MONO parameter of the SET PSEDIT= command. If you have specified 
      monochrome display, /B forces color display.  If you have not selected
      monochrome, black and white (monochrome) display is forced.

   /I reverses the effect of the InternationalChars setting in PSEDIT.INI or
      the INTL parameter of the SET PSEDIT= command.  If you have specified 
      international characters, /I will cause international characters to
      not be recognized.  If you have not specified international characters, 
      /I forces recognition of international characters.

   /G reverses the effect of the GraphicsChars setting in PSEDIT.INI or the
      GRPH parameter of the SET PSEDIT= command.  If you have specified 
      graphics characters, /G will cause international and graphics 
      charcters to not be recognized.  If you have not specified graphics
      characters, /G forces recognition of international and graphics 
      characters.

   /V reverses the effect of the BIOSWrites setting in PSEDIT.INI  or the
      BIOS parameter of the SET PSEDIT= command.  If you have specified BIOS
      writes, /V will force direct video memory reads and writes for the edit 
      window.  If you have not specified BIOS writes, /V will force BIOS 
      reads and writes.


   Brackets ([]) indicate optional parameters.  Do not include the brackets
in the command line.


2.5 Customizing On A Network

   In a LAN environment, PSEDIT would normally be installed on a file server
in a directory that is on the search path.  The PSEDIT.INI file should also 
be in this directory and will have the configuration for all users.  
   
   In order for an individual user to customize PSEDIT without impacting 
others, use the PSEINI= environment variable to point to a local or private 
directory that will contain the PSEDIT.INI file to be used.  The PSEINI=
variable does not have to be specified if the personal PSEDIT.INI file is
placed in a directory that precedes the directory with the master INI file
in the search path.  
   
   The other environment variables (PSEDIT= and PECOLORS=) and command line 
switches can also be used for individual customization.
   

3.0 Operational Notes and Requirements

   PSEDIT's only firm requirement is that it be run on an Intel-compatible
system that is 286-equivalent or newer (386, 486, Pentium...).  The 8086/
8088 CPUs are no longer supported.
   
   See section 2.4, The PSEDIT Command Line and Switches, for instruction
on how to start PSEDIT.

   It bears repeating at this point that PSEDIT DOES NOT MAKE AN AUTOMATIC
BACKUP of the edited file.  Since much of the usefulness of PSEDIT is to just
view or print the contents of a binary file, I did not want PSEDIT cluttering
up my directories with backup files.  You can, however, change the name 
at SAVE time.

   If you intend to modify a file with PSEDIT, I highly recommend making
a backup file first or saving with a different name for obvious reasons.  
Since PSEDIT will allow you to change any file in any way, it is obviously 
a very dangerous weapon in the hands of the unskilled or careless as well 
as a very powerful tool in the hands of the skilled and careful.  Please 
be careful!

   PSEDIT reads the entire file into memory before any edits are performed.
All changes are made only to the copy in memory until a SAVE is done. PSEDIT  
uses VMM, a virtual memory manager by Parity Solutions.  VMM lets you utilize 
as much conventional, expanded and extended memory as you have, then overflows 
onto disk to simulate the remaining required memory.  Assuming you have 
enough memory and disk space, you can edit files up to 64 megabytes in size.

   PSEDIT must have at least one byte in its data buffer to function,
therefore, if you load a file with a length of 0, or delete all bytes in a
file, one byte will show up on the screen and its value will be x00.

   PSEDIT has three different display modes and three different ways of 
selecting the one you prefer.  The normal default mode is to display U.S. 
English characters and punctuation.  The second adds international characters 
and the third adds graphics characters.  If you wish to change the default, 
use the PSEDIT.INI file or the SET command described in the "Customizing 
PSEDIT" section.  If you want to change the initial mode for a single 
execution of PSEDIT, use the command line switches /I or /G as described 
under "Customizing PSEDIT."  If you want to change the characters displayed 
after you have already loaded PSEDIT, use the ALT-I and ALT-G toggles as 
described below under "The Keyboard and Display."

  The reason the U.S. English letters and punctuation were selected as the 
default is first because most of the PSEDIT users are in the U.S., and
second, because when most users refer to the ASCII portion, they are looking 
for a particular text string or phrase.  Not displaying the graphics and
international characters makes the phrase or word easier to spot.  If you
know exactly what you are looking for, use the search feature to locate it
quickly.  International users should not feel slighted, because you can 
easily change the default to display international characters.  Unfortunately,
you must display all international characters, not just the ones used in
your language.



4.0 The Keyboard and Display

   The top line of the display shows the name, size, date and time of the
file being edited.  It also shows whether case-sensitivity is set on or off.  
There is also an area that will toggle between "HEX" and "ASCII" depending on 
which edit mode you are in.  The upper-right corner contains two numbers in
the format ddddddd:xhhhhhh.  This is the current cursor location in both
decimal (ddddddd) and hex (hhhhhh).  The bottom line contains a quick 
reference of function keys and their usage.  Other key functions can be 
displayed by pressing F1 (Help).

   Down the left side of the display is the offset from the start of the   
file to the first byte displayed on that line.  The offset is in hex.   

  HINT: The easy way to see where your cursor is currently located is to
press ALT-D or ALT-H, rather than adding the horizontal offset to the offset on the
left of the screen.  The hex/decimal conversion windows will pop up with 
the current cursor location displayed in the operand field.  ALT-D displays
the offset in Decimal, ALT-H displays it in hex.

   There are two modes of editing in PSEDIT.  When you first load a file, the
screen appears with both hex data and its ASCII representation displayed in 
separate sections of the screen.  The cursor is initially placed in the hex 
portion of the screen for editing in hex.  The character (represented by two 
hex digits) at the cursor location appears red on color monitors.  The same 
character on the ASCII (right) side will be light cyan.  All other data 
characters are yellow.  As the cursor moves, you will see the light cyan 
highlighting on the ASCII display move with the cursor and red letters of the 
hex display.  Pressing TAB places the cursor in the ASCII portion and the 
display at the cursor becomes red.  The corresponding position in the hex 
data becomes light cyan.  TAB toggles the cursor back and forth between the 
two editing areas.

   The ASCII display does not display every displayable character, but only
letters and numbers and the more common punctuation symbols that are common
to most printers.  All other characters appear as periods.  You can only 
enter these characters on the ASCII side.  To enter exotic characters you 
must use the hex representation on the hex side.  If a blank appears on the
ASCII display, it is  because there is a true blank (hex 20) at that position.

   The following keys function as shown during editing:

   Page Down    - Display the next page of data.
   Page Up      - Display the previous page of data.
   Home         - Position the cursor at the start of the file.
   End          - Position the cursor at the end of the file.
   Down Arrow   - Move the cursor down one line.
   Up Arrow     - Move the cursor up one line.
   Right Arrow  - Move the cursor right one byte.  If at the end of a line, 
                  move to the first byte of next line.
   Left Arrow   - Move the cursor left one byte.  If at the start of a line,
                  move to the last byte of the previous line.
   Enter        - Same as right arrow.
   Tab          - Swap the edit cursor between hex and ASCII modes.
   Back Tab     - Clears the byte.  You must then type something in the byte
                  before the cursor can be moved.
   Insert       - Insert one byte.  Everything beyond this byte is shifted one 
                  position and a hex 00 byte is inserted at the cursor.
   Delete       - Delete one byte at the cursor.

   Function keys:

   F1     - Display the help screen.
   F2     - Save any changes to the file on disk.
   F3     - Insert a specified number of bytes at cursor.
   F4     - Delete a specified number of bytes at cursor.
   F5     - Move the cursor to a specified address within the file.
   F6     - Print the file to LPT1:.  It appears in basically the same format
            as displayed.
   F7     - Toggle case-sensitivity for ASCII string searches.
   F8     - Specify a search argument and locate the first occurrence of it in
            the file.
   F9     - Locate the next occurrence of the search argument.
   F10    - Display status of clipboard, blocked data and the virtual
            memory manager.
   
   
   Alt keys:

   ALT-C  - Hex/decimal calculator 
   ALT-D  - Decimal to hex conversion
   ALT-H  - Hex to Decimal conversion
   ALT-X  - Exit PSEDIT.
   ALT-V  - Toggle between 25-line and 43/50 line display modes.
   ALT-F6 - Print an address range.
   ALT-I  - Toggle displaying of international characters.
   ALT-G  - Toggle displaying of international and graphics characters.
   
   Block keys:

   CTL-K B - Mark the start of a block to be deleted.
   CTL-K K - Mark the end of a block to be deleted.
   CTL-K H - Unmark a currently marked block.
   CTL-K F - Fill a block with a given value.

   Clipboard function keys:

   CTL-INS  - Copy blocked data to clipboard.
   CTL-DEL  - Cut blocked data from the file and into the clipboard.
   SHFT-INS - Paste clipboard contents at current cursor location.  The
              contents are inserted.  Existing data is not overlaid.

   ESCAPE - Exit PSEDIT.



5.0 Modifying Data

   Modifying data is very simple, just type over it.  Use the TAB key to 
select the hex or ASCII area.  A MODE indicator on the top line will change 
to indicate whether you are in hex or ASCII edit mode.  When typing in the 
hex area, only valid hex characters, 0-9 and A-F are allowed and upper case 
is forced.  When entering data in the ASCII portion, only common printable 
characters are allowed and upper or lower case may be used.


5.1 Filling a block of data   

   You may mark a block of data (see Deleting Data below) and then press
CTL-K F.  You will be prompted for a fill value (in HEX or ASCII depending 
on your edit mode) to overlay the contents of the blocked data. You may press 
ESCAPE at the prompt to abort the fill operation.  Once you enter the value 
and press enter, the blocked area is filled with the value you specified.


6.0 Deleting Data

   First place the cursor on the first byte of the data that you want to 
delete.  Pressing the DELETE key deletes one byte of data at this position.
Press DELETE repeatedly to delete several bytes.  If a large block needs to
be deleted, press the F4 key and reply to the prompt with the number of bytes 
(up to the clipboard size as specified in PSEDIT.INI) you want to delete 
starting with the byte at the cursor.

   There is also a facility to mark a block and then delete it.  Press 
CTL-K B to mark the first byte of a block, then press CTL-K K to mark the
last byte of a block.  Then press DELETE or F4 to delete the block.  You
can unmark a block by pressing CTL-K H.  You can also change the start or 
end of the block at any time before the block is deleted or unmarked.  These 
keys conform to WordStar-type conventions used in many text editors and word 
processors today.  You can mark and delete blocks up to the size of the
clipboard as specified in PSEDIT.INI.

   PSEDIT cannot handle a file with no data.  If you delete all bytes in the
file, PSEDIT will display a file with one byte of x00.


7.0 Inserting Data

   PSEDIT, rather than using an insert mode, lets you insert bytes of binary 
zeros, hex 00, into the file.  You can then type over the inserted bytes with 
the data that you require, or you can use the fill function to fill the area
with another value.

   Inserting data causes the file to grow.  To allow for this growth, an
additional 64k of virtual memory was acquired.  Thus, if you insert more than
64 kilobytes, you must save the file and reload it to acquire another 64k
expansion area.  The size of the expansion area can be increased as high
as 256k in the PSEDIT.INI file.

   Place the cursor at the byte where you want the data inserted.  The data
is inserted BEFORE the byte at the cursor.  Pressing the INSERT key inserts 
one byte at a time.  If a large block needs to be inserted, press F3 and 
specify the number of bytes you want inserted up to the size of the clipboard
as specified in PSEDIT.INI.  Once the null bytes appear, type over them if 
necessary.

   In order to add bytes to the end of the file, press END to go to the last
byte of the file then press the right arrow.  Each press of the right arrow
adds a byte to the file.  To enter a large block at the end of the file,
press the right arrow once, then press F3 and specify the number of bytes
needed less one (since you already added one when you pressed the right
arrow).

   You can insert data from the clipboard by placing the cursor where you
want the inserted data to begin and pressing SHIFT-INSERT.  If the clipboard
is empty, nothing will happen.  Otherwise, the new data will appear inserted
at the cursor location and marked as a block.  This is so that if you made a
mistake and placed it improperly, you can just press DELETE to delete it,
reposition your cursor and hit SHIFT-INSERT again to reinsert it.  Press
CTL-K H to unmark the block.  The data remains in the clipboard, so it can 
be inserted at multiple locations.



8.0 Using the Clipboard (Cut, Paste, Copy)

   PSEDIT contains a clipboard for use in cutting, pasting and copying
marked blocks. It's size may range from 0 to 48k and is specified in 
PSEDIT.INI.  The clipboard uses CUA keyboard conventions.

   First, mark a block of data (see Deleting Data for instructions on
marking blocks), then press CTRL-INSERT to copy the block to the clipboard.
Press SHIFT-DELETE if you want to copy the block to the clipboard and 
delete it from its current position in the file (Cut).

   Once you have cut or copied data into the clipboard, you may paste 
(insert) it anywhere in the file by using SHIFT-INSERT.  See Inserting Data
for details on using the paste feature.

   If you try to cut or copy a block that is greater than the clipboard size,
a message window will pop up and the current block marks must be adjusted
to select a smaller block.



9.0 Locating Data

   There are basically three ways to move the cursor to an area you want
to edit.

   First you can use Page Down and Page Up to visually look for that area you
want.  Primitive, but effective.

   Second, if you know the offset into the program of the area you want to 
modify, press F5 and type the offset in hex.  

   The third method is to let the computer search for a known byte config-
uration.



9.1 Go to a Position in the File

   An offset or displacement is measured from the start of the file.  The
first byte is offset 0, the second is 1, etc.  When you press F5, you are
prompted for an offset which you provide in hex.  The cursor is then placed 
at that address and display is updated to show the data at the cursor.

   This method is often used in applying documented patches supplied by a 
software vendor.



9.2 Search for Data

   Pressing F8 pops up a dialogue box that requests entry of a search argument.
After supplying this argument, the cursor is positioned to the first 
occurrence of that value in the file.  If it is not found, the cursor will 
appear on the last byte of the file.  If a first occurrence is found, pressing
F9 searches for the next occurrence.  If a second is found, pressing F9 again
searches for the third occurrence, and so on.

   If the cursor is in the hex editing area, you will be prompted for up to
30 hex bytes of search argument (60 hex digits).  When the cursor is in
the ASCII editing area, you may enter up to 60 ASCII characters for a search
argument.  Admittedly the search arguments are small, but I have found that
when editing binary files, you are generally not looking for long strings.

   Hex data is normally entered in sets of two hex digits (nibbles) since it
takes two hex digits to represent one byte.  If you enter an odd number of hex 
digits, a zero nibble is prepended to the argument.  For example, if you
enter 18A, the resulting two bytes that are located are 01 8A.  

  No byte swapping is ever done to accommodate the PC's low-high storage 
scheme of integer data.  So if you are looking for an integer value of 
1000 (decimal), hex 3E8, which is stored as hex E8 03, the search argument 
you would provide is E803.  If you don't have a clue what this means, you 
probably don't need to be concerned about using PSEDIT in this manner.

  The F7 key is used to enable or disable case-sensitive searches when in
ASCII character mode.  The current state is shown on the top line of the 
display.  If ON, upper/lower case letters must match exactly.  If OFF,
upper and lower case letters are equivalent.  The CASE mode has no effect
on hex mode searches.



10.0 Print the File

   Printing the file is easy.  You just press F6 and a window will pop up
that tells you how many pages will be printed.  You may abort at this time
by pressing ESCAPE or replying N to the "Continue? (Y/N)" prompt.  As pages
are sent to the printer, the page number will be displayed.  You may press
any key to cancel printing at the end of the current page.

   The output is sent to standard print (PRN).  The format is side-by-side 
hex/ASCII like that displayed on the screen with offset addresses (dis-
placements) at the start of each line.  880 (hex 370) bytes are printed on 
each page.  The pages are numbered and the file name, size, date and time 
appear at the beginning of each page.

   ALT-F6 allows you to supply a starting and ending address range to print.  
The actual pages printed will probably not start and end with the addresses 
you provided.  Rather the pages (as if you had printed the entire file) that 
contain your starting address through your ending address will be the only
pages printed.

   

11.0 Saving the File

   Prior to pressing F2 to save the file, all modifications are only done in 
virtual memory.  F2 writes the file image in memory over the file that was 
originally loaded, and the changes become permanent.

   You may, however, change the file name at save time.  A dialogue box will
appear with the current file name.  Accept it as is by pressing ENTER or
modify it first.

   If the saved file name already exists you will be asked for verification
before overwriting.


12.0 Hex/Decimal Conversions and Calculations

   Pressing ALT-D (Decimal-to-hex) pops up a window into which up to eight-
digit decimal numbers can be entered.  Pressing ENTER displays the results 
of converting this number to hexadecimal.  Pressing ESC exits the window.
Initially, the current cursor position is displayed in the operand field.

   Pressing ALT-H (Hex-to-Decimal) pops up a window into which up to eight-
digit hexadecimal numbers can be entered.  Pressing ENTER displays the 
results of converting this number to decimal.  Pressing ESC exits the window.
Initially, the current cursor position is displayed in the operand field.

   ALT-C pops up a hex/decimal calculator which will add, subtract, multiply 
or divide two hex, decimal or mixed values.  The result is displayed in both\
hex and decimal.  When entering the values to be calculated, precede hex 
values with an X (i.e. X31A0) and preceed decimal values with a D (i.e. 
D4095).  Enter a plus (+) or minus (-) sign in the operator field.  Press 
CTRL-ENTER when ready to calculate (or ENTER at the operator field).

   Since it is designed primarily to help you figure displacements within a
program, the calculator operates on unsigned long (4-byte) integer values.
Thus decimal points and negative numbers are not allowed.  If you subtract a 
number from a smaller number, the result will be the 32-bit two's compliment
of the negative result, usually a very high number.  For instance, if you 
subtract 1 from 0, the result will be 4,294,967,295, the maximum for an
unsigned long integer.  If you compute a number with results higher than
the above number, the results will be inaccurate.  Let's hope you are not
trying to edit any 4 Gb files!

  When you first invoke the calculator, the hex displacement of the current
cursor location will be in the first operand.  This facilitates calculating
displacements forward or backward from the cursor.  You can change the value
to anything you like.

  HINT: The easy way to see where your cursor is currently located is to
press ALT-D or ALT-H, rather than adding the horizontal offset to the offset 
on the left of the screen.  The hex/decimal conversion windows will pop up 
with the current cursor location displayed in the operand field.  ALT-D 
displays the offset in Decimal, ALT-H displays it in hex.


13.0 Exiting PSEDIT

   To quit PSEDIT, press ESC from the main edit screen.  You will see a 
prompt: "Exit Editor? (Y/N)".  Any response other than Y or y will return you 
to the point you were when you pressed ESC.  A Y response returns you to DOS 
or to the file name pick list if the editor was entered via the pick list.  To 
exit from the pick list screen to DOS, press ESC.  Once you exit to DOS or the 
pick list, any unsaved modifications in the editor are lost.

   If you wish to exit PSEDIT without having to reply to the prompt, press
ALT-X for a quick exit.  Any modifications since the last save are lost.  It
also bypasses a return to the file pick list when entry to the editor was via
the pick list.


14.0 Help

   Pressing F1 pops up a help screen describing the editing and function keys.
Pressing ESCAPE (or any key when last page is displayed) removes the help
window and returns you to the editor.  Page Down and Page Up can be used to 
move between help pages.



15.0 A Useful Example - Modification of DOS 5's EDIT

   I prefer DOS 5's EDIT command by leaps and bounds over the EDLIN of
previous DOSes, but there is one thing I especially don't like about it.
When you select File/Open, it comes up with a default file list specification
of *.TXT, like that is the only extension ever used for ASCII text files.  I
would prefer *.* and let me choose from all of my files.  After reviewing
all of the options, it appeared to me that there was no way to set this
value to *.*.

   My next thought is that since there doesn't appear to be any type of
configuration file for EDIT, the *.TXT string must be in the program, so
I'll just pull out my trusty PSEDIT and zap it to *.*.  Let's do it.

   Go to your directory where you keep DOS (usually C:\DOS).  Type PSEDIT
EDIT.COM.  Since we know we are looking for an ASCII string of *.TXT, press
TAB to swap the cursor to the ASCII area and press F8 to search.  Enter
*.TXT and press ENTER.  You now find that your cursor is positioned on the 
last byte of the file.  This means it didn't find the string we were
looking for.  Strange.

   But look! Right above our cursor are some messages that EDIT.COM displays.
One of them reads, "Can not find file QBASIC.EXE."  Oh yeah, I read somewhere
that the EDIT editor with DOS 5 was a version of the QBASIC editor.  Let's
press ESCAPE, answer 'Y' and get back to the DOS prompt.  Now let's enter
PSEDIT QBASIC.EXE.

   Again let's go the ASCII area with TAB and search for *.TXT with F8.  
Bingo! We found it.  
   
   In my copy of DOS 5.0's QBASIC.EXE, I am now at a displacement of hex 
3BCCA into the program and the cursor is positioned on the * of string *.TXT.  
Hit the right arrow twice to position the cursor on the first T.  Type an 
asterisk (*).  The string now shows *.*XT and the cursor is on the X.
Lets change the X and T to hex 00s, which in most languages is used to 
terminate a string.  Since we can't enter a binary zero field in the ASCII
area, press TAB to switch the cursor back to the hex area.  Now type
four 0s.  As you can see you have now changed the XT characters from
hex 54 58 (the hex representation of X and T) to hex 00 00.

   This is what we wanted to do, so now let's save the file by pressing
F2.  Since the file was not backed up beforehand, type in a new file name
(QBASIC.1) just to make sure it works before we destroy the original. Exit 
to DOS by pressing ESCAPE and Y.  Rename the original to QBASIC.BAK and 
QBASIC.1 to QBASIC.EXE.  Now type EDIT and go to the File/Open screen.  Lo 
and behold!  It now reads *.* and all of the files in the current directory 
are displayed in the pick list.

   You can go delete QBASIC.BAK now.



APPENDIX A

Installation

    PSEDIT is distributed in a self-extracting ZIP file called PSEDT.EXE.  It 
contains the following files:

        PSEDIT.EXE         The executable file for PSEDIT.
        PSEDIT.INI         Configuration file for PSEDIT.
        PSEDIT.DOC         The documentation file.
        PSEDIT.HST         Modification descriptions for previous versions
                           of PSEDIT. 
        PSEDIT.Vnn         Modification descriptions for current version nn.
        PRODUCTS.DOC       A description of other Parity Solutions products
                           available on CompuServe and ZiffNet.

    For best results, extract the file into a directory on your PATH.  If you
don't use a directory in your path, you will have to designate the directory
containing PSEDIT.EXE when executing the program.

    If you have a utility directory that is on your PATH, this is an excellent
location for PSEDIT.  An example installation would be:

    C:
    CD \UTIL
    copy [path]PSEDT.EXE
    PSEDT
    DEL PSEDT.EXE

    If they are not currently in your path, simply copy all of the files to a
directory in your path.  Keep the PSEDT.EXE file anywhere you like, but give 
plenty of copies, as is, to your friends.  If you register PSEDIT, you are not 
licensed to give your serial number to anybody without first removing the 
serialization from your copy.




APPENDIX B


Disclaimer

BECAUSE OF THE DIVERSE NATURE OF COMPUTER EQUIPMENT AND EXPERTISE OF USERS,
PARITY SOLUTIONS AND GARY C. CRIDER MAKE NO WARRANTY ON THE PSEDIT PROGRAM
WHATSOEVER, EXPRESS OR IMPLIED.  THE USER ASSUMES ALL RISK OF DAMAGE TO DATA 
OR EQUIPMENT RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OR MISUSE OF THIS 
PROGRAM PRODUCT.  THE USER MUST BE AWARE THAT USING PSEDIT TO MAKE ALTERATIONS 
TO PROGRAMS OR DATA CAN RENDER THAT PROGRAM OR DATA USELESS.

USERS ARE ADVISED TO TEST MODIFICATIONS MADE WITH PSEDIT THOROUGHLY ON FILES 
FOR WHICH A BACKUP EXITS.  ANY LIABILITY OF THE AUTHOR OR PARITY SOLUTIONS IS 
LIMITED TO REPLACEMENT OR REFUND OF THE REGISTRATION FEE.




APPENDIX C


Support

    I have tried to test the program to the fullest, but I am limited as to
systems and configurations with which to test.  I have been programming for 18
years and the one thing I know for sure is that bug free programs are very few
and far between.  I can only promise to support the program to the best of my
ability and provide fixes as expeditiously as possible.  PSEDIT has been used
at my home and work site extensively for several years and has proven to be a
reliable tool.

    Anyone can report problems and suggest changes.  Registered users get top
priority in resolving their problems.  There are three ways you can report
problems.  The preferred method is to contact me through CIS mail (not forum
messages).  My CIS ID is 71760,3413.  You can also write me at:

   Gary C. Crider
   Parity Solutions
   1903 Pavia Court
   Arlington, TX 76006

    The last method is to phone (817) 261-9552.  Since I am the sole technical
support and the line is also used for my network consulting business, it is
often hard to get through to me.  Please call and leave a message between 7:30
am and 5:30 pm Central time.

    No matter which method you use, please give a brief description of your
problem, the release number of your program, your registration serial number 
if you are registered, and your phone number.  If I need more information, I 
will contact you as soon as I can.  When I have a solution, I will contact 
you however you prefer.

    I work full time, have a consulting business to run in my spare time and
write programs instead of sleeping.  So please be a little patient with me.

    Program updates are available on CompuServe or can be requested from us
for a $5 shipping and handling charge.  Add $1 for international shipping
outside the U.S., Canada and Mexico.  A distribution disk of all Parity 
Solutions products will be sent to you.  Specify disk size and format.



APPENDIX D


Registration


    I begin with an apology.  I hate programs that in any way inhibit func-
tionality or performance for the shareware version.  But when it came down to
feeding the family and paying the bills, I had a change of heart and inserted
a pesky notice that pops up at the beginning and gets on your nerves.  I
chose this approach above that of limited functionality.  The program's full
capabilities are available for you to evaluate before you invest your hard-
earned money.

    Registered users will receive a unique serial number and instructions on
how to serialize the program.  Serialization can be re-applied to updated
versions and in no way hinders your use of the program.  You can compress or
decompress the program with no effect.  It is already compressed before 
distribution.

    As a registered user, you will be able to update without re-registration
or additional fees.

    To register your copy, please send $24 US ($95 per file server on LANs) 
check or money order (sorry, no credit cards yet) to:

   Gary C. Crider
   Parity Solutions
   1903 Pavia Court
   Arlington, TX 76006

    Purchase orders for amounts of $72 or more are accepted from U.S. or
Canadian companies and institutions.

    Add $1 to total order for postage outside the U.S., Canada and Mexico.
    
    Or, you can register single-use licenses online quickly and easily in 
Compuserve.  Simply GO SWREG and register ID #751.  Your registration will be 
added to your Compuserve bill.  International exchange was never easier, and
you save the $1 postage charge.

    If you send your CIS ID or register via SWREG, your registration will be 
sent to you via CIS mail, along with instructions on how to serialize your copy 
of PSEDIT.  This usually involves one day or less turnaround.

    Program diskettes are not normally shipped.  Normal distribution is via 
CompuServe.  If you need a diskette, please see the instructions under Support 
above.  You will receive a serial number and instructions for serializing your 
copy of the program.
    
    Each license gives you or your company a single use permit for PSEDIT. It 
is not restricted to a single machine as long as no two users can be simul-
taneously using the program.  As Borland says, "treat it like a book."  As an 
example, if you register PSEDIT for your home computer, but during the day you 
use a portable or a computer at work,  you may keep PSEDIT on both machines as 
long as no one is at home using it on your home computer.

    LAN licenses grant rights to all users of a file server.  If inter-
networking, a license must exist for each file server that contains a copy
of PSEDIT.EXE.  If two or more file servers exist on a single LAN strictly for
mirroring data and fault-tolerance, these will be counted as a single file
server for licensing purposes.  If in doubt, contact me.  We can work out
an agreement.

    Site licensing is also available on a negotiated price basis.  I guarantee
it will be an economical alternative to buying licenses for each user.

    You may freely distribute the original PSEDT.EXE file in any way you see
fit other than selling it.  Users' groups and shareware distribution services
may charge a reasonable fee for the medium and duplication costs.  Bulletin 
boards may not charge additional fees for downloading this specific program, 
other than normal connect-time and/or membership charges.

    You are NOT licensed to give anyone your serial number unless you first
remove all serialization from your computer.  You may then no longer use that
serial number.  Only Parity Solutions has the authority to issue serial
numbers.

    Modification of PSEDIT.EXE in any way is prohibited and unlawful.
    
    Licensees of Parity Solutions' BEDIT program may serialize PSEDIT by
renaming BEDIT.SER to PSEDIT.SER.

==============================================================================
                
                          ORDER FORM FOR PSEDIT

Send checks payable to:

  Parity Solutions                
  1903 Pavia Court
  Arlington, TX 76006



BILLING ADDRESS:                        SHIP TO (If different):

NAME:    _____________________________  NAME:      ___________________________
      
COMPANY: _____________________________  COMPANY: _____________________________

STREET:  _____________________________  STREET:  _____________________________
 
         _____________________________           _____________________________ 
        
CITY/ST: _____________________________  CITY/ST: _____________________________

ZIP/POSTAL CODE: _____________________  ZIP/POSTAL CODE: _____________________

COUNTRY: _____________________________  COUNTRY: _____________________________

PHONE:   _____________________________  PHONE:   _____________________________


CompuServe ID: _______________________(Optional)


   NOTE: Parity Solutions sends a serial number for each registration and 
         instructions for serializing your program.  A diskette containing
         the latest releases of all Parity Solutions shareware products is
         available for $5.00 U.S.  The current release of PSEDIT is avail- 
         able for downloading on CompuServe in the IBMSYS forum.


   QTY   DESCRIPTION                             PRICE EA.   TOTAL PRICE

   ___   PSEDIT license and registration           $24.00    ___________

   ___   PSEDIT Network license and registration    95.00    ___________

   ___   Parity Solutions shareware diskette         5.00    ___________

         International postage outside U.S.,         1.00    ___________
         Canada and Mexico.                

                             
                                          Total Enclosed:    ___________


Diskette size (if ordered): __ 5.25" 360k  __ 5.25" 1.2M  __ 3.5" 760k


Thank you for doing business with Parity Solutions.  (817) 261-9552

Parity Solutions is a partnership of Gary C. Crider and Russell L. McCloud.  
Federal tax identification number 75-2468376.
==============================================================================

