home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / be.zip / be.hlp < prev    next >
Text File  |  2000-01-12  |  20KB  |  416 lines

  1. Andys Binary Folding Editor, online help file, 12/01/00
  2.  
  3. --- General keys --------------------------------------------------------------
  4.  
  5. Up,Down,PgUp,PgDn,Home,End,Left,Right  Move around the list on display.
  6. ^E,^X,^R,^C,^W,^Z,^S,^D  WordStar cursor-diamond is supported too.
  7. Esc         Discard current list on display, and step back to previous.
  8. q,@X        Exit the editor, optionally saving any unsaved changes.
  9. @W          Write unsaved changes back to files or extensions.
  10. p           Print the current list on display to a file (overwrite or append).
  11. ^P          Print the current list, append to same file as last time.
  12. f,/,F9      Find a pattern or extended regular expression.
  13. n,F10       Repeat last find.
  14. \           Reverse direction of next 'repeat last find'.
  15. i,x         Pop-up new list made from current list, with just those lines
  16.             which include or exclude a pattern or extended regular expression.
  17. S           Pop-up new list made from current list, except lines are sorted.
  18. N           Pop-up new list made as a snapshot of the current list.
  19.             Useful when viewing live (continually changing) data.
  20. @R          Toggle between pattern mode, and extended regular expression mode.
  21. @I          Toggle between case-sensitive and non-case-sensitive modes.
  22. r           Refresh the screen, without necessarily re-fetching data.
  23. R           Refresh the data (if any is cached) and then the screen.
  24. @U          Enter auto-refresh mode, which refreshes the data and screen, until
  25.             you hit Ctrl+Break (OS/2, Windows and DOS) or Esc (elsewhere).
  26. @T          Place or remove tag from current line.
  27. T           Tag all lines matching pattern or extended regular expression.
  28. U           Untag all lines matching pattern or extended regular expression.
  29. ^Home,^End  Skip to previous or next tag in current list.
  30. @V          Pop-up list of lines in a text file, Esc to discard.
  31. F1          Bring up this help file, Esc to discard.
  32. F2          Bring up the initialisation file, Esc to discard.
  33. F3          Behaves like Enter, when on a line in a list (like fold_in).
  34. F4          Behaves like Esc, when in a list (like fold_out).
  35. !           Execute operating system command.
  36. @0,@1,...,@9  Jump to session 0 to 9. Initially in session 1.
  37. @C          Copy previous session stack of lists onto current session.
  38. @K          Show summary of all stacks of list on all sessions.
  39. @F          Pop-up list of memory sections (ie: files/extensions being edited).
  40. @M          Pop-up list of power address slide patterns.
  41. @Z          Discard all popped-up lists, back to the topmost level of nesting.
  42. @F1,@F2,@F3,@F4  Change to colour scheme 0 to 3.
  43. A,O,L,I     Toggles display of addresses, offsets, lengths and array indices.
  44. @A,@E,@B,@O,@D,@H  Set display of array indices to ASCII, EBCDIC, binary,
  45.             octal, decimal or hex.
  46. @Y          Toggles display of addresses between hex and symbol+offset forms.
  47. @J          Toggles display of ARM specific long-jump addresses.
  48. |           Toggles display of | symbols between flags in mappings.
  49. &           Toggles display of pointer values
  50. @           Display given definition at a given address.
  51.             You'll first be prompted for definition name.
  52.             You can append a count to this to display an array.
  53.             Then you'll be prompted for the address.
  54.             Pop-up a list of the fields in the definition at that address.
  55. C           Disassemble at a given address.
  56.             Pop-up a list of the instructions at that address.
  57. D           Pass through user-options into disassembler.
  58. Y           Toggle stop-disassembly at symbolic address change flag.
  59. #           Set address-slide delta value (its initially 4).
  60.             . in new value expression means current value.
  61. ?           Evaluate and display numeric expression.
  62. $           Set variable to expression, or unset variable.
  63. ~F1,~F2,...,~F12  Set (or disable) power-address-slide pattern.
  64. ^L          For a given number of lines, perform a given keypress.
  65.             ie: an easy way to do something to a number of lines on display.
  66.             A zero or blank count means all the lines from current onwards.
  67. ^K          Toggle the ^L 'keep going on error' flag.
  68. ^           Set max number of elements in array/linked list to show.
  69. ^U,^V       Cycle memory sections one way or the other.
  70. @G          Goto Nth line on display (numbered from 0 upwards).
  71.  
  72. --- When displaying data ------------------------------------------------------
  73.  
  74. .           Change current address (shown on title) to a new specified value.
  75.             . in address expression means current address (shown on title).
  76. ,           Move current address (shown on title) by a specified amount.
  77. (,)         Address-slide current address (shown on title) bwd/fwd by 1.
  78. <,>         Address-slide current address (shown on title) bwd/fwd by delta.
  79. [,]         Begin power-address-slide bwd/fwd (uses delta as the step).
  80. {,}         Continue previous power-address-slide bwd/fwd. Can be stopped via
  81.             Ctrl+Break (OS/2, Windows and DOS) or Esc (elsewhere).
  82. @           Display given definition at a given address (as above).
  83.             . in address expression means current address (shown on title).
  84. ?           Evaluate and display numeric expression (as above)
  85.             . in expression means current address (shown on title).
  86. $           Set variable to expression, or unset variable (as above)
  87.             . in expression means current address (shown on title).
  88. C           Disassemble at a given address (as above).
  89.             . in address expression means current address (shown on title).
  90. @P          Pop-up a list of all the definitions that include the current one.
  91.  
  92. --- Manipulating the current datum --------------------------------------------
  93.  
  94. g/l         Cause multibyte numeric values to be composed big or little endian.
  95. s/u         Cause numeric values to be considered signed or unsigned.
  96. a/e/b/o/d/h/k/y/m  Show current datum in ASCII, EBCDIC, binary, octal, decimal,
  97.             hex, decode seconds since epoch, by symbol table, or via a mapping.
  98. z           Toggle the 'stop displaying current buffers at 0 terminator' flag.
  99. t           Pop-up new list with current data item split into lines of ASCII
  100.             text, based upon CR, CR-LF or LF boundarys.
  101. +/-         Increase or decrease the level of detail on display.
  102. Enter       Pop-up a list made by showing the current datum in more detail.
  103.             This can mean show the elements of a structure definition, or
  104.             show the elements of a definition pointed to by the current datum,
  105.             or expand an array of elements, one to a line.
  106.             Esc discards the new list, back to the current list.
  107. *           Current numeric datum is the address, BE prompts for definition.
  108.             Operates much like @ key, only address is taken from numeric datum.
  109.             Pop-up a list of the fields in the structure at that address.
  110. P           Set/change what definition the current numeric field points to.
  111. c           Current numeric datum is the code address.
  112.             Pop-up a disassembly of the code at that address.
  113. @L          When looking at a definition, and you are on a pointer to the same
  114.             type of definition, this pops-up a list of linked-list elements.
  115. =           Assign new value to current datum.
  116.             If numeric, . in the new expression means the current value.
  117. M           Pop-up a maplet list and show if each can be decoded from value.
  118. @S          Toggle field suppress attribute (as shown in one line summary).
  119. @N          Set field suppress attribute.
  120. v           Disable (or re-enable) fields validity check.
  121. V           Set/change the fields validity check expression.
  122. w           Set field width. 0 means no padding/truncation.
  123. Del         Copy current datum to memory clipboard or to a named file.
  124. Ins         Paste from memory clipboard or from a named file.
  125. E           Edit datum using external editor.
  126. Z           Zero a data item.
  127.  
  128. --- When on a maplet list -----------------------------------------------------
  129.  
  130. 0           Logically 'and' value with complement of maplet mask.
  131. 1           As above, then logically 'or' with maplet value.
  132. @S          Toggle maplet suppress attribute.
  133. @N          Set maplet suppress attribute.
  134.  
  135. --- When on a line of code ----------------------------------------------------
  136.  
  137. *           Current instruction has an address, BE prompts for definition.
  138.             Pop-up a list of the fields in the structure at that address.
  139. c           Current instruction references another code address.
  140.             Pop-up a disassembly of the code at that address.
  141.  
  142. --- When on a memory section --------------------------------------------------
  143.  
  144. W           Write unsaved changes in this section back to files or extensions.
  145. o           Send options to a given memory section.
  146.  
  147. --- When on a power address slide pattern -------------------------------------
  148.  
  149. =           Set (or disable) the pattern.
  150.  
  151. --- Conventions in the above --------------------------------------------------
  152.  
  153. ~X is short for Shift+X, ^X is short for Ctrl+X, @X is short for Alt+X.
  154. Note: On UNIX, Esc followed by X is equivelent to Alt+X.
  155.  
  156. --- Whats on the screen -------------------------------------------------------
  157.  
  158. Title line 1: Description of current list, line/totallines, session, nesting.
  159. Title line 2: Subset of keys which may be used now (commonly used ones).
  160. Title line 3: Space for prompts, status information, progress etc..
  161. Other lines : Current list on display, current line highlighted.
  162.  
  163. --- Extended Regular Expressions ----------------------------------------------
  164.  
  165. Some basics just before we start :-
  166.  
  167. <ch>      ::= any typable character
  168. <digit>   ::= any digit from '0' to '9'
  169. <digits>  ::= <digit> { <digit> }
  170. <digit19> ::= any digit from '1' to '9'
  171. <hex>     ::= any digit or letter from 'a' to 'f' or 'A' to 'F'
  172.  
  173. Basic character definitions :-
  174.  
  175. <c> ::= '\n'                    newline
  176.       | '\t'                    tab
  177.       | '\r'                    carriage return
  178.       | '\b'                    backspace
  179.       | '\f'                    formfeed
  180.       | '\e'                    escape
  181.       | '\x' <hex> ( <hex> )    specify character in hex, one or two hex digits
  182.       | '\' <ch>                other character, escaping any special meaning
  183.       | <ch>                    normal character
  184.  
  185. Bracket element (something which goes in a bracket expression) :-
  186.  
  187. <be> ::= <c>                    a character
  188.        | <c> '-' <c>            a range of characters
  189.        | '[:alnum:]'            POSIX alphanumeric characters
  190.        | '[:alpha:]'            POSIX alphabetic characters
  191.        | '[:blank:]'            POSIX space and tab characters
  192.        | '[:cntrl:]'            POSIX control characters
  193.        | '[:digit:]'            POSIX numeric characters
  194.        | '[:graph:]'            POSIX printable and visible (non-space) chars
  195.        | '[:lower:]'            POSIX lowercase characters
  196.        | '[:print:]'            POSIX alphanumeric characters
  197.        | '[:punct:]'            POSIX punctuation characters
  198.        | '[:space:]'            POSIX whitespace characters
  199.        | '[:upper:]'            POSIX uppercase characters
  200.        | '[:xdigit:]'           POSIX hexadecimal digits
  201.  
  202.        | '[.' ??? '.]'          POSIX collating symbols and
  203.        | '[=' ??? '=]'          POSIX equivelence classes
  204.                                 ARE NOT SUPPORTED
  205.  
  206. Bracket expression :-
  207.  
  208. <bx> ::= [ '^' ] { <be> }       defines a set of acceptable characters
  209.                                 or a set of non-acceptable (if '^' present)
  210.  
  211. Extended Regular Expression :-
  212.  
  213. <re> ::=                        empty regular expression
  214.        | <c>                    character
  215.        | '~' <c>                not specified character
  216.                                 shorthand for '[^' <c> ']'
  217.        | '\w'                   matches any 'word consituent' character
  218.                                 shorthand for '[[:alnum:]_]'
  219.        | '\W'                   matches any non 'word consituent' character
  220.                                 shorthand for '[^[:alnum:]_]'
  221.        | '.'                    matches any character (but not end of line)
  222.        | '[' <bx> ']'           matches characters in the bracket expression
  223.        | '^'                    matches empty string at the start of the 'line'
  224.        | '$'                    matches empty string at the end of the 'line'
  225.        | '\`'                   synonym for '^'
  226.        | '\''                   synonym for '$'
  227.        | '\<'                   matches empty string at the start of a 'word'
  228.        | '\>'                   matches empty string at the end of a 'word'
  229.        | '\B'                   matches empty string within 'word'
  230.        | '\y'                   matches empty string at start or end of 'word'
  231.                                 shorthand for '(\<|\>)'
  232.                                 note: not '\b', as this clashes with backspace
  233.        | <re> <re>              2 <re>'s concatenated form a <re>
  234.        | '(' <re> ')'           nested regular expression
  235.        | '\' <digit19>          backreference to nested regular expression
  236.        | <re> '?'               zero or one occurrance of <re>
  237.        | <re> '+'               one or more occurrances of <re>
  238.        | <re> '*'               zero or more occurrances of <re>
  239.        | <re> '{' <digits> '}'  matches M occurances of <re>
  240.        | <re> '{' <digits> ',}' matches at least M occurances of <re>
  241.        | <re> '{' <digits> ',' <digits> '}'
  242.                                 matches between M and N occurances of <re>
  243.        | <re> '|' <re>          matches one <re> or the other
  244.  
  245. --- BE initialisation file language -------------------------------------------
  246.  
  247. Some basics just before we start :-
  248.  
  249. <number> ::= a number in C/C++ style
  250.              as in 0b1101, 0o15, 13, or 0x0d, or '\r' or similar
  251. <id>     ::= a C/C++ style identifier
  252. <string> ::= a C/C++ style double quoted string
  253.              which is clean (characters between 32 and 126 only)
  254.              as in "Hello World" etc.
  255. <buffer> ::= a string or hexstring buffer
  256.              as in "SIGNATURE" or @FF0022
  257.  
  258. Numeric expressions :-
  259.  
  260. <sep>    ::= { ',' | ';' }
  261.  
  262. <expr13> ::= <number>
  263.            | '+' <expr13>
  264.            | '-' <expr13>
  265.            | '~' <expr13>
  266.            | '!' <expr13>
  267.            | 'addr' <string>
  268.            | 'sizeof' <id>
  269.            | 'offsetof' <id> <string>
  270.            | 'valof' <string>
  271.            | 'map' <id> <string>
  272.            | '(' <expr> ')'
  273.            | <id>
  274.            | '`' <id> <expr> '`'
  275.            | '.'
  276.            | '[' <n_value> <sep> <expr> [ <sep> <expr> ] ']'
  277.            | '[[' <buffer> <sep>
  278.              <expr> <sep> <expr> <sep> <expr> [ <sep> <expr> ] ']]'
  279.            | 'strlen' <expr>
  280.  
  281. <expr12> ::= <expr13> { ( '*' | '/' | '%' ) <expr13> }
  282. <expr11> ::= <expr12> { ( '+' | '-' ) <expr12> }
  283. <expr10> ::= <expr11> { ( '<<' | '>>' | '>>>' ) <expr11> }
  284. <expr9>  ::= <expr10> { ( '>' | '<' | '>=' | '<=' ) <expr10> }
  285. <expr8>  ::= <expr9>  { ( '==' | '!=' ) <expr9> }
  286. <expr7>  ::= <expr8>  { '&' <expr8> }
  287. <expr6>  ::= <expr7>  { '^' <expr7> }
  288. <expr5>  ::= <expr6>  { '|' <expr6> }
  289. <expr4>  ::= <expr5>  { '&&' <expr5> }
  290. <expr3>  ::= <expr4>  { '^^' <expr4> }
  291. <expr2>  ::= <expr3>  { '||' <expr3> }
  292. <expr>   ::= <expr2>  { '?' <expr2> ':' <expr2> }
  293.  
  294. Sometimes in expressions . (dot) is allowed. It usually refers to some default
  295. amount. Other times it isn't allowed.
  296.  
  297. A maplet is mapping from a number to a string to display, and
  298. a map is zero or more maplets. Using . in the maplet value (first expression)
  299. means 0 or previous value plus 1, and in the maplet mask (optional second
  300. expression) it means the same as the value.
  301.  
  302. <maplet> ::= <string> [ 'suppress' ] <expr> [ ':' <expr> ]
  303. <map>    ::= 'map' <id> [ 'add' ] '{' { <maplet> } '}'
  304.  
  305. Numeric fields. Where the value comes from, how to display it, how to use it as
  306. a pointer (if it is one), and putting it all together :-
  307.  
  308. <n_value>       ::= ( 'n8'  | 'n16' | 'n24' | 'n32' |
  309.                       'n40' | 'n48' | 'n56' | 'n64' )
  310.                     [ 'le' | 'be' ]
  311.                     [ 'bits' <expr> ':' <expr> ]
  312.                     [ 'signed' | 'unsigned' ]
  313. <expr_value>    ::= 'expr' <string>
  314. <code_attrs>    ::= [ 'lj' | 'nolj' | 'glue' | 'noglue' ]
  315. <numeric_attrs> ::= [ 'map' <id> ]
  316.                     [ 'asc' | 'ebc' | 'bin' | 'oct' | 
  317.                       'dec' | 'hex' | 'sym' | 'time' ]
  318.                     [ 'code' <code_attrs> | 'nocode' ]
  319. <pointer_attrs> ::= [ 'ptr' <id>
  320.                       [ 'null' | 'nonull' ]
  321.                       [ 'rel' | 'abs' ]
  322.                       [ 'mul' | 'nomul' ]
  323.                       [ 'mult' <expr> ]
  324.                       [ 'add' <expr> ]
  325.                       [ 'align' <expr> ]
  326.                       [ 'seg' | 'noseg' ]
  327.                     ]
  328. <numeric_field> ::= ( <n_value> | <expr_value> )
  329.                     <numeric_attrs> <pointer_attrs>
  330.  
  331. The expr string is itself a numeric expression. You'll need to escape any
  332. quotes within it.
  333.  
  334. A buffer field. How big, how to show the data, and whether to stop at a NUL
  335. byte. Using . in the buffer size expression gives the current offset into the
  336. definition :-
  337.  
  338. <buffer_field> ::= 'buf' <expr>
  339.                    [ 'hex' | 'asc' | 'ebc' ]
  340.                    [ 'zterm' | 'nozterm' ]
  341.  
  342. A field may name a nested definition :-
  343.  
  344. <def_field> ::= <id>
  345.  
  346. All fields share a set of general attributes, and have a name, so a complete
  347. field specification looks like :-
  348.  
  349. <field> ::= ( <numeric_field> | <buffer_field> | <def_field> )
  350.             { 'open' }
  351.             [ 'valid' <string> ]
  352.             [ 'width' <expr> ]
  353.             [ 'suppress' ]
  354.             [ 'tag' ]
  355.             [ 'at' ]
  356.             <string>
  357.  
  358. The valid string is itself a numeric expression.
  359.  
  360. Fields are just one type of item which can be found within a definition.
  361. Offset within the definition, alignment and nested definitions.
  362. Items in an itemlist follow one another (as in C/C++ structs), or overlay
  363. each other (as in C/C++ unions). Using . in the at expression gives the
  364. current offset into the definition. So definitions are specified as :-
  365.  
  366. <item>     ::= 'at' <expr>
  367.              | 'align' <expr>
  368.              | <itemlist>
  369.              | <field>
  370.              | ';'
  371. <itemlist> ::= [ 'struct' | 'union' ] '{' { <item> } '}'
  372. <def>      ::= 'def' <id> <itemlist>
  373.  
  374. File includes are specified :-
  375.  
  376. <include> := ( 'include' | 'tryinclude' ) <string>
  377.  
  378. The default attributes used, if not fully specified in the fields,
  379. can be specified globally :-
  380.  
  381. <default> := 'asc' | 'ebc' | 'bin' | 'oct' | 'dec' | 'hex' | 'sym' | 'time'
  382.            | 'signed' | 'unsigned'
  383.            | 'be' | 'le'
  384.            | 'rel' | 'abs'
  385.            | 'mul' | 'nomul'
  386.            | 'seg' | 'noseg'
  387.            | 'null' | 'nonull'
  388.            | 'code' | 'nocode'
  389.            | 'lj' | 'nolj'
  390.            | 'glue' | 'noglue'
  391.            | 'zterm' | 'nozterm'
  392.            | ( 'align' ( 'n8'  | 'n16' | 'n24' | 'n32' |
  393.                          'n40' | 'n48' | 'n56' | 'n64' |
  394.                          'def' | '{' | '}' )
  395.                <expr> )
  396.  
  397. Set and unsetting :-
  398.  
  399. <set>   ::= 'set' <id> <expr>
  400. <unset> ::= 'unset' <id>
  401.  
  402. So the total language is :-
  403.  
  404. <be> ::= <map>
  405.        | <def>
  406.        | <include>
  407.        | <default>
  408.        | <set>
  409.        | <unset>
  410.  
  411. -------------------------------------------------------------------------------
  412.  
  413. Full documentation on WWW at http://www.interalpha.net/customer/nyangau/
  414.  
  415. {{{ Andy Key, nyangau@interalpha.co.uk
  416.