Skip to main content

IAR Embedded Workbench for RX 5.20

Summary of assembler directives

In this section:

This table gives a summary of all the assembler directives:

Directive

Description

Section

#define

Assigns a value to a label.

C-style preprocessor

#elif

Introduces a new condition in an #if#endif block.

C-style preprocessor

#else

Assembles instructions if a condition is false.

C-style preprocessor

#endif

Ends an #if, #ifdef, or #ifndef block.

C-style preprocessor

#error

Generates an error.

C-style preprocessor

#if

Assembles instructions if a condition is true.

C-style preprocessor

#ifdef

Assembles instructions if a symbol is defined.

C-style preprocessor

#ifndef

Assembles instructions if a symbol is undefined.

C-style preprocessor

#include

Includes a file.

C-style preprocessor

#line

Changes the line numbers.

C-style preprocessor

#pragma

Controls extension features.

C-style preprocessor

#undef

Undefines a label.

C-style preprocessor

/*comment*/

C-style comment delimiter.

Assembler control

//

C++ style comment delimiter.

Assembler control

=

Assigns a permanent value local to a module.

Value assignment

_args

Is set to number of arguments passed to macro.

Macro processing

ALIGN

Aligns the program location counter by inserting zero-filled bytes.

Section control

ALIGNRAM

Aligns the program location counter.

Section control

ASEGN

Begins a named absolute segment.

Segment control

ASSIGN

Assigns a temporary value.

Value assignment

CALL_GRAPH_ROOT

Specifies that a function is a call graph root.

Function

CASEOFF

Disables case sensitivity.

Assembler control

CASEON

Enables case sensitivity.

Assembler control

CFI

Specifies call frame information.

Call frame information

CODE

Subsequent instructions are assembled, linked, and disassembled as code.

Mode control

DATA

Subsequent instructions are assembled, linked, and disassembled as 8-bit data.

Mode control

DATA8

Subsequent instructions are assembled, linked, and disassembled as 8-bit data.

Mode control

DATA16

Subsequent instructions are assembled, linked, and disassembled as 16-bit data.

Mode control

DATA32

Subsequent instructions are assembled, linked, and disassembled as 32-bit data.

Mode control

DATA64

Subsequent instructions are assembled, linked, and disassembled as 64-bit data.

Mode control

DC8

Generates 8-bit constants, including strings.

Data definition or allocation

DC16

Generates 16-bit constants.

Data definition or allocation

DC24

Generates 24-bit constants.

Data definition or allocation

DC32

Generates 32-bit constants.

Data definition or allocation

DC64

Generates 64-bit constants.

Data definition or allocation

DEFINE

Defines a file-wide value.

Value assignment

DF32

Generates 32-bit floating-point constants.

Data definition or allocation

DF64

Generates 64-bit floating-point constants.

Data definition or allocation

DQ15

Generates 16-bit fractional constants.

Data definition or allocation

DQ31

Generates 32-bit fractional constants.

Data definition or allocation

DS8

Allocates space for 8-bit integers.

Data definition or allocation

DS16

Allocates space for 16-bit integers.

Data definition or allocation

DS24

Allocates space for 24-bit integers.

Data definition or allocation

DS32

Allocates space for 32-bit integers.

Data definition or allocation

DS64

Allocates space for 64-bit integers.

Data definition or allocation

ELSE

Assembles instructions if a condition is false.

Conditional assembly

ELSEIF

Specifies a new condition in an IFENDIF block.

Conditional assembly

END

Ends the assembly of the last module in a file.

Module control

ENDIF

Ends an IF block.

Conditional assembly

ENDM

Ends a macro definition.

Macro processing

ENDR

Ends a repeat structure.

Macro processing

EQU

Assigns a permanent value local to a module.

Value assignment

ERROR

Generates an error.

Assembler control

EVEN

Aligns the program counter to an even address.

Section control

EXITM

Exits prematurely from a macro.

Macro processing

EXTERN

Imports an external symbol.

Symbol control

EXTWEAK

Imports an external symbol (which can be undefined.

Symbol control

IF

Assembles instructions if a condition is true.

Conditional assembly

IMPORT

Imports an external symbol.

Symbol control

LIBRARY

Retained for backward compatibility reasons. Recognized but ignored.

Module control

LOCAL

Creates symbols local to a macro.

Macro processing

LSTCND

Controls conditional assembler listing.

Listing control

LSTCOD

Controls multi-line code listing.

Listing control

LSTEXP

Controls the listing of macro generated lines.

Listing control

LSTMAC

Controls the listing of macro definitions.

Listing control

LSTOUT

Controls assembler-listing output.

Listing control

LSTPAG

Retained for backward compatibility reasons. Recognized but ignored.

Listing control

LSTREP

Controls the listing of lines generated by repeat directives.

Listing control

LSTXRF

Generates a cross-reference table.

Listing control

MACRO

Defines a macro.

Macro processing

MODULE

Retained for backward compatibility reasons. Recognized but ignored.

Module control

NAME

Retained for backward compatibility reasons. Recognized but ignored.

Module control

ODD

Aligns the program location counter to an odd address.

Section control

OVERLAY

Recognized but ignored.

Symbol control

PROGRAM

Retained for backward compatibility reasons. Recognized but ignored.

Module control

PUBLIC

Exports symbols to other modules.

Symbol control

PUBWEAK

Exports symbols to other modules, multiple definitions allowed.

Symbol control

RADIX

Sets the default base.

Assembler control

REPT

Assembles instructions a specified number of times.

Macro processing

REPTC

Repeats and substitutes characters.

Macro processing

REPTI

Repeats and substitutes strings.

Macro processing

REQUIRE

Forces a symbol to be referenced.

Symbol control

RSEG

Begins a section.

Section control

RTMODEL

Declares runtime model attributes.

Module control

SECTION

Begins a section.

Section control

SECTION_TYPE

Sets ELF type and flags for a section.

Section control

SET

Assigns a temporary value.

Value assignment

VAR

Assigns a temporary value.

Value assignment

Table 122. Assembler directives summary