HPlogo HP Assembler Reference Manual: HP 9000 Computers > Chapter 6 Assembling Your Program

Using the as Command

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

The as command is the standard command for invoking the Assembler on PA-RISC systems running on HP-UX. See as(1) in HP-UX Reference for complete details.

If no files are specified, the Assembler reads source text from standard input, which must be a command-line pipe or a FIFO. It cannot be a device file, such as a terminal.

The Assembler produces a single output file (see the -o option). If the source text is read from standard input, the object file is written to standard output and the -o option is ignored.

The as command resides in the /usr/ccs/bin directory.

If your programming environment does not establish a path to this directory, you must include the path name as the first part of the as command. For example:

/usr/ccs/bin/as -l line.s box.s draw.s

Syntax

as [[option]... [file]...] ...

Parameters

file

The name of an input file. The name must include the suffix .s. If you specify multiple input files, they are concatenated in order.

option

A flag telling the Assembler to take some special action. All options affect all input files. The as command supports the following options.

Title not available (Parameters )

+DAarch.

Assemble code for the architecturespecified. The use of this option is discouraged. The preferred method for selecting the architecture is to use a .LEVEL directive in the assembly source file.

The target architecture specified with the .LEVEL directive takes precedence over the architecture specified with the +DA option.

-e

Specify that the Assembler should tolerate one million errors before terminating the assembly process. Without this option, the Assembler terminates a program after 100 errors.

-f

Specify that procedures call other procedures as the default condition. Normally, the Assembler assumes that procedures do not call other procedures. (See the CALLS and NO_CALLS parameters for .CALLINFO directive.).

-l

List the assembled program on standard output. This listing shows instruction offsets and the values stored in each field.

-o filename

Assign the specified name to the output file. The default name for the output file is the name of the last input file with the suffix changed to .o.

-p level

Specify the privilege level of running capability. level must be in the range zero to three, with three being the least privileged (normal user).

-s

Set the output file suffix to .ss instead of .o. The file will have a format suitable for conversion to the ROM burning programs.

-u

Prevent the Assembler from creating stack unwind descriptors. This option precludes the use of the .ENTER and .LEAVE directives within a program.

-v filename

Name a file to which the Assembler writes cross-reference information; this includes the source file and the line number for each appearance of all symbols.

-V

Print the version number of the Assembler program to standard error before assembling the source text.

-w[number]

Either suppress all warning messages if no number is supplied or suppress just the warning number provided. You can use multiple -wnumber optionsto suppress additional warning messages.

+z

Create position-independent code suitable for inclusion in a shared library. Use this option for small linkage tables.

+Z

Create position-independent code suitable for inclusion in a shared library. Use this option for large linkage tables.

For more information about linkage tables, see HP-UX Linker and Libraries Online User Guide.

© 1998 Hewlett-Packard Development Company, L.P.