[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

.rename Pseudo-op

Purpose

Creates a synonym or alias for an illegal or undesirable name.

Syntax

.rename Name, StringConstant

Description

The restrictions on the characters that can be used for symbols within an assembler source file are defined in Constructing Symbols. The symbol cannot contain any blanks or special characters, and cannot begin with a digit.

For any external symbol that must contain special characters, the .rename pseudo-op provides a way to do so.

The .rename pseudo-op changes the Name parameter to the StringConstant value for all external references at the end of assembly. Internal references to the local assembly are made to Name. The externally visible Name is StringConstant. The .rename pseudo-op is useful in referencing symbol names that are otherwise illegal in the assembler syntax.

Parameters

Name Represents a symbol. To be externally visible, the Name parameter must appear in an .extern or .globl statement.
StringConstant Represents the value to which the Name parameter is changed at end of assembly.

Examples

The following example illustrates the use of the .rename pseudo-op:

        .csect mst_sect[RW]
        .globl mst_sect[RW]
OK_chars:
        .globl OK_chars
        .long OK_chars
        .rename OK_chars,"$_SPECIAL_$_char"
        .rename mst_sect[RW],"MST_sect_renamed"

Related Information

Pseudo-ops Overview.

Constructing Symbols.

.extern Pseudo-op, .globl Pseudo-op.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]