home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / fm / fm.doc < prev   
Text File  |  1986-06-16  |  11KB  |  227 lines

  1.  
  2.  
  3.  
  4.  
  5.       DOCUMENTATION FOR FM.COM
  6.  
  7.             FM (for File Modify) is a little utility which allows you to
  8.       easily edit files at the individual byte level.  It is especially
  9.       useful in situations where one might use DEBUG to modify a byte in
  10.       order to patch a program, to change the wording of messages in your
  11.       programs which bother you (its search capabilities are useful for
  12.       this) or to change color attributes in a program.
  13.  
  14.             The program is invoked by typing
  15.                         fm FILESPEC
  16.       If FILESPEC is of the form NAME.EXT, the program with that name in
  17.       the current drive and directory will be loaded.  But fm supports
  18.       other drives and full path names so if your default drive is A: and
  19.       FM.COM is on the current drive or in the DOS search path, the
  20.       command "fm B:\some directory\some filename" will work perfectly.
  21.  
  22.  
  23.       KEYSTOKE COMMANDS
  24.  
  25.             A description of the most important keystrokes is displayed
  26.       on the fm screen and the others are described in the help screen.
  27.       The commands involve the function keys, cursor keypad, <TAB> and
  28.       <ESCAPE>.
  29.  
  30.             The function keys have the following meanings
  31.       F1:Help      F2:Search       F3:NOT USED       F4:NOT USED
  32.       F5:Hex/Decimal toggle   F6:ASCII display toggle    F7:NOT USED
  33.       F8:NOT USED      F9:Sector Save       F10:Sector Jump
  34.  
  35.             <ESCAPE> exits the program, <TAB> toggles the active cursor
  36.       between the HEX and ASCII areas, the cursor arrow keys do the
  37.       obvious things, <PGDN> reads the next sector, <CTRL-PGDN> the
  38.       sector 5 sectors down and <PGUP> (resp. <CTRL-PGUP>) undo the
  39.       actions of <PGDN> (resp. <CTRL-PGDN>). Home moves the cursor to the
  40.       start of the active line and End to the end of the active line.
  41.  
  42.  
  43.       THE FM DISPLAY
  44.  
  45.             Fm displays the file in "sectors" of 256 bytes each in 16
  46.       lines with 16 bytes per line.  The line below the main display
  47.       shows the file name, its date and time of creation or last update
  48.       and the word HEX or ASCII indicating which part of the main display
  49.       is active.  The <TAB> key toggles which is the active display and
  50.       in addition to status line the active display is indicated by the
  51.       block cursor.  Modifications are made on the active display as will
  52.       be explained.
  53.  
  54.             The first column of numbers in the active display labels the
  55.       lines by indicating the number of the first byte on the line.  In
  56.       the default mode the numbers are in hexidecimal and appear in <..>.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.       The <F5> key toggles to a decimal numbering of the lines.  The next
  65.       16 columns of data show the HEX value of each byte, the 256
  66.       possibilities for a byte corresponding to two HEX digits.  The next
  67.       "column" gives the current sector number within the file and the
  68.       number of sectors.  In default mode, these numbers are given in HEX
  69.       but <F5> toggles not only the line numbers but also whether these
  70.       numbers are given in HEX or decimal.  This same column also reports
  71.       the current value of the <F5> HEX/decimal toggle.
  72.  
  73.             The right hand columns show the individual lines in ASCII
  74.       form.  In the default mode, only "text characters" are shown with
  75.       all non-text characters (ASCII numbers 0-31;129-256) are indicated
  76.       by periods.  <F6> toggles to and from a mode where these characters
  77.       are shown.  In the non-text mode, you can do a screen dump with
  78.      <Shift PrtSc>
  79.  
  80.             A help screen is displayed if one hits <F1>.  You can exit the
  81.       help screen by hitting <F1> or <ESCAPE>.
  82.  
  83.  
  84.  
  85.       MANEUVERING
  86.  
  87.             The <PGDN> and <PGUP> keys read the next and previous
  88.       sectors.  Depressing the <CTRL> key while hitting these keys makes
  89.       a change of 5 sectors.  If the <F10> key is depressed, you are
  90.       prompted for a new sector number.  Responding <ENTER> will move you
  91.       to the first sector (thus since unsuccessful searches will leave
  92.       you in the last sector, you'll probably want to follow an
  93.       unsuccessful search by the <F10>,<ENTER> combination).  Otherwise,
  94.       a number should be entered and the program will jump to the
  95.       appropriate sector.  If line numbers, etc are displayed in HEX
  96.       (resp decimal), the sector number should be entered in HEX (resp.
  97.       decimal).
  98.  
  99.  
  100.       MODIFYING
  101.  
  102.             The whole point of FM is to change the file.  In the default
  103.       mode, the block cursor is in the ASCII part of the screen.  The
  104.       cursor can be moved with the arrow, home and end keys.  If a text
  105.       character is struck, the character at the cursor is replaced by the
  106.       character struck.  The <TAB> key toggles to the HEX display.
  107.       Modification of the two HEX digit byte under the cursor is made by
  108.       striking the appropriate keys.  Even if only one of the two digits
  109.       needs to be changed, you must enter both of them.  If you have
  110.       entered the first digit, it will change on the display and flash
  111.       until the second digit is entered.  If any key other than 0-9,a-e
  112.       is struck the byte returns to its initial value.
  113.  
  114.             Any changes made are indicated on both the HEX and ASCII
  115.       display but they are only made in memory and NOT on the original
  116.       file.  To make the changes in the original file, you must hit the
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.       <F9> key.  <F9> only saves the changes made in the currently active
  125.       sector and not any changes made previously in other sectors.  If
  126.       you try to exit the program or change the sector shown and you have
  127.       made any unsaved changes, you are prompted to hit <F9> to save the
  128.       changes if you wish.
  129.  
  130.  
  131.       SEARCHING
  132.  
  133.             You can do a rudimentary search through the entire file
  134.       FOLLOWING the cursor (not just the current sector).  Hitting the
  135.       <F2> key prompts for a search string.  ASCII search strings will be
  136.       searched regardless of whether the current active mode is ASCII or
  137.       HEX.  To do a HEX search, proceed the byte with a "_".  Do not
  138.       place quotes around _ or around search text.  You can search for
  139.       multiple HEX bytes (so _41_61 will search for Aa) and ASCII and HEX
  140.       can be mixed in the search string (so A_42C_44 will search for
  141.       ABCD).
  142.  
  143.  
  144.       MODIFYING FM
  145.  
  146.             One of the uses of fm is to modify itself if you wish to
  147.       change some of the defaults in the program.  The twelve defaults
  148.       which can be changed occur in sectors 1 (the first eight below) and
  149.       3 in the form <relevant byte>-<FUNCTION>.  Thus, to change the
  150.       color attribute for the ASCII text display, find the string ASCII.
  151.       The byte immediately preceding it is 2D(hex) for - and the byte
  152.       before that (which is 07 for grey on black) can be modified to
  153.       change the display color.  For example, changing it to 1E will make
  154.       that display as yellow on blue (on a color monitor).  The color
  155.       code is the standard one set by IBM (but different from the BASIC
  156.       and ANSI.SYS color codes), namely:
  157.                 0  black                4  red
  158.                 1  blue                 5  magenta
  159.                 2  green                6  brown (yellow)
  160.                 3  cyan                 7  grey (white)
  161.       Adding 8(Hex) to these for the foreground color produces their
  162.       "intense" version; intense brown is yellow and intense grey is
  163.       white.  Adding 8 (Hex) to the background color causes the
  164.       foreground to flash.  The first HEX digit determines the background
  165.       and the second the foreground.  As indicated 1E (E=6+8 Hex) is
  166.       yellow on blue while 9E would be flashing yellow on blue.
  167.  
  168.             Here are the other attributes which can be modified:
  169.  
  170.       LINE#  Color attributes for line number; default is 04=red on black
  171.       HEX    Color attributes for the HEX display; default is 06=brown on black
  172.       HEXED  Color attribute for the one changed HEX digit when editing
  173.                in HEX mode and only one digit has been changed; default
  174.                is F0=flashing black on white
  175.       ACTIVE CURSOR  Color attributes of the active cursor; default is
  176.                70=black on white.
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.       PASSIVE CURSOR Color attributes of the position of the cursor on
  185.                the inactive screen (shadow cursor); default is 01=blue on black
  186.       HELP SCREEN Color attributes of Help Screen; default is 74=red on white
  187.       HELP BORDER Color attributes of Help Border; default is 1C=intense
  188.                red on blue
  189.       BOOT MODE The default is 00 which cause the ASCII screen to be the
  190.                active one when the program is loaded.  Change it to 01 to
  191.                make the HEX screen active upon program loading.
  192.       BOOT DSTYLE  The default is 00 which cause the line numbers, etc.
  193.                to appear in HEX upon loading.  Change to 01 to make
  194.                decimal used upon loading.
  195.       GRAPHICS  The default is 00 which causes only text characters to be
  196.                displayed in the ASCII display when the program is loaded.
  197.                Change to 01 to make all characters display upon loading.
  198.       HEXID   The ASCII character used in a search string to preface a
  199.                HEX specification.  The default is _ which has an ASCII
  200.                code of 5F.  To change _ to $ for example change 5F to 24.
  201.  
  202.             The three items preceding HEXID concern the initial settings
  203.       of the choices controlled by the <TAB>, <F5> and <F6> toggles.
  204.       Some of the default attribute settings are chosen so the display is
  205.       useful on a monochrome monitor and you may wish to change them if you
  206.       run fm from a color monitor.
  207.  
  208.  
  209.       DISCLAIMER
  210.  
  211.             The FM program is written and copyright by Doug Schaffer.
  212.       These documentation is written by Barry Simon.  While the program
  213.       has been used extensively and appears to be bug free, it is a
  214.       powerful program and the responsibility for its use and any damages
  215.       it might cause lies with the user.  Any comments can be sent to:
  216.              Doug Schaffer                Barry Simon
  217.              Caltech 1-78                 Caltech 253-37
  218.              Pasadena, CA 91125           Pasadena, CA 91125
  219.  
  220.             While the program was written at Caltech, that 
  221.        institution bears no responsibility for the program.
  222.  
  223.            FM.COM may be freely distributed and used, but selling FM 
  224.        or bundling FM with software that is sold is not allowed.  Only 
  225.        unmodified copies of the original software may be  distributed.
  226.  
  227.