7 ASSEMBLER CONTROLS

This chapter contains the following sections:

Introduction
Overview asxa Controls
Description of asxa Controls

7.1 Introduction

Assembler controls are provided to alter the default behavior of the assembler. They can be specified on the command line or on 'control lines', embedded in the source file. A control line is a line with a dollar sign ($) on the first position. Such a line is not processed like a normal assembly source line, but as an assembler control line. Zero or more controls per source line are allowed. An assembler control line may contain comments.

The controls are classified as: primary or general.

Primary controls affect the overall behavior of the assembler and remain in effect throughout the assembly. For this reason, primary controls may only be used on the invocation line or at the beginning of a source file, before the assembly starts. If you specify a primary control more than once, a warning message is given and the last definition is used. This enables you to override primary controls via the invocation line.

General controls are used to control the assembler during assembly. Control lines containing general controls may appear anywhere in a source file and are also allowed in the invocation. When you specify general controls via the invocation line the corresponding general controls in the source file are ignored.

On the next pages, an overview is given of all the assembler controls, followed by a detailed description the available assembler controls, listed in alphabetic order. Some controls have separate versions for turning an option on and off. These controls are described together.

Some controls are set by default, and some controls have a default value.

The examples in this chapter are given for the PC environment.

7.2 Overview asxa Controls

Control Abbr. Type Def. Description
CASE
NOCASE
CA
NOCA
pri
pri

NOCA
All user names are case sensitive.
User names are not case sensitive.
DEBUG
NODEBUG
DB
NODB
pri
pri
DB Produce symbolic debug info.
Do not produce symbolic debug info.
DEBUGINFO(number) DI gen Ignored1
EJECT EJ gen Generate formfeed in list file.
ERRORPRINT(err-file)
NOERRORPRINT
EP
NOEP
pri
pri

NOEP
Print errors to named file.
No error printing.
GEN
GENONLY
NOGEN
GE
GO
NOGE
gen
gen
gen
Ignored1
Ignored1
Ignored1
GENERICLEVEL(level) GL gen Ignored1
INCLUDE(inc-file) IC gen Implemented with macro processor
KEEPOBJECT
NOKEEPOBJECT
KO
NOKO
pri
pri
KO Keep object file.
Remove object file.
LIST
NOLIST
LI
NOLI
gen
gen
LI Resume listing.
Stop listing.
LOCALS
NOLOCALS
LO
NOLO
pri
pri
LO Produce local symbols debug info.
No local symbols debug info.
MAP(file) MA pri Define map file for generation of absolute list file.
MODXA
NOMODXA
MO
NOMO
gen
gen
MO Use predefined register names.
Predefined list not used.
OBJECT(file)
NOOBJECT
OJ
NOOJ
pri
pri
src.obj Alternative name for object file.
Do not produce an object file.

OPTIMIZE
NOOPTIMIZE
OP
NOOP
gen
gen
OP Turn optimization on.
Turn optimization off.
PAGELENGTH(length) PL pri 60 Set list page length.
PAGEWIDTH(width) PW pri 104 Set list page width.
PAGING
NOPAGING
PI
NOPI
pri
pri
PI Format print file into pages.
Do not format print file into pages.
PRINT(print-file)
NOPRINT
PR
NOPR
pri
pri
src.lst Define print file name.
Do not create a print file.
READ8051
NOREAD8051
RD51
NORD51
gen
gen

NORD51
Begin of 8051 instruction block.
End of 8051 instruction block.
REGISTERBANK(rb[,rb]...)
NOREGISTERBANK
RB
NORB
pri
pri
0 Ignored1
RESTORE
SAVE
RE
SA
gen
gen
Restore saved listing control.
Save listing control.
SYMBOLS
NOSYMBOLS
SB
NOSB
pri
pri
Not implemented; causes a warning.
Not implemented; causes a warning.
TITLE(title) TT gen spaces Set list page header title.
WARNING
NOWARNING[(num[,num]...)]
WA
NOWA
pri
pri
WA Generate warnings.
Suppress one or all warnings.
ZPAGE
NOZPAGE
ZP
NOZP
pri
pri
ZP XA Zero-Page mode.
XA Large-Memory mode.

