Assembler Directives and Pseudo-Operations

Programming Aids

Programming Aids

The Assembler provides a series of standard space and subspace definitions that you can use to simplify the writing of an assembly program. These definitions are duplicated in the system file /usr/lib/pcc_prefix.s. Because this file is relatively large and may change with new releases of the Assembler, you can view the most recent version of the file on your terminal screen by typing the command:

more /usr/lib/pcc_prefix.s

Table 4-3 on page 116 lists the predefined directives for establishing standard spaces and subspaces.

Table 4-3

Predefined Subspace Directives

 

 

 

Directive

Space Name

Default Parameters

 

 

 

.BSS

.space $PRIVATE$,''

PRIVATE,SPNUM=1,SORT=16

 

.subspa $BSS$,

QUAD=1,ALIGN=8,ACCESS=0x1f, SORT=82,ZERO

 

 

 

.CODE

.space $TEXT$,''

SPNUM=0,SORT=8

 

.subspa $CODE$,

QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=24

 

 

 

.DATA

.space $PRIVATE$,''

PRIVATE,SPNUM=1,SORT=16

 

.subspa $DATA$,

QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=24

 

 

 

.FIRST

.space $TEXT$,''

SPNUM=0,SORT=8

 

.subspa $FIRST$,

QUAD=0,ALIGN=2048,ACCESS=0x2c, SORT=4,FIRST

 

 

 

.GATE

.space $TEXT$,''

SPNUM=0,SORT=8

 

.subspa $GATE$,

QUAD=0,ALIGN=8,ACCESS=0x4c,

 

 

SORT=84,CODE_ONLY

 

 

 

.GLOBAL

.space $PRIVATE$,''

PRIVATE,SPNUM=1,SORT=16

 

.subspa $GLOBAL$,

QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40

 

.IMPORT $global$

 

 

 

 

.GNTT

.space $DEBUG$,''

SPNUM=2,PRIVATE,UNLOADABLE,SORT=80

 

.subspa $GNTT$,

ALIGN=4,ACCESS=0,UNLOADABLE

 

 

 

.HEADER

.space $DEBUG$,''

SPNUM=2,PRIVATE,UNLOADABLE,SORT=80

 

.subspa $HEADER$,

ALIGN=4,ACCESS=0,UNLOADABLE,FIRST

 

 

 

.HEAP

.space $PRIVATE$,''

PRIVATE,SPNUM=1,SORT=16

 

.subspa $HEAP$,

QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=82

 

 

 

.LIT

.space $TEXT$,''

SPNUM=0,SORT=8

 

.subspa $LIT$,

QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16

 

 

 

116

Chapter 4