Beav man page
Max Tardiveau
root at NEXTSERVER.CS.STTHOMAS.EDU
Tue Mar 5 09:17:47 AEST 1991
I goofed pretty badly a few days ago when I posted a man page for Beav. I
tried to be smart and use a whiz-bang utility called shark that compresses
but (theoretically) requires no decompression tool. I tested it on several
platforms, so I figured it was safe.
I was wrong. Several people mailed me saying they couldn't use what I
posted. I apologize to those people and to anyone whose time I wasted with
this thing. This won't happen again.
Here is the beast, in shar format this time.
---------------------------------------------------------------
Max Tardiveau
Department of Computer Science
University of St.Thomas
St.Paul, MN 55105
Internet : m9tardiv at cs.stthomas.edu
---------------------------------------------------------------
"Incompetence is like a two edged banana."
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: beav.1
# Wrapped by m9tardiv at cs.stthomas.edu on a sunny day.
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'beav.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'beav.1'\"
else
echo shar: Extracting \"'beav.1'\" \(41690 characters\)
sed "s/^X//" >'beav.1' <<'END_OF_FILE'
X.\" Man page for beav (Binary Editor And Viewer)
X.\"
X.\" Manual Copyright 1991 by Peter Reilley
X.\" 19 Heritage Cir.
X.\" Hudson, N.H. 03051
X.\" pvr at wang.com
X.\"
X.\" BEAV source and executable can be freely
X.\" distributed for non-commercial purposes.
X.\"
X.\"
X.\" sed 's/zzz/\\
X.\" /g' < beav.1 >
X.\"
X.de Ex
X. PP
X. RS .5i
X. I
X..
X.de Ee
X. RE
X. PP
X..
X.TH beav 1 "Mar 1, 1991"
X.LO 1
X.SH NAME
beav \- edit a binary file
X.SH SYNOPSIS
X.BI beav
X[filename ...]
X.SH DESCRIPTION
X.I Beav
is a full-screen binary file editor modeled after Emacs. It has just about
all the features you'll ever need, and many you probably never will.
You can edit a file in HEX, ASCII, EBCDIC, OCTAL, DECIMAL, and BINARY. You
can search or search and replace in any of these modes. Data can be
displayed in BYTE, WORD, or DOUBLE WORD formats. While displaying WORDS or
DOUBLE WORDS the data can be displayed in INTEL's or MOTOROLA's byte swap
format. Data of any length can be inserted at any point in the file. The
source of this data can be the keyboard, another buffer, or a file. Any
data that is being displayed can be sent to a printer in the displayed
format. Files that are bigger than memory can be handled.
X.SH OVERVIEW
X.B Terms and Definitions
X
Throughout this manual certain terms will be used to describe the operation
and structure of
X.I beav
X\.
X
The data that
X.I beav
is editing is held in a buffer that is structured as a byte stream. There
are many commands that affect the way that this byte stream is displayed on
to the screen. Whatever display mode is chosen the data in the
buffer is not effected, only the presentation.
X
One such choice is to display the data as bytes, words, or double words.
That is : 8 bit values, 16 bit values, or 32 bit values. Whatever choice is
made the value of the selected size will be displayed. These values are
referred to as units in this manual. Thus the 'delete-forw-unit' command
deletes
the unit under the cursor. If 32 bit units are being displayed then 4 bytes
will be deleted.
X
Many commands in
X.I beav
start by pressing the 'ESCAPE' key. When this manual refers to a command
that requires that the 'ESCAPE' key be pressed it will be abbreviated with
'Esc'. Another frequently used key stroke to start commands
is 'CONTROL X'. This in done by pressing the 'CONTROL' key then pressing
the 'X' key at the same time. In this manual this will be abbreviated by
'Ctl-X'. Many commands contain other control characters and these will be
abbreviates
similarly. Thus the 'insert-unit' command will be listed as 'Ctl-X I'. This
will be entered be pressing the CONTROL key and while holding it hitting
the 'X' key, release the CONTROL key then hit the 'I' key.
X
X.B The Screen Format
X
X.I BEAV
presents information to the user in a number of areas. The first is the
window. There will be at least one window displayed on the screen at all
times. The window consists of two areas. The first is the display area.
This
is where the data that is in the buffer is displayed. Most of the time the
cursor will be in this area, as this is where most editing is done. Each
line in the display area will start with a number that indicates the offset
into the buffer for this line of data. At the bottom of the display area
for each window is the status line.
X
The status line presents the user with a number of specific pieces of
information. The first is the program name which is "BEAV". Next there is a
flag indicating the status of this particular buffer. Then the buffer name
followed by the file name. Next the cursor position in bytes and the
character position in the unit. The last pieces of information give the
format that the data is being displayed in. There can be multiple windows
on the screen at the same time but each window will have a status line at
the bottom.
X
The very bottom line on the screen is the prompt line. This is where you
enter data that
X.I beav
requests. If you want to edit a new file you would type 'Ctl-X Ctl-V',
X.I beav
would respond with "Visit file:" on the prompt line. The cursor
would be positioned after the prompt. You would then enter the name of the
file that you wished to edit.
X
If you entered the command by mistake, you can abort the operation by
typing a 'Ctl-G'. 'Control G' is a universal abort command and can be used
anywhere. If you want to perform a search you will enter the search string
on this line. When you have entered the information that
X.I beav
has requested hit 'Return' and the cursor will return to it's original
position in the window display area. The prompt line is also where error
messages are displayed.
X
X.B Display Modes
X
The data in the buffer can be displayed in a number of formats. First there
is the display mode. This can be either; HEXADECIMAL, DECIMAL, OCTAL,
BINARY, ASCII, or EBCDIC.
X
If ASCII or EBCDIC mode is chosen then each byte in the buffer will be
converted to it's ASCII or EBCDIC character and displayed. Bytes that are
outside of the standard character set will be displayed as a dot. Each line
will be 64 characters long. The byte value for "carriage return" and "line
feed" will be displayed as a dot as any other non-printable characters.
X
Within HEXADECIMAL, DECIMAL, OCTAL, or BINARY format the data can be
displayed in 8, 16 or 32 bit values. If 16 or 32 bit values are displayed
the user can choose to view these values in either the Intel format or the
Motorola format. If Intel format is chosen then the first byte in each unit
is the least significant byte when the value is calculated. Thus in hex 32
bit mode a byte string of "32 7A 9F 10" would be displayed as "109F7A32".
If Motorola format is chosen this value would be displayed as "327A9F10".
X
There is another display format choice that affects the 16 or 32 bit
formats. This is called shift. The shift can be 0 or 1 for 16 bit modes, or
0, 1, 2, 3 for 32 bit modes. Shift moves the zero point reference for the
buffer up by the selected value. The default is zero shift. If a buffer is
displaying the following 32 bit hex data;
X.Ex
X 12345678 2F4792AF 673DFEA1 88551199
X.Ee
with the shift at 0. Changing shift to 1 will produce;
X.Ex
X 3456782F 4792AF67 3DFEA188 55119955
X.Ee
The data has been slid down toward the beginning of the buffer by one byte.
This has not changed the data in the buffer at all, it has only affected
the way that the data is presented on the screen. This is useful when
looking at WORD or DOUBLE WORD data that is not aligned on two or four byte
boundaries.
X
When
X.I beav
is first started or a new window is opened the default format is
HEXADECIMAL BYTES.
X
X.B Commands
X
Commands are the means that the user controls the operation of
X.I beav
X. A command can be given by using one of two methods. The first is to use
the key binding.
X
A command can have one or more associated key bindings. It can also have no
key binding. There are a set of default key bindings that
X.I beav
comes configured with. The current set of key bindings can be seen by using
the 'help' command. The 'help' command is 'Esc ?' or Function Key 1 'F1' on
the IBM PC. The help buffer can be scrolled by using the up and down arrow
keys. A printed copy may be obtained by going to the bottom of the help
buffer using the 'move-to-end' command ('Esc >' or the 'End' key). Then
issue the 'print-mark-to-cursor'
command ('Esc P' or 'Ctl-Print') and enter 'PRN' when prompted with "Print
to:". This will output the entire help buffer to a printer connected to the
parallel interface.
X
X.B Buffers
X
Buffers are the in memory storage for all data editing and viewing. Each
buffer has a name that appears in the mode line. Buffers generally have a
file name that is associated with them. The file name also appears in the
mode line. The
buffer name and the file name are independent but the buffer name defaults
to the file name.
X
The buffer name is used to refer to a specific buffer. The 'change-buffer'
('Ctl-X B') command will prompt you for a buffer name. After you enter a
buffer name that buffer will be displayed in the current window. If there
is no such buffer, one will be created and displayed (it will be empty).
X
When
X.I beav
is run with a file name as a command line parameter, the file is read into
a new buffer. The buffer name will be made the same as the file name. The
file name is only used when the buffer is saved. If the file name is
changed using the 'buffer-set-file-name' ('Ctl-X Ctl-F') command then when
the buffer is saved it will be saved to the new file.
X
Buffers are dynamically allocated. They grow or shrink as the size of the
data they contain changes. The buffer size can be frozen using the
'buffer-size-lock' ('Ctl-X Ctl-L') command. This prevents inserting or
deleting data from the buffer but data can be modified.
X
Buffers continue to exist even if they are not being displayed. Buffers are
saved in a linked list that can be stepped through using the
'change-to-next-buffer' ('Esc +') or 'change-to-prev-buffer' ('Esc -')
commands. If the 'change-to-next-buffer' command is given then the next
buffer in the list is displayed in the current window.
X
X.B Files
X
XFiles are the means of storing data on disk. Files or segments of files
can be loaded into
X.I beav
for editing or viewing. The file on the disk has not been changed until
X.I beav
does a save to that file. When a save to a file is performed the original
file contents in saved in a ".BAK" file.
X
X.B Key Binding
X
All commands in
X.I beav
have a command name and a default key binding. The bindings may be changed
to suit personal preference by using the 'bind-to-key' ('Esc K') command.
The current binding of a key sequence can be displayed by using the
'binding-for-key' ('Ctl-X ?') command.
X
If there is an environment variable "BEAV=" and it is set to a file name,
all key bindings that the user sets are saved in this file. When
X.I beav
is started again this file is read and these bindings are loaded. Thus, any
bindings that a user creates becomes permanent. This file is a simple
text file and can be edited to make changes.
X
X.B Configuration
X
When
X.I beav
is first run it detects whether the system is an IBM PC or a clone. If a PC
is detected then a set of key bindings that use the 10 function keys and
the relevant keypad keys are loaded. If the system is not recognized then
only the standard bindings are loaded.
X
If a PC is detected the screen is managed by making BIOS level calls that
enhance performance. Otherwise, the screen is controlled by making ANSI
compatible calls to the operating system. This is much slower but is not
sensitive to hardware configuration. This requires that non-standard
systems support ANSI display controls. The following ANSI escape sequences
are used :
X.PP
X.nf
X.ta .5i 2i
X Position cursor ESC [ <row> ; <column> H
X
X Erase to end of line ESC [ 0 K
X
X Erase to end of page ESC [ 0 J
X
X Normal video ESC [ 0 m
X
X Reverse video ESC [ 7 m
X.fi
X.PP
X.SH COMMAND DESCRIPTION
This section describes all
X.I beav
commands as to their function and any side effects that they may have. The
first line of each description of a command will begin with the default key
binding then the command name and follows with the key binding for a PC.
X
X.B Help
X
This command returns information that will aid in the use of
X.I beav
X\.
X.PP
X.ta 1i +1.5i +1.5i
X Esc ? help F1
X.fi
X.PP
A new window is opened by splitting the current window then all current key
bindings are displayed. This buffer is larger than can be shown at one time
and must be scrolled up and down to see all entries. All commands that do
not alter data can be used to move around and search the help buffer. To
leave the help buffer you move to the next window using the
'change-window-forw' command ('Ctl-X N'). The help window can be removed
from the screen by making the current window the only window with the
'window-single' command ('Ctl-X 1').
X
X.B Cursor Movement
X
There are a number of commands that move the cursor around the current
window. If the cursor bumps the top or the bottom of the window the
position of the window will be adjusted so as to keep the cursor within the
bounds. When the window is moved in response to cursor movements it is
moved by about one third of the window size. This improves performance by
reducing the number of window moves.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-P move-back-line North (up arrow)
X Ctl-N move-forw-line South (down arrow)
X.fi
X.PP
These commands move the cursor up one line or down one line. If the cursor
is on the top line in the buffer and a 'move-back-line' command is given
the cursor will jump to the beginning of the first unit in the buffer. If
the cursor is on the last line of the buffer and a 'move-forw-line' is
given the cursor will move to the last unit in the buffer.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-F move-forw-char East (right arrow)
X Ctl-B Move-back-char West (left arrow)
X.fi
X.PP
These commands move the cursor forward or backward in the current line. If
the cursor is at the first character in the first unit of the line and the
'move-back-char' command is given then the cursor will wrap to the last
character of the previous line. If the cursor is at the last character of
the last unit in the current line then it will wrap to the first character
of the next line.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc F move-forw-unit Ctl-East
X Esc B move-back-unit Ctl-West
X.fi
X.PP
These commands are similar to the above set but they move the cursor by
units rather than characters. The command 'move-forw-unit' will position
the cursor to the first character of the next unit. The command
'move-back-unit' will move the cursor to the first character of the
previous unit.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-V move-forw-page PageUp
X Esc V move-back-page PageDown
X.fi
X.PP
These commands move the move the data in the window by the number of lines
in the window less one. The cursor will stay in the same position relative
to the window as the data is moved.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc < move-to-beginning Home
X Esc > move-to-end End
X.fi
X.PP
Move the cursor to the beginning or the end of the buffer.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X G move-to-byte F9
X.fi
X.PP
Prompt for a byte offset, then go to that position in the current buffer.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-N move-window-down Ctl-Z
X Ctl-X Ctl-P move-window-up Esc Z
X.fi
X.PP
Move the buffer in the window up or down by one line. This does not effect
the cursor until it hits the top or bottom of the window.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc . mark-set F2
X.fi
X.PP
Set the mark position to the current cursor position. The mark position is
remembered even for nonactive windows and buffers.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-X swap-cursor-and-mark
X.fi
X.PP
The position of the cursor and the position of the mark are swapped.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc L window-link
X.fi
X.PP
This command causes all windows that are displaying the contents of the
current buffer to have the same cursor position. Thus if one window is
scrolled then all other windows that display that buffer are scrolled so as
to keep the cursor in the window.
X
X.B Buffer Management
X
Buffers store all data that is being edited. The only limit to the number
of buffers is the size of available memory. If a file is loaded into a
buffer and there is insufficient memory to hold the entire file, then it
will be loaded until memory is exhausted. The buffer will then be set to
read only mode.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-B buffers-display Ctl-F1
X.fi
X.PP
A new window is opened and a list of all buffers in
X.I beav
is displayed. The list contains the buffer name, the file name (if it
exists), the buffer size, and a state flag. If the list is too large for
the window, you can go to that window and scroll the list.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X B change-buffer Ctl-F2
X.fi
X.PP
This command prompts you for a buffer name. If you enter the name of an
existing buffer, that buffer will be displayed in the current window. If
the name does not match an existing buffer, a new buffer will be created
and displayed. This buffer will be empty and will have no file name.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc + change-to-next-buffer Ctl-F4
X Esc - change-to-prev-buffer Ctl-F5
X.fi
X.PP
The next or the previous buffer in the buffer list is displayed in the
current window. This does not effect buffers that are displayed in other
windows.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc G move-to-buffer-split
X.fi
X.PP
Prompt for a buffer name. Then split the current window and display that
buffer, creating it if necessary.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc Ctl-N buffer-set-name Esc Ctl-N
X.fi
X.PP
The current buffer name is changed to the name that you enter. This does
not effect the file name.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-F buffer-set-file-name Ctl-F7
X.fi
X.PP
The file name of the current buffer is changed to the name that you enter.
This does not affect the buffer name.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X K kill-buffer Ctl-F3
X.fi
X.PP
This command prompts you for a buffer name. This buffer is then deleted. If
the buffer is currently being displayed you are prompted for conformation.
If the buffer has been changed you are again prompted for conformation.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-L buffer-size-lock
X.fi
X.PP
The buffer size is prevented from being changed. Data can be edited but
only by changing the existing data. If a buffer is copied into a
size-locked buffer the operation well be successful but will overwrite
existing data. This command toggles between locked and unlocked.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc Y yank-buffer Ctl-F6
X.fi
X.PP
Data from one buffer is inserted into the current buffer at the cursor
position. You are prompted for the name of the buffer to copy from.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Esc O save-mark-to-cursor
X.fi
X.PP
Prompt for a buffer name. Create a new buffer with that name and write the
data from the mark to the cursor into that buffer.
X
X.B File Management
X
These commands control
X.I beav
X's access to files. Files are loaded into buffers or are written from
buffers. Commands that prompt for a file name also accept range parameters.
Range parameters are always given in the numeric base of the current
window. Thus if you are displaying data in decimal format then the range
parameters must be entered in decimal.
X
The size of a file read or write can be limited by specifying a range. The
range parameter specifies the offset into the file, not the buffer. Range
parameters can be specified in these forms;
X.PP
X.nf
X.ta 1i +1.i +1.i
X <file name> <start address>
X <file name> <start address> <end address>
X <file name> <start address> +<length>
X.fi
X.PP
The first form causes the read or write to begin from the <start address>
value until the end of the buffer on write or the end of the file on read.
X The second form reads or writes from <start address> until <end address>
non-inclusive.
X The third form reads or writes from <start address> for <length> bytes.
X
Thus, if the command 'file-read' is given and you enter at the prompt;
main.obj 1000 +100. If the current display mode is hex, the file "main.obj"
will be read from hex byte address 1000 to 10FF into the buffer.
X.PP
X.nf
X.ta 1i +1.5i +1.5i
X Ctl-X Ctl-R file-read Sh-F2
X.fi
X.PP
Prompt for a file name and read that file into the current buffer. This
overwrites the current contents of the buffer. The buffer name is not
changed but the buffer file name is set to the new file name.
X.PP
X.nf
X Ctl-X Ctl-S file-save Sh-F3
X.fi
X.PP
Write the current buffer out to the file if it has been changed. If the
buffer has not been changed then do nothing.
X.PP
X.nf
X Ctl-X V file-view
X.fi
X.PP
Prompt for a file name and read file into a new buffer and display in
current window. Set to read-only mode.
X.PP
X.nf
X Ctl-X Ctl-V file-visit Sh-F4
X.fi
X.PP
Prompt for a file name. If the buffer already exists then display it in the
current window. Otherwise, read file into a new buffer and display in
current window. If there is no such file then create it.
X.PP
X.nf
X Esc U file-visit-split
X.fi
X.PP
Same as above but split current window and display new buffer. This
displays the new buffer as well as the old buffer.
X.PP
X.nf
X Ctl-X Ctl-W file-write Sh-F5
X.fi
X.PP
Prompt for a file name, then write the current buffer to that file.
X.PP
X.nf
X Ctl-X Tab insert-file Sh-F8
X.fi
X.PP
Prompt for a file name and insert that file into the current buffer at the
cursor position.
X.PP
X.nf
X Ctl-X Return save-all-buffers Sh-F6
X.fi
X.PP
Write all buffers that have been changed to their respective files.
X
X.B Window Management
X
X.I Beav
presents information to the user in one or more windows. Each window is a
view into a buffer where the data is actually stored. The window controls
how this data is formatted for display to the user. Data can be displayed
as HEX bytes, OCTAL bytes, ASCII characters, plus many others. The display
format is associated with the window. Thus if a new buffer is displayed in
the current window that new data will be displayed in the current windows
format.
X
The only limit to the number of windows is the screen size. A window can be
no smaller than two lines. This along with the mode line associated with
each window limits to eight the number of windows on an IBM PC 25 line
screen.
X
Any window can view any buffer including having many windows on the same
buffer. For example, two windows can display the same buffer but present
the data in two different modes. One window could display HEX bytes and the
other could display ASCII characters.
X.PP
X.nf
X Ctl-P change-window-back Ctl-PageUp
X Ctl-N change-window-forw Ctl-PageDown
X.fi
X.PP
These commands move the cursor to the next or previous window on the
screen, making it the current window.
X.PP
X.nf
X Ctl-X Z window-enlarge
X Ctl-X Ctl-Z window-shrink
X.fi
X.PP
XEnlarge or shrink the current window size by one line.
X.PP
X.nf
X Esc ! window-reposition
X.fi
X.PP
Move window position so that the cursor is centered in the window. The
cursor position in the buffer does not change.
X.PP
X.nf
X Ctl-X 2 window-split
X.fi
X.PP
Split the current window into equal parts. Both haves have the same display
mode and view the save buffer.
X.PP
X.nf
X Ctl-X 1 window-single
X.fi
X.PP
XExpand the current window to fill the entire display, all other windows
are removed. Make the current window the only window displayed. This has no
effect on the underlying buffers except that they may not be displayed any
more.
X.PP
X.nf
X Esc Ctl-A display-ascii
X Esc Ctl-E display-ebcdic
X Esc Ctl-H display-hex
X Esc Ctl-O display-octal
X Esc Ctl-D display-decimal
X Esc Ctl-B display-binary
X.fi
X.PP
These commands set the window display mode. Text buffers can be displayed
as ASCII or EBCDIC characters. Buffers that are not human readable can also
be displayed in hexadecimal, octal, decimal, or binary format.
X.PP
X.nf
X Esc 1 display-bytes
X Esc 2 display-words
X Esc 4 display-double-words
X.fi
X.PP
As a further option on the non-text display modes, data can be displayed as
8, 16, or 32 bit values.
X.PP
X.nf
X Ctl-E display-swap-order
X.fi
X.PP
When data is displayed as words or double words the order of significance
can be changed. In Intel microprocessors the least significant byte of a
word is stored at the lowest address. Thus if the word 5892 (HEX) were
stored at memory address 10, then 92 (HEX) would be stored at address 10
and 58 (HEX) would be stored at address 11. In Motorola microprocessors the
reverse is true. This command toggles between the Intel and Motorola
schemes of assembling bytes into words and double words. This command has
no effect on byte display or on the text display modes. The data in the
buffer is not changed.
X.PP
X.nf
X Ctl-A display-byte-shift
X.fi
X.PP
This command changes the offset from the beginning of the buffer used to
assemble words and double words. The default shift is 0. For example, a
double word at address 10 is made up of the bytes at address 10, 11, 12,
and 13. With a shift of 1 that double word would be made of bytes 11, 12,
13, and 14. With a shift of 2 then bytes 12, 13, 14, and 15 would be used.
The maximum shift in word display mode is one and the maximum shift in
double word mode is three.
X
The buffer is in effect shifted toward the beginning of the buffer with 1,
2, or 3 bytes becoming not visible. These bytes are not lost, they become
visible when the shift is set to zero. This command cycles through all
possible shift values. There is no effect in any byte display mode or any
text display mode.
X
X.B Inserting and deleting
X
X These commands are the core of
X.I beav
X\. These commands allow the buffer to be edited in a similar fashion to a
text editor.
X.I Beav
has an insert mode much the same as text editors but it only works when
displaying data in one of the text modes, either ASCII or EBCDIC. In other
modes it doesn't make any sense to insert characters as they are typed when
there is more than one characters per unit. In the data modes there is a
command that inserts a unit of zeros into the buffer. Similarly the delete
commands always delete a unit rather than a character. In a text mode the
delete commands work as in a text editor because a unit is a character.
X.PP
X.nf
X Ctl-X I insert-unit
X.fi
X.PP
Insert a zero at the cursor position. The rest of the data moves down one
place. Thus, if double words are being displayed, four bytes are inserted
before the cursor position. These bytes are initialized to zero. This
command works in all display modes.
X.PP
X.nf
X Ctl-X Ctl-A insert-toggle Insert
X.fi
X.PP
In either of the two text modes this command toggles between insert mode
and overwrite mode. In insert mode each character that is typed is inserted
in front of the cursor and the rest of the buffer is moved down. In
overwrite mode the typed characters replace the character that is at the
cursor. This command has no effect in a non-text display mode.
X.PP
X.nf
X Ctl-Q insert-literally Esc Q
X.fi
X.PP
This command sets a special temporary mode where the next typed character
is inserted in the buffer no matter what the character is. This allows
control codes to be inserted in the buffer when in a text display mode.
Alternatively the same byte could be inserted into the buffer by using one
of the data display modes. It night be faster to use this command on some
occasions.
X.PP
X.nf
X Ctl-T unit-twiddle
X.fi
X.PP
The unit at the cursor is swapped with the previous unit.
X.PP
X.nf
X Rubout delete-back-char Backspace
X.fi
X.PP
This command deletes the character before the cursor and pulls the rest of
the buffer back. The cursor remains on the same character as it moves back.
It only works in the text and byte display modes.
X.PP
X.nf
X Ctl-D delete-forw-char Delete
X.fi
X.PP
The character at the cursor is deleted and the buffer is pulled back. The
cursor remains at the same position. It only works in the text and byte
display modes.
X.PP
X.nf
X Esc Rubout delete-back-unit Esc Ctl-K
X.fi
X.PP
This command deletes the unit before the cursor and pulls the rest of the
buffer back. The cursor remains on the same unit as it moves back.
X.PP
X.nf
X Esc D delete-forw-unit
X.fi
X.PP
The unit at the cursor is deleted and the buffer is pulled back. The cursor
remains at the same position.
X.PP
X.nf
X Esc W copy-mark-to-cursor F7
X.fi
X.PP
The area in the buffer from the mark to the current cursor position is
copied into the kill buffer. If the mark is not set before this command is
given an error is reported.
X.PP
X.nf
X Ctl-W delete-mark-to-cursor F8
X.fi
X.PP
The area in the buffer from the mark to the current cursor position is
deleted and placed into the kill buffer. If the mark is not set before this
command is given an error is reported.
X.PP
X.nf
X Ctl-Y yank F6
X.fi
X.PP
The contents of the kill buffer is inserted into the buffer at the cursor
position. The kill buffer itself is not changed.
X
X.B Search and Replace Commands
X
X.I Beav
has very powerful search and replace commands. The search and replace
string can be entered in any of the display modes. The search and replace
strings can each be up to 256 bytes long. The display mode can be changed
at any time while entering the string. Wild cards can be placed down to the
bit level on both the search and replace strings. The wild card character,
'?', will match any value that it is compared with.
X
When a wild card is placed in the replace string it leaves the destination
data unchanged at that position. Thus, if the destination contains the
ASCII string '41 42 43 44' and the replace string contains '66 67 ?? 69'
the result would be '66 67 43 69'.
X
Wild cards can be placed in any position that makes sense. If you want to
use wild cards in an ASCII string then you must switch to another mode to
enter them. You can then switch back to ASCII mode. In this case a '?' will
appear in the position where the wild card has been placed but it appears
exactly the same as a standard question mark. In fact if you type a '?'
over the wild card there will be no apparent change. However, the character
will no longer be a wild card but a standard question mark. To see the true
wild cards you must use a data display mode. In fact if the wild card has
been set on the bit level then you must go to binary display mode to see
its actual position.
X
The commands to change the display mode in search and replace are the same
as for the window display mode. The search and replace strings can be
scrolled back an forth and the cursor moved using the same commands as for
the window. While performing a replace command you can switch between the
search string and replace string by using the 'move-back-page' or
'move-forw-page' commands.
X.PP
X.nf
X Esc S search-forw F3
X.fi
X.PP
Prompts for a search string then searches from the current cursor position
for the first match. The cursor is positioned at the first unit of the
match.
X.PP
X.nf
X Esc R search-back
X.fi
X.PP
This command is the same as the previous one except that it searches
backward.
X.PP
X.nf
X Esc T search-again F4
X.fi
X.PP
This command repeats the previous search command, forward or backward. The
cursor is first moved one byte in the appropriate direction before the
search is repeated.
X.PP
X.nf
X Esc % replace F5
X.fi
X.PP
Prompt for search string. After entering the search string hit return and
you will be prompted for the replace string. After entering the replace
string hit return.
X.I Beav
will then search for the first match with the search string. If a match is
found you will be prompted with '(R)eplace, (S)kip, (A)ll, (O)ne, (Q)uit'
X
If you type a 'R' the replace will be done at this location and the search
will continue. If you type a 'S' the replace will not be done and search
will continue. If you type an 'A' the replace will be done and will be done
at all future matches without pausing for conformation. If you type an 'O'
the replace will be done at this location and the search will stop. If you
type a 'Q' then the search will be terminated.
X.PP
X.nf
X Ctl-R recall-srch-string
X.fi
X.PP
If you enter search or replace previously used strings can be recalled with
this command.
X
X.B Exiting BEAV
X
While using
X.I beav
individual buffers may be saved to disk during the editing session. When
quitting
X.I beav
you must save all buffers or delete all buffers. There are two commands
that that do this.
X.PP
X.nf
X Ctl-C quit-no-save Sh-F10
X.fi
X.PP
If there are any unsaved buffers you will be prompted for conformation
before proceeding. All buffers will be deleted then you will return to DOS.
X.PP
X.nf
X Ctl-X Ctl-E quit-save-all Sh-F9
X.fi
X.PP
All buffers are saved before exiting to DOS.
X
X.B Printing
X
The data that is being displayed in
X.I beav
can be printed or sent to a file in the same format as displayed. If the
current window is displaying octal words and a print command is given the
format of the print will be in the format of the window; that is, octal
words.
X.PP
X.nf
X Esc P print-mark-to-cursor Ctl-Print
X.fi
X.PP
To use this command you must set the mark and the cursor to define the
region that you want printed. If the mark is not set it as assumed to be at
the first unit. After you enter the command you will be prompted with
'Print to:'. You can enter a file name or a device name to send the print
image to. If you enter 'PRN' most systems will print a hard copy.
X
This is useful for getting a print out of the current key bindings. To do
this give the 'help' command 'F1'. Go to the bottom of the help window
using the 'move-to-end' command 'End', the mark will be assumed to be at
the beginning of the buffer. Issue the 'print-mark-to-cursor' command.
Enter 'PRN' at the prompt. This should print the complete help buffer and
will reflect any changes that you have made to the key bindings.
X
X.B Keyboard Macros
X
X.I Beav
has the capability of recording key strokes as they are entered and playing
them back later. This is useful for repeating multi-keystroke operations.
X.PP
X.nf
X Ctl-X ( macro-start
X.fi
X.PP
Start recording key strokes. There is no effect on the operation of the key
strokes. Any previous recorded key strokes are cleared.
X.PP
X.nf
X Ctl-X ) macro-end
X.fi
X.PP
Stop recording key strokes. The key strokes are available for play back.
X.PP
X.nf
X Ctl-X E macro-execute
X.fi
X.PP
Play back the recorded key strokes. The key strokes that were recorded are
played back as if they were typed at the keyboard.
X
X.B Key Binding
X
X.I Beav
provides a user configurable interface. The interface is controlled by a
set of key bindings. This relates the command that will be executed when a
particular key stroke is entered. There are a set of default key bindings
as described in this manual. These can be changed to reflect your
preferences. When a change is made it is reflected in the help screen.
X.PP
X.nf
X Ctl-X ? binding-for-key Sh-F1
X.fi
X.PP
This command will tell you what function a certain key sequence is bound
to. When this command is given you will be prompted for a key stroke or key
stroke sequence.
X.I Beav
will report back with the function name.
X.PP
X.nf
X Esc K bind-to-key
X.fi
X.PP
XFirst you will prompted for a function name. Enter the name of the
function that you wish to create a new binding for. Function names are the
names listed in this manual that are of the form of 'move-forw-unit' or
'display-hex'. After you enter the name hit return. You will be prompted
for a key. This can be in the form of a single standard key such as 'Z'.
Standard key sequences can be entered such as 'Ctl-X Z' or 'Esc Z'. Special
keys can be entered such as 'F1' (function key 1) or 'Page Down'. It is
probably a good idea to not use keys that are needed for editing. If you
bound 'Z' to a function then you would not be able to enter it as a
keystroke when using ASCII display mode. You could still enter it using the
'insert-literally' command or doing it in one of the data display modes but
this would be more cumbersome.
X.PP
X.nf
X Ctl-X L bindings-load
X.fi
X.PP
You are prompted for a file name that contains the key binding that you
wish to set. This file is read in and the appropriate bindings are set. The
text in the binding file should be of the form;
X.PP
X.nf
X <key name> <function name> <key code>
X.fi
X.PP
XFor example;
X.PP
X.nf
X Ctl-X Ctl-P move-back-char 0550
X F1 move-forw-char 04bb
X Ctl-A move-forw-unit 0141
X Esc Ctl-T move-back-unit 0354
X.fi
X.PP
The easiest way of producing a valid key binding file is to set the
'BEAV=<file name>' environment variable, then in
X.I beav
set the desired bindings. The file created will be a valid format for
loading and can be edited as desired. It is the only way to reliably get
the <key code> number.
X
X.B Special Functions
X
These are the commands that do not logically fit under one of the previous
headings
X.PP
X.nf
X Ctl-G abort-cmd F10
X.fi
X.PP
This command aborts the current command. It can even abort a partially
entered command. Thus, if you have typed an 'Esc' as that start of a
command you can type Ctl-G to return to the normal command entry mode.
X.PP
X.nf
X Esc A auto-save
X.fi
X.PP
X.I Beav
can be set to automatically save the current buffer after a specified
number of buffer editing commands are given. This command first prompts for
the number of operations before the save is made. If a zero is entered at
the prompt, this feature is disabled. The default condition of this command
is disabled.
X.PP
X.nf
X Esc C compare
X.fi
X.PP
This is a powerful feature of
X.I beav
X\. The contents of two windows are compared byte for byte from the current
cursor position in each window. There must be exactly two windows to use
this command. These windows can be displaying the same or different
buffers. When a difference is found the cursor in each window is moved to
that position and both windows are moved accordingly. The display mode does
not affect the operation of this command except in restricting the cursor
position to whole units.
X.PP
X.nf
X Esc X extended-command
X.fi
X.PP
If any command looses its binding, this command allows the unbound command
to be used. A command can loose its binding because the binding was
assigned to another command. When this command is given you will be
prompted for a command name. Enter the command name that you wish to
execute, it will be executed as if you had typed its key binding.
X.PP
X.nf
X Ctl-L refresh-screen
X.fi
X.PP
The screen is reprinted from
X.I beav
X's internal buffer. This is useful if the display is messed up due to
transmission errors. On a PC this is unlikely to happen.
X.PP
X.nf
X Esc Ctl-V show-version
X.fi
X.PP
The version and date of
X.I beav
is displayed in the command line.
X.PP
X.nf
X Ctl-X C spawn-shell
X.fi
X.PP
A new MSDOS command shell is created. You can return to
X.I beav
by typing 'exit'.
X.PP
X.nf
X Ctl-U repeat count
X.fi
X.PP
This command prompts for a number to be entered. This causes the next
command given to be repeated by that number of times. This command cannot
have it's binding changed and cannot be issued using the 'extended-command'
function.
X.bp
X.SH "Key Bindings"
The following table describes the default key bindings.
X.PP
X.nf
X.ta 2i +1.5i +1i
X.B Command Key Section
X\l'4i'
abort-cmd Ctl-G 3.12
abort-cmd Ctl-X Ctl-G 3.12
abort-cmd Esc Ctl-G 3.12
abort-cmd F10 3.12
auto-save Esc A 3.12
bind-to-key Esc K 3.11
binding-for-key Ctl-X ? 3.11
binding-for-key Sh-F1 3.11
bindings-load Ctl-X L 3.11
buffer-set-file-name Ctl-F7 3.3
buffer-set-file-name Ctl-X Ctl-F 3.3
buffer-set-file-name Sh-F7 3.3
buffer-set-name Esc Ctl-N 3.3
buffer-size-lock Ctl-X Ctl-L 3.3
buffers-display Ctl-F1 3.3
buffers-display Ctl-X Ctl-B 3.3
change-buffer Ctl-F2 3.3
change-buffer Ctl-X B 3.3
change-to-next-buffer Ctl-F4 3.3
change-to-next-buffer Esc + 3.3
change-to-prev-buffer Ctl-F5 3.3
change-to-prev-buffer Esc - 3.3
change-window-back Ctl-PageUp 3.5
change-window-back Ctl-X P 3.5
change-window-forw Ctl-PageDown 3.5
change-window-forw Ctl-X N 3.5
compare Esc C 3.12
copy-mark-to-cursor Esc W 3.6
copy-mark-to-cursor F7 3.6
delete-back-char Backspace 3.6
delete-back-char Rubout 3.6
delete-back-unit Esc Ctl-K 3.6
delete-back-unit Esc Rubout 3.6
delete-forw-char Ctl-D 3.6
delete-forw-char Delete 3.6
delete-forw-unit Esc D 3.6
delete-mark-to-cursor Ctl-W 3.6
delete-mark-to-cursor F8 3.6
display-ascii Esc Ctl-A 3.5
display-binary Esc Ctl-B 3.5
display-byte-shift Ctl-A 3.5
display-bytes Esc 1 3.5
display-decimal Esc Ctl-D 3.5
display-double-words Esc 4 3.5
display-ebcdic Esc Ctl-E 3.5
display-hex Esc Backspace 3.5
display-octal Esc Ctl-O 3.5
X.bp
X.B Command Key Section
X\l'4i'
display-swap-order Ctl-E 3.5
display-words Esc 2 3.5
extended-command Esc X 3.12
file-read Ctl-X Ctl-R 3.4
file-read Sh-F2 3.4
file-save Ctl-X Ctl-S 3.4
file-save Sh-F3 3.4
file-view Ctl-X V 3.4
file-visit Ctl-X Ctl-V 3.4
file-visit Sh-F4 3.4
file-visit-split Esc U 3.4
file-write Ctl-X Ctl-W 3.4
file-write Sh-F5 3.4
help Esc ? 3.1
help F1 3.1
insert-file Ctl-F8 3.4
insert-file Ctl-X Tab 3.4
insert-file Sh-F8 3.4
insert-literally Ctl-Q 3.6
insert-literally Esc Q 3.6
insert-toggle Ctl-X Ctl-A 3.6
insert-toggle Insert 3.6
insert-unit Ctl-X I 3.6
kill-buffer Ctl-F3 3.3
kill-buffer Ctl-X K 3.3
macro-end Ctl-X ) 3.10
macro-execute Ctl-X E 3.10
macro-start Ctl-X ( 3.10
mark-set Esc . 3.2
mark-set F2 3.2
move-back-char Ctl-B 3.2
move-back-char West 3.2
move-back-line Ctl-P 3.2
move-back-line North 3.2
move-back-page Esc V 3.2
move-back-page PageDown 3.2
move-back-unit Ctl-West 3.2
move-back-unit Esc B 3.2
move-forw-char Ctl-F 3.2
move-forw-char East 3.2
move-forw-line Ctl-N 3.2
move-forw-line South 3.2
move-forw-page Ctl-V 3.2
move-forw-page PageUp 3.2
move-forw-unit Ctl-East 3.2
move-forw-unit Esc F 3.2
move-forw-unit Sh-Tab 3.2
move-to-beginning Esc < 3.2
move-to-beginning Home 3.2
X.bp
X.B Command Key Section
X\l'4i'
move-to-buffer-split Esc G 3.2
move-to-byte Ctl-X G 3.2
move-to-byte F9 3.2
move-to-end End 3.2
move-to-end Esc > 3.2
move-window-down Ctl-X Ctl-N 3.2
move-window-down Ctl-Z 3.2
move-window-up Ctl-X Ctl-P 3.2
move-window-up Esc Z 3.2
print-mark-to-cursor Ctl-Print 3.9
print-mark-to-cursor Esc P 3.9
quit-no-save Ctl-C 3.8
quit-no-save Ctl-F10 3.8
quit-no-save Ctl-X Ctl-C 3.8
quit-no-save Sh-F10 3.8
quit-save-all Ctl-F9 3.8
quit-save-all Ctl-X Ctl-E 3.8
quit-save-all Sh-F9 3.8
recall-srch-string Ctl-R 3.7
refresh-screen Ctl-L 3.12
replace Esc % 3.7
replace F5 3.7
save-all-buffers Ctl-X Return 3.4
save-all-buffers Sh-F6 3.4
save-mark-to-cursor Esc O 3.3
search-again Esc T 3.7
search-again F4 3.7
search-back Esc R 3.7
search-forw Esc S 3.7
search-forw F3 3.7
show-position Ctl-X = 3.2
show-version Esc Ctl-V 3.12
spawn-shell Ctl-X C 3.12
swap-cursor-and-mark Ctl-X Ctl-X 3.2
unit-twiddle Ctl-T 3.6
window-enlarge Ctl-X Z 3.5
window-link Esc L 3.2
window-reposition Esc ! 3.5
window-shrink Ctl-X Ctl-Z 3.5
window-single Ctl-X 1 3.5
window-split Ctl-X 2 3.5
yank Ctl-Y 3.6
yank F6 3.6
yank-buffer Ctl-F6 3.3
yank-buffer Esc Y 3.3
X
X.SH "SEE ALSO"
emacs(1).
END_OF_FILE
if test 41690 -ne `wc -c <'beav.1'`; then
echo shar: \"'beav.1'\" unpacked with wrong size!
fi
# end of 'beav.1'
fi
echo shar: End of shell archive.
exit 0
More information about the Alt.sources
mailing list