Abbr.: Abbreviation of the control.
Type: Type of control: pri for primary controls, gen for general controls.
Def.: Default.
1 This control is only implemented for compatibility, the assembler will ignore the control.
2 This control will cause an error when the assembler detects it.

Table 7-1: asxa controls

7.3 Description of asxa Controls

CASE

Control:

CASE/NOCASE

Select the EDE | Assembler Options | Project Options... menu item. Enable the Assembler works case sensitive check box in the Miscellaneous tab.

Abbreviation:

CA/NOCA

Class:

Primary

Default:

NOCASE

Description:

Selects whether the assembler operates in case sensitive mode or not. In case insensitive mode the assembler maps characters on input to uppercase. (literal strings excluded).

Example:

asxa x.src case      ; asxa in case sensitive mode

DEBUG

Control:

DEBUG/NODEBUG

Select the EDE | Assembler Options | Project Options... menu item. Choose a Debug info option in the Code Generation tab.

Abbreviation:

DB/NODB

Class:

Primary

Default:

DEBUG

Description:

These controls also imply the LOCALS/NOLOCALS controls.

Controls the generation of debugging information in the object file. DEBUG enables passing of symbolic debuging information generated by the C compiler and enables the generation of local (assembler) symbols debugging information. NODEBUG disables it.

Example:

asxa x.src db     ; pass hll debug and generate
                  ; local symbols information

DEBUGINFO

Control:

DEBUGINFO(numberb)

Abbreviation:

DI

Class:

General

Default:

-

Description:

This control is ignored by the assembler. It is included for compatibility.

EJECT

Control:

EJECT

Abbreviation:

EJ

Class:

General

Default:

New page started when page length is reached

Description:

The current page is terminated with a formfeed after the current (control) line, the page number is incremented and a new page is started. Ignored if NOPAGING, NOPRINT or NOLIST is in effect.

Example:

.          ; assembler source lines
.
$eject     ; generate a formfeed
.
.          ; more source lines
$ej        ; generate a formfeed
.
. 

ERRORPRINT

Control:

ERRORPRINT(file)/NOERRORPRINT

Abbreviation:

EP/NOEP

Class:

Primary

Default:

NOERRORPRINT

Description:

ERRORPRINT redirects the error messages, normally displayed at the console, to an error list file.

Examples:

asxa x.src ep(errlist)     ; redirect errors to
                           ; file errlist

GEN/GENONLY/NOGEN

Control:

GEN/GENONLY/NOGEN

Abbreviation:

GE/GO/NOGE

Class:

General

Default:

-

Description:

These controls are ignored by the assembler. They are included for compatibility.

GENERICLEVEL

Control:

GENERICLEVEL(level)

Abbreviation:

GL

Class:

General

Default:

-

Description:

This control is ignored by the assembler. It is included for 8051 compatibility only.

INCLUDE

Control:

INCLUDE(file)

Abbreviation:

IC

Class:

General

Default:

-

Description:

The INCLUDE control is interpreted by the macro preprocessor, and will be deleted when the include is performed. When this control is recognized by the assembler, it causes an error message because the user apparently forgot to run the source through the macro preprocessor.

KEEPOBJECT

Control:

KEEPOBJECT/NOKEEPOBJECT

EDE always removes output files after errors occur.

Abbreviation:

KO/NOKO

Class:

Primary

Default:

KEEPOBJECT

Description:

Switching the keep object off ensures that the object file is removed when an error occurs. This feature prevents that the linker is given a corrupt or outdated object file. This is particularly useful when you use the make utility or a batch/script file to compile and link. The control has no effect when you use the NOOBJECT control.

Example:

$NOKEEPOBJECT     ; the object file will be
                  ; removed when an error occurs

LIST

Control:

