Program ASPIC_FIX
                           14 September 2006

aspic_fix [options]

Fixes the formatting of a PIC assembler source file.  Labels and some
assembler directives start in column 1, opcodes in column 10, operands in
column 18, and end of line comments in column 30 regardless of their
positions in the input file.  TAB and other control characters in the
input file are processed like spaces.  Only space characters are used as
"whitespace" in the output file.

The command line options are:

  -IN filename
  filename

       Specifies the MPASM assembler input file name.

       The first command line option that does not start with a dash (-)
       is assumed to be the input file name.  This is a short form of
       supplying the file name for convenience, but can not be used when
       the file name starts with a dash.  The full form of this option
       using the -IN keyword works whether the file name starts with a
       dash or not.  In either case, if the file name includes spaces or
       some other special characters, it must be enclosed in quotes ("")
       or apostrophies ('').

       There is no default input file name.  An input file is required.

  -OUT filename
  filename

       Specifies the output file name.  The input and output files may be
       the same, in which case the single file is modified in place.

       The first command line option that does not start with a dash (-)
       after the input file name is specified is assumed to be the output
       file name.  This is a short form of supplying the file name for
       convenience, but can not be used when the file name starts with a
       dash.  The full form of this option using the -OUT keyword works
       whether the file name starts with a dash or not. In either case, if
       the file name includes spaces or some other special characters, it
       must be enclosed in quotes ("") or apostrophies ('').

       The default output file name is the input file name.

  -FORUM

       Causes the output file to be formatted so that it can be copied and
       pasted into a Microchip forum post between [code] and [/code] tags.
       The forum editor performs a sophisticated algorithm to corrupt such
       text.  This algorithm is taken into account so that the desired
       formatting is achieved after the forum editor applies its
       corruption.

The input file is first read into memory, then closed before the output
file is written from the information in memory.  The input and output file
names may therefore indicate the same file, in which case that file will
appear to be reformatted in place.

This program is compatible with the Embed Inc PIC assembler preprocessor,
PREPIC.  All preprocessor commands will start in column 1 of the output
file.

The default settings produce code with the same formatting as the example
PIC source code provided with the Embed Inc PIC development environment
described at http://www.embedinc.com/pic.

This version does not handle continued lines (backslash character at end
of line to indicate continuation of the logical line onto the next
physical line).