[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

.csect Pseudo-op

Purpose

Groups code or data into a control section (csect) and gives that csect a name, a storage mapping class, and an alignment.

Syntax

.csect QualName[,Number]

where QualName = [Name][[StorageMappingClass]]

Note: The boldfaced brackets containing StorageMappingClass are part of the syntax and do not specify an optional parameter.

Description

The following information discusses using the .csect pseudo-op:

Parameters

Number Specifies an absolute expression that evaluates to an integer value from 0 to 31, inclusive. This value indicates the log base 2 of the desired alignment. For example, an alignment of 8 (a doubleword) would be represented by an integer value of 3; an alignment of 2048 would be represented by an integer value of 11. This is similar to the usage of the Number parameter for the .align pseudo-op. Alignment occurs at the beginning of the csect. Elements of the csect are not individually aligned. The Number parameter is optional. If it is not specified, the default value is 2.
QualName Specifies a Name and StorageMappingClass for the control section. If Name is not given, the csect is identified with its StorageMappingClass. If neither the Name nor the StorageMappingClass are given, the csect is unnamed and has a storage mapping class of [PR]. If the Name is specified, the StorageMappingClass must also be specified.

Examples

The following example defines three csects:

# A csect of name proga with Program Code Storage Mapping Class.
.csect proga[PR]
lh      30,0x64(5)
# A csect of name pdata_ with Read-Only Storage Mapping Class.
.csect pdata_[RO]
l1:    .long  0x7782
l2:    .byte  'a,'b,'c,'d,'e
.csect  [RW],3          # An unnamed csect with Read/Write
                        # Storage Mapping Class and doubleword
                        # alignment.
.float -5

Related Information

Pseudo-ops Overview.

The .comm pseudo-op, .globl pseudo-op, .lcomm pseudo-op, .align pseudo-op.


[ Previous | Next | Contents | Home | Search ]