HPlogo HP Assembler Reference Manual: HP 9000 Computers > Chapter 4 Assembler Directives and Pseudo-Operations

.LEVEL Directive

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

The .LEVEL directive tells the Assembler which version level of the PA-RISC architecture to accept while assembling the source file. The .LEVEL directive also tells the Assembler which implementations- specific features are used in the assembly source file.

Syntax

       {1.0}
.LEVEL {1.1}
{2.0}
{2.0W}

Parameters

1.0

Enables PA-RISC 1.0 features. This is the default.

1.1

Enables PA-RISC 1.1 features.

2.0

Enables PA-RISC 2.0 features.

2.0W

Enables PA-RISC 2.0W features and assembles the source for a 64-bit machine.

Discussion

The Assembler marks the relocatable object file to indicate the minimum PA-RISC architecture version level required when executing the object code corresponding to the source file. The linker marks the program file with the highest version level required by any of the object files linked into the program.

The Assembler uses the .LEVEL directive to mark the relocatable object file with the proper PA-RISC architecture version level. For example, if the code is expected to run only on PA-RISC 1.1 architectures, a .LEVEL 1.1 should be inserted at the beginning of the source file.

To assemble a source file for a PA-RISC 64-bit system, use a .LEVEL 2.0W directive as the first directive in the source file.In the source file, the Assembler emits warning messages whenever a feature is used that is not appropriate for the specified .LEVEL directive. The default is to produce a PA-RISC 1.0 relocatable object file. If the default is used, any use of PA-RISC 1.1 or 2.0 features in the assembly source file generates a warning messages.

If the code is expected to run on more than one level of PA-RISC architecture, a run-time check should be used with a .ALLOW directive. See “.ALLOW Directive” in this chapter for an example of a run-time check.

The .LEVEL directive is also used to indicate any implementation-specific extensions that the source file depends on. The Assembler marks the relocatable object file with information that indicates any implementation-specific extensions that were specified in the .LEVEL directive. The default for an assembly source file is no implementation-specific extensions; the Assembler generates warning messages if an implementation-specific extension is used.

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