LIST/NOLIST

Abbreviation:

LI/NOLI

Class:

General

Default:

LIST

Description:

Switch the listing generation on or off. These controls take effect starting at the current line. LIST does not override the NOPRINT control. LIST and NOLIST are implemented as counters. This way LIST/NOLIST pairs can be nested. See the example for details. Note that nesting can also be obtained by using the INCLUDE directive.

Example:

$noli ; Turn listing off (level 1). These lines
.     ; are not present in the list file
.
$noli ; listing off (level 2). These lines are not
.     ; present in the list file
.
$list ; listing on (level 2). These lines are not
.     ; present in the list file !!
.
$list ; Turn listing back on (level 1). These
.     ; lines are present in the list file
.

LOCALS

Control:

LOCALS/NOLOCALS

Abbreviation:

LO/NOLO

Class:

Primary

Default:

LOCALS

Description:

Controls the generation of debugging information in the object file. LOCALS enables the generation of local (assembler) symbols debugging information and NOLOCALS disables it.

The DEBUG control also implies the LOCALS control.

Example:

asxa x.src lo     ; generate local symbols debug
                  ; information

MAP

Control:

MAP(file)

Abbreviation:

MA

Class:

Primary

Default:

-

Description:

The MAP control specifies the locator map file to be used for generating an absolute list file.

See section 2.6.1 , Absolute List File Generation, for detailed information.

Examples:

asxa -l x.src map(x.map) 
; generate absolute list file x.lst

MODXA

Control:

MODXA/NOMODXA

Select the EDE | Assembler Options | Project Options... menu item. Disable the Use predefined register names check box in the Miscellaneous tab.

Abbreviation:

MO/NOMO

Class:

General

Default:

MODXA

Description:

The asxa assembler uses a list of predefined register names (see section Predefined Symbols in chapter Operands and Expressions). With NOMODXA the list will not be used by the assembler.

Example:

asxa x.src nomodxa

; use no predefined list of register names

OBJECT

Control:

OBJECT(file)/NOOBJECT

Abbreviation:

OJ/NOOJ

Class:

Primary

Default:

OBJECT(sourcefile.obj)

Description:

The OBJECT control specifies an alternative name for the object file. The NOOBJECT control causes no object file to be generated.

Examples:

asxa x.src        ; generate object file x.obj
asxa x.src oj(x1) ; generate object file x1
asxa x.src nooj   ; do not generate object file

OPTIMIZE

Control:

OPTIMIZE/NOOPTIMIZE

Select the EDE | Assembler Options | Project Options... menu item. Enable or disable one or more Control optimization check boxes in the Optimization tab.

Abbreviation:

OP/NOOP

Class:

General

Default:

OPTIMIZE

Description:

NOOPTIMIZE turns off the optimization for generic jmp, call and branch instructions. Normally the assembler tries to select the shortest jmp or call instruction for a generic jmp/call in an absolute or relocatable section.

See the assembler optimize option -Oj for more information.

Example:

$noop
; turn optimization off
; source lines

$op
; turn optimization back on
; source lines

PAGELENGTH

Control:

PAGELENGTH(lines)

Select the EDE | Assembler Options | Project Options... menu item. Enter the length in the Lines per page field in the List File tab.

Abbreviation:

PL

Class:

Primary

Default:

PAGELENGTH(60)

Description:

Sets the maximum number of lines on one page of the listing file. This number includes the lines used by the page header (4), and also the lines with error messages. The minimum page length is 20.

Example:

asxa x.src pl(50)     ; set page length to 50

PAGEWIDTH

Control:

PAGEWIDTH(characters)

Select the EDE | Assembler Options | Project Options... menu item. Enter the number of characters in the Characters per line field in the List File tab.

Abbreviation:

PW

Class:

Primary

Default:

PAGEWIDTH(104)

Description:

Sets the maximum number of characters on one line in the listing. Lines exceeding this width are wrapped around on the next lines in the listing. The minimum page width is 64.

Example:

