home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / asm / wasm / filt.doc < prev    next >
Text File  |  1988-03-07  |  8KB  |  168 lines

  1.  
  2.  
  3.                                 FILT Version 1.00
  4.                           Copyright (c) 1988 Eric Tauck
  5.                                All Rights Reserved
  6.                                    03/07/1988
  7.  
  8.        FILT is a text filter that performs some low level formatting and
  9.        translation functions.  Being a filter, FILT does its input and
  10.        output through the console device (CON).  Input and output files
  11.        must be specified with the DOS redirection commands.  The basic
  12.        syntax is:
  13.  
  14.          FILT options < input_file > output_file
  15.  
  16.        The options consist of single letters and are described below.
  17.        The input_file and output_file, in conjunction with the
  18.        redirection characters < and >, tell DOS what files to use for
  19.        input and output.  If no input file is specified, the keyboard
  20.        will be used.  If no output file is specified, the screen will be
  21.        used.
  22.  
  23.        The options are single, case sensitive letters.  Any number of
  24.        options may be specified.  Some of the options are followed by a
  25.        number.  All numbers are decimal and come immediately after the
  26.        option letter (with no intervening spaces).  Numbers over 65535
  27.        will cause an error.
  28.  
  29.        Summary of options (# denotes number):
  30.  
  31.          Tab Replacement:                 Tab Assignment:
  32.  
  33.            x  = expand tabs to spaces       e  = erase all tab stops
  34.            c  = compress spaces to tabs     t# = set tab stop
  35.  
  36.          Character Replacement:           Line Format:
  37.  
  38.            S  = strip high bits             m  = add left margin
  39.            C  = strip control chars         d  = delete left margin
  40.            H  = strip high (>127) bytes     l# = truncate long lines
  41.            U  = all letters to upper-case   r  = remove trailing spaces
  42.            L  = all letters to lower-case   b# = byte to end input lines
  43.            A  = capitalize words            s  = save carriage returns
  44.  
  45.          End of File:                     I/O Buffer:
  46.  
  47.            z  = ignore ^Z in input          i# = input buffer size (20000)
  48.            Z  = suppress ^Z in output       o# = output buffer size (20000)
  49.  
  50.        The following is a full description of all options, listed in
  51.        alphabetical order (lower-case first):
  52.  
  53.          ?   Help.  Display a summary of the options.
  54.  
  55.  
  56.          b#  Byte to end input lines.  Defines the character that will
  57.              identify an end of line (EOL).  For instance, b13 will cause
  58.              a line to be ended when a carriage return is reached.  The
  59.              default is b10.  This option does not effect how EOL's will
  60.              be written, they are always ended with a CR+LF combination.
  61.  
  62.          c   Compress spaces to tabs.  When possible, spaces will be
  63.              replaced by tab characters (ASCII 9).  The default tab stops
  64.              are every eight columns, but can be set manually with the e
  65.              and t options.
  66.  
  67.          d#  Delete left margin.  The specified number of characters will
  68.              be deleted from the left side of all the lines.  Any
  69.              characters will be deleted.  Note that tabs only count as
  70.              one character.
  71.  
  72.          e   Erase all tab stops.  All tab stops will be erased.  User
  73.              defined tab stops (set with the t option) should come after
  74.              the e option.
  75.  
  76.          h   Help.  Display a summary of the options.
  77.  
  78.          i#  Input buffer size.  Set the size of the input buffer.  The
  79.              default is i20000.  Making it larger might improve the
  80.              processing rate for a slow input device, while making it
  81.              smaller will use less memory.
  82.  
  83.          l#  Truncate long lines.  Lines longer than the specified length
  84.              will be truncated.  Normally any length lines (up to about
  85.              600 characters) are acceptable.
  86.  
  87.          m#  Add left margin.  The specified number of spaces will be
  88.              added to the left margin.
  89.  
  90.          o#  Output buffer size.  Set the size of the output buffer.  The
  91.              default is o20000.  Making it larger might improve the
  92.              processing rate for a slow output device, while making it
  93.              smaller will use less memory.
  94.  
  95.          s   Save carriage returns.  All carriage returns (ASCII 13) are
  96.              normally deleted from the input.  This option might be
  97.              useful in a file that contains line boundaries without
  98.              carriage returns, but does contain carriage returns as some
  99.              kind of special formatting code.
  100.  
  101.          r   Remove trailing spaces.  Any spaces (or tabs when using the
  102.              c option) that come at the end of lines will be removed.
  103.              Spaces at the end of lines, though superfluous, are often
  104.              left over from word processors.
  105.  
  106.          t#  Set a tab stop.  A tab stop will be set at the specified
  107.              column number.  The first column is number one.  Any number
  108.              of tab stops may be specified.  The default tab stops are
  109.              every eight columns, i.e. t9 t17 t25 etc.
  110.  
  111.  
  112.          x   Expand tabs to spaces.  All tab characters (ASCII 9) will be
  113.              replaced with an equivalent number of spaces.  The default
  114.              tab stops are every eight columns, but can be set manually
  115.              with the e and t options.
  116.  
  117.          z   Ignore ^Z in the input file.  A ^Z (ASCII 26) normally
  118.              identifies the end of a file.  If this option is used, the
  119.              full number of bytes recorded in the directory will be read.
  120.  
  121.          A   Capitalize words.  Letters that follow another letter will
  122.              be converted to lower-case, all other letters will be
  123.              converted to upper-case.
  124.  
  125.          C   Strip control characters.  All characters below ASCII 32
  126.              will be removed.
  127.  
  128.          H   Strip high bytes.  All characters above ASCII 127 will be
  129.              removed.
  130.  
  131.          L   Convert all letters to lower-case.
  132.  
  133.          S   Strip high bits.  The high bit of all bytes above ASCII 127
  134.              will be cleared.
  135.  
  136.          U   Convert all letters to upper-case.
  137.  
  138.          Z   Suppress ^Z in the output file.  Normally a ^Z (ASCII 26) is
  139.              written to the end of the file.  If this option is used, a
  140.              ^Z will not be written.
  141.  
  142.        The following are some examples of FILT option and file
  143.        specifications:
  144.  
  145.          filt ?
  146.            Displays a summary of all options to the screen.
  147.  
  148.          filt cr < data.fil > data.new
  149.            Means: c = compress spaces to tab characters; and r = remove
  150.            trailing spaces.  The input file is DATA.FIL and the output
  151.            file is DATA.NEW.  This combination of options may greatly
  152.            reduce the size of a file by compressing or removing
  153.            unnecessary spaces.
  154.  
  155.          filt zZCHi500o500 < a:text.xxx > c:\doc\text.txt
  156.            Means: z = ignore any input ^Zs; Z = do not write a ^Z to the
  157.            end of the file; C = remove all control characters; H = remove
  158.            any characters with a value greater than 127; i500 = set the
  159.            input buffer size to 500 bytes; and o500 = set the output
  160.            buffer size to 500 bytes.  The input file is A:TEXT.XXX and
  161.            the output file is C:\DOC\TEXT.TXT.  This combination of
  162.            options converts the input file into a pure ASCII file with no
  163.            control characters (except for the line boundaries).  Note
  164.            that about 39000 fewer bytes of memory are used during
  165.            execution because of the buffer sizes, 500+500=1000 instead of
  166.            the default 20000+20000=40000.
  167.  
  168.