.TH BPE 1 LOCAL .SH NAME \fBbpe\fR - examine and patch binary files .SH SYNOPSIS \fBbpe\fR allows a file to be searched and modified in either ASCII or hexadecimal. Each buffer is displayed in both modes. .SH DESCRIPTION bpe binary.file .ne 15 .SS Commands .nf D - Dump one page from current file position S - Set current file pointer F - Find string in file (beginning from curr. position) / - Same as F H - locate hex bytes in file (beginning from curr. position) N - Display next sector P - Display previous sector + - Scroll forward 2 lines - - Scroll back 2 lines e - Edit ASCII portion of file E - Edit binary portion of file W - Write modified sector back to disk Q - Quit Program ? - help .fi .ne 5 .SS Editing a file Enter an editing mode by typing 'e' (for ASCII edit) or 'E' for hex edit. The cursor may be moved either by the arrow keys or the vi-style ^H, ^J, ^K, ^L keys, depending on compilation options. Place the cursor on the byte to change and type either a printing ASCII character or two digit hex value. Exit either edit mode by typing ^E. When you are satisfied with your editing, enter the W command to write the modified portion of the file back to disk. .ne 5 .SS Searching for data You may search for hex data by giving the h command and entering a string of hex digits. The search procedes forward from the current location until a matching string is found. The display is adjusted to put the first byte at the top of the screen (but see configuration options). If no pattern is specified the previous pattern is used. .P To search for a string, enter the F (for find) command, or the vi style / command. At the prompt type in a string and press return. The search procedes as with a hex byte search. If you wish to repeat a string search, enter the F command again and press return. This will repeat the search for the previous string. If the starting position has not been adjusted the search will start one character past the location of the last occurence found. .SS Configuration options The makefile contains configuration option, identifiable by comments. These are all at the top of the makefile. If your curses supports KEYPAD definition for your terminal, you may use the cursor keys on the keypad. This is generally only found in SysV systems with termlib versions of curses. If you don't have that feature the NOKEYPAD option will allow use of vi style cursor keys. .P When searching, if you prefer to see the pattern in context you may set the CLINES to the number of lines of context displayed before the pattern found. This may cause problems doing hex searches. In addition, if you want the display to start on a 16 byte boundary, to match od or hd output, you may enable the ALLIGN option. .SH WARNINGS Illegal commands are flagged as such. .SH SEE ALSO od, hd, possibly adb. .SH DIAGNOSTICS .SH LIMITATIONS If the l or L commands are used with no pattern specified before a pattern has been specified the value zero will be used. .ne 15 .SH AUTHOR .nf Original author: Andreas Pleschutznig Teichhofweg 2 8044 Graz Austria Contributions by: maart@cs.vu.nl v1.2 features added by: Bill Davidsen, Box 8 KW-C206, Schenectady NY 12345 Comments and bug reports to: andy@mssx (mcvax!tuvie!mssx!andy) Bugs in features documented as being added in v1.2 to davidsen@crdos1.uucp (uunet!crd.ge.com!davidsen) .fi