asxa x.src pw(130)

; set page width to 130 characters

PAGING

Control:

PAGING/NOPAGING

Select the EDE | Assembler Options | Project Options... menu item. Disable the Format list file into pages check box in the List File tab.

Abbreviation:

PI/NOPI

Class:

Primary

Default:

PAGING

Description:

Turn the generation of formfeeds and page headers in the listing file on or off. If paging is turned off, the EJECT control is ignored.

Example:

asxa x.src nopi

; turn paging off: no formfeeds and page headers

PRINT

Control:

PRINT(file)/NOPRINT

Select the EDE | Assembler Options | Project Options... menu item. Disable the Generate list file check box in the Output tab. This also disables the List File and Adv. List File tabs.

Abbreviation:

PR/NOPR

Class:

Primary

Default:

PRINT(sourcefile.lst)

Description:

The PRINT control specifies an alternative name for the listing file. The NOPRINT control causes no listing file to be generated.

Examples:

asxa x.src                  ; list file name is x.lst
asxa x.src pr(mylist)       ; list file name is mylist

READ8051

Control:

READ8051/NOREAD8051

Abbreviation:

RD51/NORD51

Class:

General

Default:

NOREAD8051

Description:

With these controls you can mark the begin and end of an 8051 instruction block.

Example:

$rd51
; 8051 instructions

$nord51
; XA instructions

See Appendix H , Translate 8051 to XA, for more information.

REGISTERBANK

Control:

REGISTERBANK(rb[,rb]...)/NOREGISTERBANK

Abbreviation:

RB/NORB

Class:

Primary

Default:

REGISTERBANK(0)

Description:

These controls are ignored by the assembler. They are included for compatibility.

SAVE

Control:

SAVE/RESTORE

Abbreviation:

SA/RS

Class:

General

Default:

-

Description:

SAVE stores the current value of the LIST/NOLIST controls onto a stack. RESTORE restores the most recently SAVEd value; it takes effect starting at the next line. SAVEs can be nested to a depth of 128.

Example:

$nolist
; source lines
$save          ; save values of LIST/NOLIST

$list

$restore       ; restore value (nolist)

SYMBOLS

Control:

SYMBOLS/NOSYMBOLS

Abbreviation:

SB/NOSB

Class:

Primary

Default:

-

Description:

Not implemented; causes a warning message.

TITLE

Control:

TITLE(title)

Select the EDE | Assembler Options | Project Options... menu item. Enter the title in the Title of list file field in the List File tab.

Abbreviation:

TT

Class:

General

Default:

spaces

Description:

This control specifies the title to be used in page headings of the list file. The page number and the date are also printed as part of the title. To ensure that the title is printed in the header of the first page, the control has to be specified in the primary part.

If the page width is too small for the title to fit in the header, it will be truncated.

Example:

$title(NEWTITLE)

; title in page header is NEWTITLE

WARNING

Control:

WARNING/NOWARNING[(num[,num]...)]

Select the EDE | Assembler Options | Project Options... menu item. Select one of the Diagnostics options in the Output tab and optionally fill in specific message numbers to suppress.

Abbreviation:

WA/NOWA

Class:

Primary

Default:

WARNING

Description:

Turn the generation of warnings on or off. NOWARNING suppresses all warnings. NOWARNING(num) suppresses one warning message, where num is the warning message number.

Example:

$nowa          ; suppress all warnings
$pl(15)        ; no warning generated

ZPAGE

Control:

ZPAGE/NOZPAGE

Select the EDE | Assembler Options | Project Options... menu item. Choose one of the processor execution modes XA Zero-Page mode or XA Large-Memory mode in the Code Generation tab.

Abbreviation:

ZP/NOZP

Class:

Primary

Default:

ZP

Description:

The ZPAGE control specifies the XA Zero-Page mode. The NOZPAGE control specifies the XA Large-Memory mode.

Examples:

asxa x.src nozp        ; Large-Memory mode


Copyright © 2000 TASKING, Inc.