.rename pseudo-op

Purpose

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

Syntax

Item Description
.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 global symbol that must contain special characters, or characters that are otherwise illegal in the assembler syntax, the .rename pseudo-op provides a way to do so.

The .rename pseudo-op changes the Name parameter to the StringConstant value for all global symbols at the end of assembly. Internal references to the local assembly are made to Name. The global name is StringConstant.

Parameters

Item Description
Name Represents a symbol. To be global, 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"