
    The Alpha Unix-NT assembler (as) compiles source files written in
    AXP Assembly Language.

    This implementation is for the Windows/NT AXP platform.

    It is assumed that the user is familiar with both the 21064
    architecture, and the DEC OSF/1 AXP assembly language (as described
    in the DEC OSF/1 AXP Assembly Language Programmer's Guide).


1  FILES
   -----

    ASAXP.TXT		Release notes (this file).

    asaxp.exe		The assembler compiler.


    'claxp' must be installed in order for the 'asaxp' preprocessor
    to run correctly.


2  Command Syntax
   --------------

	asaxp  [options] <filename>

   Possible options are:

	-D<symbol>		Tells the C preprocessor the definition
				of <symbol>.
	   or
	-D<symbol>=<string>

	-I<dir>			Tells the preprocessor to search <dir> for
				include files.

	-g			CodeView(TM) symbolic information is emitted.

	-o <output filename>	Specifies output filename other than default.
				(The default is the basename of the source
				file with the ".obj" extension.)

	-O[num]			Ignored.



   <filename> is the name of the assembly source file.

   Note:  'asaxp' assumes that a source filename extension of ".i" means
	  the source has already been preprocessed.



3  Differences from as0/as1 (a.k.a. 'acc')
   ---------------------------------------

3.1  Directives
     ----------

3.1.1 Unsupported Directives
 

    The following directives are silently ignored:

	.set reorder/noreorder,
	.set move/nomove,
	.set volatile/novolatile,

	.bgnb, .gjsrlive, .lab, .livereg, .option, .vreg,
	.weakext, .ugen, .alias, .noalias

    The following directives generate warnings when encountered:

	.const, .eflag, .gjsrsaved, .gprel32, .gretlive, .save_ra,


3.1.2 .aent Directive

    as0/as1 would insert a "nop" instruction ("bis $31, $31, $31")
    when an .aent directive is specified immediately after an .ent
    directive.

    'asaxp' does not insert insert an additional instruction.


3.1.3 .edata Directive

    .edata <flag> <lang_handler>

    The flag must be 0 or 1, and <lang_handler> must be empty.

    If the flag is 0 or 1, the "current section" changes to "xdata,"
    else a warning is produced.


3.1.4 .end Directive

    as0/as1 would ignore the optional symbol following the .end directive.

    'asaxp' will check that an .ent directive is active for any symbol argument
    to the .end directive.



3.2 Unsupported Instructions
    ------------------------

    The following instruction(s) are silently ignored by 'asaxp', but will
    generate a warning in a future 'asaxp' release:

	ldgp



3.3 Code Generated
    --------------

    The code generated by 'asaxp' is meant to be functionally equivalent
    to as0/as1--however it is not identical.


3.3.1 Optimizations

    'asaxp' makes no attempt to optimize code.  The code must be
    optimized "by hand."


    * There is no scheduler pass.


    * as0/as1 attempt to keep track of register contents in the emitted
    code.  For instance,

		ldiq	$3, 0x7fff0001
		ldiq	$4, 0x7fff0002

    is emitted as 3 instructions by as0/as1 because it realizes the second
    constant can be built from the first.  'asaxp' does not do this, and
    will generate 4 instructions.

    as0/as1 has a similar ability to do this with relocatable expressions
    that is not done by 'asaxp'.


    * as0/as1 use tricky ways to load constants that are larger than
      2**32.   'asaxp' will always use a constant pool for such constants.


3.3.2 Corrected Instruction Encodings.

    as0/as1 did not encode the following instructions correctly:

	excb, mb, rpcc, trapb, wmb

    'asaxp' has the correct encodings.


3.3.3 jsr Instructions

    as0/as1 transformed "jsr" instructions with symbolic operands to "bsr"
    instructions.

    'asaxp' generates the long form of the "jsr" (ldah-lda-jsr using $at)
    for such cases.  If a "bsr" instruction is desired, then the code
    should be modified to use "bsr" with a symbolic operand.



3.4 Preprocessor

    'asaxp' uses 'claxp' for preprocessing the source files.  One limitation
    from this is that it is not legal to use the '#' character to begin an
    end-of-line comment in "#include" files.

    'asaxp' does work to make it legal to use the '#' character to
    begin an end-of-line comment in the main source file (the file
    specified on the command line).

    The C++ style end-of-line comment ("//") will still work in
    header files.


3.5 Libc.lib

    References to the divide and remainder instructions actually get
    transferred to calls to special run-time library routines.

    These routines can be found in the system library libc.lib.


3.6 Other

    as0/as1 would emit local BRADDR relocation records for unconditional
    branches to local labels.  Since branches are pc-relative, and the
    distance to the target is known if the symbol is local, 'asaxp' fills
    in the correct branch displacement itself.


------------
Trademarks
	CodeView is a trademark of the Microsoft Corporation.

