home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3449 / beav1.doc
Encoding:
Text File  |  1991-06-07  |  31.3 KB  |  1,209 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                BEAV
  10.                      Binary Editor And Viewer
  11.  
  12.                       Manual Copyright 1991
  13.  
  14.                            Version 1.20
  15.                           March 13, 1991
  16.  
  17.                                 By
  18.                           Peter Reilley
  19.                          19 Heritage Cir.
  20.                         Hudson, N.H. 03051
  21.                            pvr@wang.com
  22.  
  23.              BEAV source and executable can be freely
  24.              distributed for non-commercial purposes.
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.                          BEAV User Manual
  40.  
  41.  
  42.  
  43.  
  44.                         Table of Contents
  45.  
  46. 1.    Introduction
  47.  
  48. 2.    Overview
  49.  2.1       Terms and Definitions
  50.  2.2       The Screen Format
  51.  2.3       Display Modes
  52.  2.4       Commands
  53.  2.5       Buffers
  54.  2.6       Files
  55.  2.7       Key Binding
  56.  2.8       Configuration
  57.  
  58. 3.    Command Description
  59.  3.1       Help
  60.  3.2       Cursor Movement
  61.  3.3       Buffer Management
  62.  3.4       File Management
  63.  3.5       Window Management
  64.  3.6       Inserting and deleting
  65.  3.7       Search and Replace Commands
  66.  3.8       Exiting BEAV
  67.  3.9       Printing
  68.  3.10      Keyboard Macros
  69.  3.11      Key Binding
  70.  3.12      Special Functions
  71.  
  72. 4.    Alphabetical list of commands by name
  73.  
  74. 5.    Alphabetical list of commands by default key binding
  75.  
  76. 6.    Release notes
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.                               - 2  -
  99.  
  100.  
  101.  
  102.  
  103.  
  104.                          BEAV User Manual
  105.  
  106.  
  107.  
  108.  
  109. 1.0   Introduction
  110.  
  111.       BEAV  is  an  editor that brings the features of a powerful
  112. full screen editor to the editing of binary files.    It  is  the
  113. only editor that I know of that does that.
  114.  
  115.       When  you  need  to edit a non-text file you generally have
  116. two choices; a text editor or a  file  zap  type  editor.    Each
  117. choice has significant disadvantages.
  118.  
  119.       Text  editors  expect the file to be formatted in a certain
  120. way.   At a minimum they expect that all lines be  terminated  by
  121. a  carriage  return  or  line  feed  and  be  limited  in length.
  122. There is no line length limit  with  BEAV.    Most  text  editors
  123. get  confused  by  bytes that are outside of the normal range (20
  124. to 7E HEX).   In BEAV no  special  characters  such  as  carriage
  125. return  or  line  feed  affect  the  display aside from producing
  126. their numeric value.   BEAV can  edit  any  file  no  matter  the
  127. format.
  128.  
  129.       The  other  choice  is  to use a file zap type editor which
  130. can edit a binary file without  difficulty.   These  editors  are
  131. often  very  limited  in  their features and capabilities.   Most
  132. file zap programs can edit a file only in HEX  or  ASCII.    They
  133. generally  operate  on  a  sector  basis and because of this they
  134. cannot insert or delete data in the middle of the file.
  135.  
  136.       All these limits are eliminated in BEAV.   You can  edit  a
  137. file  in  HEX,  ASCII,  EBCDIC, OCTAL, DECIMAL, and BINARY.   You
  138. can search or search and replace in any of  these  modes.    Data
  139. can  be  displayed in BYTE, WORD, or DOUBLE WORD formats.   While
  140. displaying WORDS or DOUBLE WORDS the data  can  be  displayed  in
  141. INTEL's  or  MOTOROLA's  byte  swap  format.   Data of any length
  142. can be inserted at any point in the file.   The  source  of  this
  143. data  can  be the keyboard, another buffer, or a file.   Any data
  144. that is  being  displayed  can  be  sent  to  a  printer  in  the
  145. displayed  format.    Files  that  are  bigger than memory can be
  146. handled.
  147.  
  148.       Some users may recognize the similarity to the  EMACS  text
  149. editor  that  was  written  by Richard Stallman at MIT.   This is
  150. not a coincidence.   I attempted to keep  as  much  of  the  user
  151. interface   and   functionality   as   possible  given  the  very
  152. different tasks of EMACS and BEAV.
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.                               - 3  -
  164.  
  165.  
  166.  
  167.  
  168.  
  169.                          BEAV User Manual
  170.  
  171.  
  172.  
  173. 2.    Overview
  174.  2.1       Terms and Definitions
  175.  
  176.       Throughout this  manual  certain  terms  will  be  used  to
  177. describe the operation and structure of BEAV.
  178.  
  179.       The  data  that BEAV is editing is held in a buffer that is
  180. structured as a byte  stream.    There  are  many  commands  that
  181. affect  the  way  that  this  byte  stream is displayed on to the
  182. screen.   Whatever  display  mode  is  chosen  the  data  in  the
  183. buffer is not effected, only the presentation.
  184.  
  185.       One  such  choice  is  to display the data as bytes, words,
  186. or double words.   That is; 8 bit values, 16 bit  values,  or  32
  187. bit  values.    Whatever choice is made the value of the selected
  188. size will be displayed.   These values are referred to  as  units
  189. in  this  manual.    Thus  the 'delete-forw-unit' command deletes
  190. the  unit  under  the  cursor.    If  32  bit  units  are   being
  191. displayed then 4 bytes will be deleted.
  192.  
  193.       Many  commands  in  BEAV  start  by  pressing  the 'ESCAPE'
  194. key.   When this manual refers to a command  that  requires  that
  195. the   'ESCAPE'  key  be  pressed  it  will  be  abbreviated  with
  196. 'Esc'.   Another frequently used key  stroke  to  start  commands
  197. is  'CONTROL  X'.    This  in  done by pressing the 'CONTROL' key
  198. then pressing the 'X' key at the  same  time.    In  this  manual
  199. this  will  be  abbreviated  by 'Ctl-X'.    Many commands contain
  200. other  control  characters  and   these   will   be   abbreviates
  201. similarly.    Thus  the  'insert-unit'  command will be listed as
  202. 'Ctl-X I'.   This will be entered by  pressing  the  CONTROL  key
  203. and  while  holding  it  hitting the 'X' key, release the CONTROL
  204. key then hit the 'I' key.
  205.  
  206.  2.2       The Screen Format
  207.       BEAV presents information  to  the  user  in  a  number  of
  208. areas.    The  first  is the window.   There will be at least one
  209. window displayed  on  the  screen  at  all  times.    The  window
  210. consists  of  two  areas.   The first is the display area.   This
  211. is where the data that is in the buffer is displayed.    Most  of
  212. the  time  the cursor will be in this area, as this is where most
  213. editing is done.   Each line  in  the  display  area  will  start
  214. with  a  number  that  indicates  the  offset into the buffer for
  215. this line of data.   At the bottom of the display area  for  each
  216. window is the status line.
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.                               - 4  -
  229.  
  230.  
  231.  
  232.  
  233.  
  234.                          BEAV User Manual
  235.  
  236.  
  237.  
  238.       The  status  line  presents  the  user  with  a  number  of
  239. specific  pieces  of information.   The first is the program name
  240. which is "BEAV".   Next  there  are  some  flags  indicating  the
  241. status of this particular buffer.
  242.  
  243.       The  first  flag  indicates  if the buffer has been damaged
  244. by a memory allocation failure.   If there  is  a  '?'  then  the
  245. buffer  is  bad,  otherwise  there will be a space.   Bad buffers
  246. are set to read only.
  247.  
  248.       The next flag indicates if  the  buffer  has  been  changed
  249. and  will  need  to  be  written  out  if  the  changes are to be
  250. saved.   This flag is a '*'  if  the  buffer  has  been  changed,
  251. otherwise there will be a space.
  252.  
  253.       The  next  flag  indicates  insert/overstrike mode; 'I' for
  254. insert, 'O' for overstrike.   This is only  meaningful  in  ascii
  255. or ebcdic mode.
  256.  
  257.       Then  the  buffer  name  followed  by  the  file  name.   A
  258. window can be in read only, read/write, or read/write  with  size
  259. lock.     These   will  be  displayed  as  [RO],  [RW],  or  [WL]
  260. respectively.   If auto-update  is  enabled  then  [AU]  will  be
  261. displayed.
  262.  
  263.       Next  the  cursor  position  in  bytes  and  the  character
  264. position  within  the unit.   The next piece of information gives
  265. the format that the data  is  being  displayed  in;  HEX,  OCTAL,
  266. DECIMAL,  BINARY,  ASCII,  EBCDIC.    If  a data mode is selected
  267. then the size in bytes (1, 2, 4) is displayed.   If the  data  is
  268. being   displayed   in  Intel  mode  then  the  swapped  flag  is
  269. displayed, 'S'.   Lastly the byte  shift  is  displayed;  0  only
  270. for  8  bit  data, 0 or 1 for 16 bit data, or 0, 1, 2 or 3 for 32
  271. bit data.
  272.  
  273.       There can be multiple windows on the  screen  at  the  same
  274. time but each window will have a status line at the bottom.
  275.  
  276.       The  very  bottom  line  on  the screen is the prompt line.
  277. This is where you enter data that BEAV requests.    If  you  want
  278. to  edit  a  new  file  you  would type 'Ctl-X Ctl-V', BEAV would
  279. respond with "Visit file:"  on  the  prompt  line.    The  cursor
  280. would  be  positioned  after  the  prompt.   You would then enter
  281. the name of the file that you wished to edit.
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.                               - 5  -
  294.  
  295.  
  296.  
  297.  
  298.  
  299.                          BEAV User Manual
  300.  
  301.  
  302.  
  303.       If you entered the command by mistake, you  can  abort  the
  304. operation  by  typing  a  'Ctl-G'.    'Control  G' is a universal
  305. abort command  and  can  be  used  anywhere.    If  you  want  to
  306. perform  a  search  you  will  enter  the  search  string on this
  307. line.   When you have  entered  the  information  that  BEAV  has
  308. requested  hit  'Return'  and  the  cursor  will  return  to it's
  309. original position in the window display area.   The  prompt  line
  310. is also where error messages are displayed.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.                               - 6  -
  359.  
  360.  
  361.  
  362.  
  363.  
  364.                          BEAV User Manual
  365.  
  366.  
  367.  
  368.  2.3       Display Modes
  369.  
  370.       The  data  in  the  buffer  can be displayed in a number of
  371. formats.   First  there  is  the  display  mode.    This  can  be
  372. either; HEXADECIMAL, DECIMAL, OCTAL, BINARY, ASCII, or EBCDIC.
  373.  
  374.       If  ASCII  or  EBCDIC  mode is chosen then each byte in the
  375. buffer will be converted to it's ASCII or  EBCDIC  character  and
  376. displayed.    Bytes  that  are  outside of the standard character
  377. set  will  be  displayed  as  a  dot.    Each  line  will  be  64
  378. characters long.   The  byte  value  for  "carriage  return"  and
  379. "line   feed"   will   be   displayed  as  a  dot  as  any  other
  380. non-printable characters.
  381.  
  382.       Within HEXADECIMAL, DECIMAL, OCTAL, or  BINARY  format  the
  383. data  can  be  displayed in 8, 16 or 32 bit values.   If 16 or 32
  384. bit values are displayed  the  user  can  choose  to  view  these
  385. values  in  either  the Intel format or the Motorola format.   If
  386. Intel format is chosen then the first byte in each  unit  is  the
  387. least  significant  byte  when the value is calculated.   Thus in
  388. hex 32 bit mode  a  byte  string  of  "32  7A  9F  10"  would  be
  389. displayed  as  "109F7A32".    If  Motorola  format is chosen this
  390. value would be displayed as "327A9F10".
  391.  
  392.       There is another display format  choice  that  affects  the
  393. 16  or  32  bit  formats.   This is called shift.   The shift can
  394. be 0 or 1 for 16 bit modes, or 0, 1,  2,  3  for  32  bit  modes.
  395. Shift  moves  the  zero  point reference for the buffer up by the
  396. selected value.   The default is zero shift.    If  a  buffer  is
  397. displaying the following 32 bit hex data;
  398.  
  399.            "12345678 2F4792AF 673DFEA1 88551199"
  400.  
  401. with the shift at 0.   Changing shift to 1 will produce;
  402.  
  403.            "3456782F 4792AF67 3DFEA188 55119955"
  404.  
  405. The  data  has  been slid down toward the beginning of the buffer
  406. by one byte.   This has not changed the data  in  the  buffer  at
  407. all,  it  has only affected the way that the data is presented on
  408. the screen.   This is useful  when  looking  at  WORD  or  DOUBLE
  409. WORD data that is not aligned on two or four byte boundaries.
  410.  
  411.       When  BEAV  is  first started or a new window is opened the
  412. default format is HEXADECIMAL BYTES.
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.                               - 7  -
  424.  
  425.  
  426.  
  427.  
  428.  
  429.                          BEAV User Manual
  430.  
  431.  
  432.  
  433.  2.4       Commands
  434.  
  435.       Commands  are  the  means  that  the  user   controls   the
  436. operation  of  BEAV.   A command can be given by using one of two
  437. methods.   The first is to use the key binding.
  438.  
  439.       A command can have one or  more  associated  key  bindings.
  440. It  can  also  have  no key binding.   There are a set of default
  441. key bindings that BEAV comes configured with.   The  current  set
  442. of  key  bindings  can be seen by using the 'help' command.   The
  443. 'help' command is 'Esc ?' or Function  Key  1  'F1'  on  the  IBM
  444. PC.    The  help  buffer can be scrolled by using the up and down
  445. arrow keys.   A printed copy may be  obtained  by  going  to  the
  446. bottom  of  the help buffer using the 'move-to-end' command ('Esc
  447. >' or the 'End' key).    Then  issue  the  'print-mark-to-cursor'
  448. command  ('Esc  P' or 'Ctl-Print') and enter 'PRN' or a file name
  449. when prompted with "Print to:".   This  will  output  the  entire
  450. help  buffer  to a printer connected to the parallel interface or
  451. the specified file.
  452.  
  453.       The second method of  issuing  a  command  is  to  use  the
  454. 'extended-command'  command  (Esc  X).    You  are prompted for a
  455. command name that you want to execute.   This  method  is  useful
  456. for executing commands that have no key binding.
  457.  
  458.  
  459.  2.5       Buffers
  460.  
  461.       Buffers  are  the  in  memory  storage for all data editing
  462. and viewing.   Each buffer has a name that appears  in  the  mode
  463. line.    Buffers  generally  have  a file name that is associated
  464. with them.   The file name also appears in the mode  line.    The
  465. buffer  name  and  the  file  name are independent but the buffer
  466. name defaults to the file name.
  467.  
  468.       The buffer name is used to  refer  to  a  specific  buffer.
  469. The  'change-buffer'  ('Ctl-X  B')  command will prompt you for a
  470. buffer name.   After you enter a buffer  name  that  buffer  will
  471. be  displayed  in  the  current  window.    If  there  is no such
  472. buffer, one will be created and displayed (it will be empty).
  473.  
  474.       When BEAV is run  with  a  file  name  as  a  command  line
  475. parameter,  the  file is read into a new buffer.  The buffer name
  476. will be made the same as the file name.   The file name  is  only
  477. used  when  the  buffer  is  saved.   If the file name is changed
  478. using the 'buffer-set-file-name'  ('Ctl-X  Ctl-F')  command  then
  479. when the buffer is saved it will be saved to the new file.
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.                               - 8  -
  489.  
  490.  
  491.  
  492.  
  493.  
  494.                          BEAV User Manual
  495.  
  496.  
  497.  
  498.       Buffers  are  dynamically  allocated.   They grow or shrink
  499. as the size of the data they contain changes.   The  buffer  size
  500. can  be  frozen  using  the  'buffer-size-lock'  ('Ctl-X  Ctl-L')
  501. command.    This  prevents  inserting  or  deleting data from the
  502. buffer but data can be modified.
  503.  
  504.       Buffers continue to  exist  even  if  they  are  not  being
  505. displayed.    Buffers  are  saved  in  a  linked list that can be
  506. stepped through using the 'change-to-next-buffer'  ('Esc  +')  or
  507. 'change-to-prev-buffer'    ('Esc    -')    commands.     If   the
  508. 'change-to-next-buffer' command is given  then  the  next  buffer
  509. in the list is displayed in the current window.
  510.  
  511.  
  512.  2.6       Files
  513.  
  514.       Files  are  the  means  of storing data on disk.   Files or
  515. segments of  files  can  be  loaded  into  BEAV  for  editing  or
  516. viewing.    The  file on the disk has not been changed until BEAV
  517. does a save to that file.   When a save to a  file  is  performed
  518. the original file contents in saved in a ".bak" file.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.                               - 9  -
  554.  
  555.  
  556.  
  557.  
  558.  
  559.                          BEAV User Manual
  560.  
  561.  
  562.  
  563.  
  564.  2.7  Key Binding
  565.  
  566.       All  commands  in  BEAV  have  a command name and a default
  567. key binding.   The bindings  may  be  changed  to  suit  personal
  568. preference  by  using  the 'bind-to-key' ('Esc K') command.   The
  569. current binding of a key sequence can be displayed by  using  the
  570. 'binding-for-key' ('Ctl-X ?') command.
  571.  
  572.       Key  bindings  can  be  loaded  automatically  from  a file
  573. named "beavrc".   This file must be in a directory  specified  by
  574. the  PATH  environment variable.   When BEAV is started this file
  575. is read and the bindings are loaded.    This  file  is  a  simple
  576. text file and can be edited to make changes.
  577.  
  578.       The  beavrc  file  contains  three  columns.   The first is
  579. the function name to be bound.   The second is the  key  sequence
  580. that  is  bound  to  that  function.   The third is a number that
  581. defines the key code.   Then the beavrc  file  is  read  in  only
  582. the first and third columns are used.
  583.  
  584.       The  simplest  way  to  create  a  valid  beavrc file is to
  585. first bind the key codes  to  the  desired  functions  using  the
  586. bind-to-key  command.    Next  display  the current bindings in a
  587. window using the help command (Esc ?).    Now  save  that  buffer
  588. to  a  file with the file-write command (Ctl-X Ctl-W).   You will
  589. be prompted for a file name.    This  is  a  valid  beavrc  file.
  590. You  may  want  to  edit  the beavrc file to remove the commented
  591. lines, those beginning with #, to make it load faster.
  592.  
  593.       On unix systems there can be  multiple  beavrc  files,  one
  594. for  each  terminal type.   This is accomplished by appending the
  595. TERM variable to beavrc.   Thus if you use both  a  vt100  and  a
  596. wyse60   terminal,   you   could   have   a   beavrc.wy60  and  a
  597. beavrc.vt100  bindings  file.    When  your  TERM   variable   is
  598. TERM=wy60  then  the beavrc.wy60 bindings file will be used.   If
  599. there is no beavrc.wy60 file then the beavrc file will be used.
  600.  
  601.  
  602.  2.8  Configuration
  603.  
  604.       When the MSDOS version of BEAV run it detects  whether  the
  605. system  is  an  IBM  PC  or a clone.   If a PC is detected then a
  606. set of key bindings  that  use  the  10  function  keys  and  the
  607. relevant   keypad  keys  are  loaded.    If  the  system  is  not
  608. recognized then only the standard bindings are loaded.
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.                               - 10 -
  619.  
  620.  
  621.  
  622.  
  623.  
  624.                          BEAV User Manual
  625.  
  626.  
  627.  
  628.       If a PC is detected the screen is managed  by  making  BIOS
  629. level  calls  that  enhance  performance.   Otherwise, the screen
  630. is controlled by making ANSI compatible calls  to  the  operating
  631. system.    This  is  much slower but is not sensitive to hardware
  632. configuration.   This requires that  non-standard  MSDOS  systems
  633. support  ANSI  display  controls.    The  following  ANSI  escape
  634. sequences are used;
  635.  
  636.       Position cursor          ESC [ <row> ; <column> H
  637.  
  638.       Erase to end of line     ESC [ 0 K
  639.  
  640.       Erase to end of page     ESC [ 0 J
  641.  
  642.       Normal video             ESC [ 0 m
  643.  
  644.       Reverse video            ESC [ 7 m
  645.  
  646.       On  unix  systems  the  termcap  library  is  used.    This
  647. requires that the TERM environment variable be set correctly.
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.                               - 11 -
  684.  
  685.  
  686.  
  687.  
  688.  
  689.                          BEAV User Manual
  690.  
  691.  
  692.  
  693.  
  694. 3.    Command Description
  695.  
  696.       This  section  describes  all  BEAV  commands  as  to their
  697. function and any side effects that they  may  have.    The  first
  698. line  of  each  description  of  a  command  will  begin with the
  699. default key binding then the command name and  follows  with  the
  700. key binding for a PC for the MSDOS version.
  701.  
  702.  3.1  Help
  703.  
  704.       This  command  returns information that will aid in the use
  705. of BEAV.
  706.  
  707.       Esc ?          help                     F1
  708.  
  709.       A new window is opened  by  splitting  the  current  window
  710. then  all  current  key  bindings are displayed.   This buffer is
  711. larger than can be shown at one time  and  must  be  scrolled  up
  712. and  down  to  see all entries.    All commands that do not alter
  713. data can be used to move  around  and  search  the  help  buffer.
  714. To   leave  the  help  buffer  use  the  'window-delete'  command
  715. ('Ctl-X 0').
  716.  
  717.       Lines  that  begin  with  the  comment  character  (#)  are
  718. commands that have the  default  bindings.    Lines  without  the
  719. comment  character  have  been bound by the user or by processing
  720. a beavrc file.    The  comment  character  helps  in  creating  a
  721. beavrc   file  by  identifying  only  those  bindings  that  have
  722. changed.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.                               - 12 -
  749.  
  750.  
  751.  
  752.  
  753.  
  754.                          BEAV User Manual
  755.  
  756.  
  757.  
  758.  3.2  Cursor Movement
  759.  
  760.       There are  a  number  of  commands  that  move  the  cursor
  761. around  the  current window.   If the cursor bumps the top or the
  762. bottom  of  the  window  the  position  of  the  window  will  be
  763. adjusted so as to keep the cursor within the bounds.    When  the
  764. window  is  moved  in response to cursor movements it is moved by
  765. about one third of the window size.   This  improves  performance
  766. by reducing the number of window moves.
  767.  
  768.       Ctl-P          move-back-line           North (up arrow)
  769.       Ctl-N          move-forw-line           South (down arrow)
  770.  
  771.       These  commands  move  the  cursor  up one line or down one
  772. line.   If the cursor is on the top line  in  the  buffer  and  a
  773. 'move-back-line'  command  is  given  the cursor will jump to the
  774. beginning of the first unit in the buffer.    If  the  cursor  is
  775. on  the  last  line of the buffer and a 'move-forw-line' is given
  776. the cursor will move to the last unit in the buffer.
  777.  
  778.       Ctl-F          move-forw-char           East (right arrow)
  779.       Ctl-B          Move-back-char           West (left arrow)
  780.  
  781.       These commands move the cursor forward or backward  in  the
  782. current  line.    If  the cursor is at the first character in the
  783. first unit of  the  line  and  the  'move-back-char'  command  is
  784. given  then  the  cursor  will  wrap to the last character of the
  785. previous line.   If the cursor is at the last  character  of  the
  786. last  unit  in  the  current  line then it will wrap to the first
  787. character of the next line.
  788.  
  789.       Esc F          move-forw-unit           Ctl-East
  790.       Esc B          move-back-unit           Ctl-West
  791.  
  792.       These commands are similar to the above set but  they  move
  793. the  cursor  by  units  rather  than  characters.    The  command
  794. 'move-forw-unit'   will   position   the   cursor  to  the  first
  795. character of the next unit.   The command  'move-back-unit'  will
  796. move the cursor to the first character of the previous unit.
  797.  
  798.       Ctl-V          move-forw-page           PageUp
  799.       Esc V          move-back-page           PageDown
  800.  
  801.       These  commands  move  the  move  the data in the window by
  802. the number of lines in the window less  one.    The  cursor  will
  803. stay  in  the same position relative to the window as the data is
  804. moved.
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.                               - 13 -
  814.  
  815.  
  816.  
  817.  
  818.  
  819.                          BEAV User Manual
  820.  
  821.  
  822.  
  823.       Esc <          move-to-beginning        Home
  824.       Esc >          move-to-end              End
  825.  
  826.       Move the cursor to the beginning or the end of the buffer.
  827.  
  828.       Ctl-X G        move-to-byte             F9
  829.  
  830.       Prompt for a byte offset, then go to that position  in  the
  831. current buffer.
  832.  
  833.       Ctl-X Ctl-N    move-window-down         Ctl-Z
  834.       Ctl-X Ctl-P    move-window-up           Esc Z
  835.  
  836.       Move  the  buffer  in  the  window  up or down by one line.
  837. This does not effect the cursor until it hits the top  or  bottom
  838. of the window.
  839.  
  840.       Esc .          mark-set                 F2
  841.  
  842.       Set  the  mark  position  to  the  current cursor position.
  843. The mark position is remembered even for  nonactive  windows  and
  844. buffers.
  845.  
  846.       Ctl-X Ctl-X    swap-cursor-and-mark
  847.  
  848.       The  position  of  the  cursor and the position of the mark
  849. are swapped.
  850.  
  851.       Esc L          window-link
  852.  
  853.       This command causes all windows  that  are  displaying  the
  854. contents   of   the  current  buffer  to  have  the  same  cursor
  855. position.   Thus  if  one  window  is  scrolled  then  all  other
  856. windows  that  display that buffer are scrolled so as to keep the
  857. cursor in the window.
  858.  
  859.       Ctl-X =        show-position
  860.  
  861.       The current  position  of  the  cursor  and  the  mark  are
  862. displayed.    The  buffer  size, file size and file name are also
  863. shown.
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.                               - 14 -
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                          BEAV User Manual
  885.  
  886.  
  887.  
  888.  3.3  Buffer Management
  889.  
  890.       Buffers store all data that is  being  edited.    The  only
  891. limit  to  the  number  of  buffers  is  the  size  of  available
  892. memory.    If  a  file  is  loaded  into  a  buffer  and there is
  893. insufficient memory to hold the entire  file,  then  it  will  be
  894. loaded  until  memory is exhausted.   The buffer will then be set
  895. to read only mode.
  896.  
  897.       Ctl-X Ctl-B    buffers-display          Ctl-F1
  898.  
  899.       A new window is opened and a list of all  buffers  in  BEAV
  900. is  displayed.    The  list  contains  the  buffer name, the file
  901. name (if it exists), the buffer size,  and  a  state  flag.    If
  902. the  list  is too large for the window, you can go to that window
  903. and scroll the list.
  904.  
  905.       Ctl-X B        change-buffer            Ctl-F2
  906.  
  907.       This command prompts  you  for  a  buffer  name.    If  you
  908. enter  the  name  of  an  existing  buffer,  that  buffer will be
  909. displayed in the current window.   If the  name  does  not  match
  910. an   existing   buffer,   a   new  buffer  will  be  created  and
  911. displayed.   This buffer will be empty  and  will  have  no  file
  912. name.
  913.  
  914.       Esc +          change-to-next-buffer    Ctl-F4
  915.       Esc -          change-to-prev-buffer    Ctl-F5
  916.  
  917.       The  next  or  the  previous  buffer  in the buffer list is
  918. displayed in the current window.   This does not  effect  buffers
  919. that are displayed in other windows.
  920.  
  921.       Esc G          move-to-buffer-split
  922.  
  923.       Prompt  for  a buffer name.   Then split the current window
  924. and display that buffer, creating it if necessary.
  925.  
  926.       Esc Ctl-N      buffer-set-name          Esc Ctl-N
  927.  
  928.       The current buffer name is changed to  the  name  that  you
  929. enter.   This does not effect the file name.
  930.  
  931.       Ctl-X Ctl-F    buffer-set-file-name     Ctl-F7
  932.  
  933.       The  file  name  of  the  current  buffer is changed to the
  934. name that you enter.   This does not affect the buffer name.
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.                               - 15 -
  944.  
  945.  
  946.  
  947.  
  948.  
  949.                          BEAV User Manual
  950.  
  951.  
  952.  
  953.       Ctl-X K        kill-buffer              Ctl-F3
  954.  
  955.       This command prompts you for a buffer name.    This  buffer
  956. is  then  deleted.    If  the buffer is currently being displayed
  957. you are prompted for  conformation.    If  the  buffer  has  been
  958. changed you are again prompted for conformation.
  959.  
  960.       Ctl-X Ctl-L    buffer-size-lock
  961.  
  962.       The  buffer  size  is  prevented from being changed.   Data
  963. can be edited but only by changing  the  existing  data.    If  a
  964. buffer  is  copied  into  a size-locked buffer the operation well
  965. be successful but will overwrite existing  data.    This  command
  966. toggles between locked and unlocked.
  967.  
  968.       Esc Y          yank-buffer              Ctl-F6
  969.  
  970.       Data  from  one  buffer is inserted into the current buffer
  971. at the cursor position.   You are prompted for the  name  of  the
  972. buffer to copy from.
  973.  
  974.       Esc O          save-mark-to-cursor
  975.  
  976.       Prompt  for  a buffer name.   Create a new buffer with that
  977. name and write the data from the mark to  the  cursor  into  that
  978. buffer.
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.                               - 16 -
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.                          BEAV User Manual
  1015.  
  1016.  
  1017.  
  1018.  3.4  File Management
  1019.  
  1020.       These  commands  control  BEAV's  access  to files.   Files
  1021. are loaded into buffers or are written from  buffers.    Commands
  1022. that  prompt  for  a  file  name  also  accept  range parameters.
  1023. Range parameters are always given in  the  numeric  base  of  the
  1024. current  window.    Thus  if  you  are displaying data in decimal
  1025. format then the range parameters must be entered in decimal.
  1026.  
  1027.       The size of  a  file  read  or  write  can  be  limited  by
  1028. specifying  a  range.    The range parameter specifies the offset
  1029. into  the  file,  not  the  buffer.    Range  parameters  can  be
  1030. specified in these forms;
  1031.  
  1032.       <file name> <start address>
  1033.  
  1034.       <file name> <start address> <end address>
  1035.  
  1036.       <file name> <start address> +<length>
  1037.  
  1038.       The first form causes the read or write to begin  from  the
  1039. <start  address>  value  until  the end of the buffer on write or
  1040. the end of the file on read.
  1041.  
  1042.       The second  form  reads  or  writes  from  <start  address>
  1043. until <end address> non-inclusive.
  1044.  
  1045.       The  third  form  reads  or writes from <start address> for
  1046. <length> bytes.
  1047.  
  1048.       Thus, if the command 'file-read' is  given  and  you  enter
  1049. at  the  prompt;    main.obj  1000 +100.   If the current display
  1050. mode is hex, the file "main.obj"  will  be  read  from  hex  byte
  1051. address 1000 to 10FF into the buffer.
  1052.  
  1053.       Ctl-X Ctl-R    file-read                Sh-F2
  1054.  
  1055.       Prompt  for  a  file  name  and  read  that  file  into the
  1056. current buffer.   This overwrites the  current  contents  of  the
  1057. buffer.    The  buffer  name  is  not changed but the buffer file
  1058. name is set to the new file name.
  1059.  
  1060.       Ctl-X Ctl-S    file-save                Sh-F3
  1061.  
  1062.       Write the current buffer out to the file  if  it  has  been
  1063. changed.   If the buffer has not been changed then do nothing.
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.                               - 17 -
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.                          BEAV User Manual
  1080.  
  1081.  
  1082.  
  1083.       Ctl-X V        file-view
  1084.  
  1085.       Prompt  for  a  file  name  and read file into a new buffer
  1086. and display in current window.   Set to read-only mode.
  1087.  
  1088.       Ctl-X Ctl-V    file-visit               Sh-F4
  1089.  
  1090.       Prompt for a file name.    If  the  buffer  already  exists
  1091. then  display  it  in  the current window.   Otherwise, read file
  1092. into a new buffer and display in current window.    If  there  is
  1093. no such file then create it.
  1094.  
  1095.       Esc U          file-visit-split
  1096.  
  1097.       Same  as  above  but  split  current window and display new
  1098. buffer.   This displays  the  new  buffer  as  well  as  the  old
  1099. buffer.
  1100.  
  1101.       Ctl-X Ctl-W    file-write               Sh-F5
  1102.  
  1103.       Prompt  for  a  file name, then write the current buffer to
  1104. that file.
  1105.  
  1106.       Ctl-X Tab      insert-file              Sh-F8
  1107.  
  1108.       Prompt for a file  name  and  insert  that  file  into  the
  1109. current buffer at the cursor position.
  1110.  
  1111.       Ctl-X Return   save-all-buffers         Sh-F6
  1112.  
  1113.       Write   all   buffers  that  have  been  changed  to  their
  1114. respective files.
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.                               - 18 -
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.                          BEAV User Manual
  1145.  
  1146.  
  1147.  
  1148.  3.5                 Window Management
  1149.  
  1150.       BEAV presents information  to  the  user  in  one  or  more
  1151. windows.    Each  window  is  a view into a buffer where the data
  1152. is actually stored.    The  window  controls  how  this  data  is
  1153. formatted  for  display  to  the user.   Data can be displayed as
  1154. HEX bytes, OCTAL  bytes,  ASCII  characters,  plus  many  others.
  1155. The  display  format  is  associated with the window.   Thus if a
  1156. new buffer is displayed in  the  current  window  that  new  data
  1157. will be displayed in the current windows format.
  1158.  
  1159.       The  only  limit  to  the  number  of windows is the screen
  1160. size.   A window can be no smaller than two lines.    This  along
  1161. with  the  mode  line associated with each window limits to eight
  1162. the number of windows on an IBM PC 25 line screen.
  1163.  
  1164.       Any window  can  view  any  buffer  including  having  many
  1165. windows  on  the  same  buffer.    For  example,  two windows can
  1166. display the same buffer but present the  data  in  two  different
  1167. modes.    One  window could display HEX bytes and the other could
  1168. display ASCII characters.
  1169.  
  1170.       Ctl-P          change-window-back       Ctl-PageUp
  1171.       Ctl-N          change-window-forw       Ctl-PageDown
  1172.  
  1173.       These commands move the cursor  to  the  next  or  previous
  1174. window on the screen, making it the current window.
  1175.  
  1176.       Ctl-X Z        window-enlarge
  1177.       Ctl-X Ctl-Z    window-shrink
  1178.  
  1179.       Enlarge or shrink the current window size by one line.
  1180.  
  1181.       Esc !          window-reposition
  1182.  
  1183.       Move  window  position  so  that  the cursor is centered in
  1184. the window.   The cursor position in the buffer does not change.
  1185.  
  1186.       Ctl-X 2        window-split
  1187.  
  1188.       Split the current window into  equal  parts.    Both  haves
  1189. have the same display mode and view the save buffer.
  1190.  
  1191.       Ctl-X 1        window-single
  1192.  
  1193.       Expand  the  current window to fill the entire display, all
  1194. other windows are removed.   Make the  current  window  the  only
  1195. window   displayed.    This  has  no  effect  on  the  underlying
  1196. buffers except that they may not be displayed any more.
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.                               - 19 -
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.