This chapter contains the following sections:
Introduction
Overview asxa Controls
Description of asxa Controls
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.
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
CASE/NOCASE
Select the EDE | Assembler Options | Project Options... menu item. Enable the Assembler works case sensitive check box in the Miscellaneous tab.
CA/NOCA
Primary
NOCASE
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).
asxa x.src case ; asxa in case sensitive mode
DEBUG/NODEBUG
Select the EDE | Assembler Options | Project Options... menu item. Choose a Debug info option in the
Code Generation tab.
DB/NODB
Primary
DEBUG
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.
asxa x.src db ; pass hll debug and generate ; local symbols information
DEBUGINFO(numberb)
DI
General
-
This control is ignored by the assembler. It is included for compatibility.
EJECT
EJ
General
New page started when page length is reached
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.
. ; assembler source lines . $eject ; generate a formfeed . . ; more source lines $ej ; generate a formfeed . .
ERRORPRINT(file)/NOERRORPRINT
EP/NOEP
Primary
NOERRORPRINT
ERRORPRINT redirects the error messages, normally displayed at the console, to an error list file.
asxa x.src ep(errlist) ; redirect errors to ; file errlist
GEN/GENONLY/NOGEN
GE/GO/NOGE
General
-
These controls are ignored by the assembler. They are included for compatibility.
GENERICLEVEL(level)
GL
General
-
This control is ignored by the assembler. It is included for 8051 compatibility only.
INCLUDE(file)
IC
General
-
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/NOKEEPOBJECT
EDE always removes output files after errors occur.
KO/NOKO
Primary
KEEPOBJECT
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.
$NOKEEPOBJECT ; the object file will be ; removed when an error occurs
LIST/NOLIST
LI/NOLI
General
LIST
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.
$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/NOLOCALS
LO/NOLO
Primary
LOCALS
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.
asxa x.src lo ; generate local symbols debug ; information
MAP(file)
MA
Primary
-
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.
asxa -l x.src map(x.map) ; generate absolute list file x.lst
MODXA/NOMODXA
Select the EDE | Assembler Options | Project Options... menu item. Disable the
Use predefined register names check box in the Miscellaneous tab.
MO/NOMO
General
MODXA
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.
asxa x.src nomodxa ; use no predefined list of register names
OBJECT(file)/NOOBJECT
OJ/NOOJ
Primary
OBJECT(sourcefile.obj)
The OBJECT control specifies an alternative name for the object file. The NOOBJECT control causes no object file to be generated.
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/NOOPTIMIZE
Select the EDE | Assembler Options | Project Options... menu item. Enable or disable one or more
Control optimization check boxes in the Optimization tab.
OP/NOOP
General
OPTIMIZE
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.
$noop ; turn optimization off ; source lines $op ; turn optimization back on ; source lines
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.
PL
Primary
PAGELENGTH(60)
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.
asxa x.src pl(50) ; set page length to 50
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.
PW
Primary
PAGEWIDTH(104)
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.
asxa x.src pw(130) ; set page width to 130 characters
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.
PI/NOPI
Primary
PAGING
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.
asxa x.src nopi ; turn paging off: no formfeeds and page headers
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.
PR/NOPR
Primary
PRINT(sourcefile.lst)
The PRINT control specifies an alternative name for the listing file. The NOPRINT control causes no listing file to be generated.
asxa x.src ; list file name is x.lst asxa x.src pr(mylist) ; list file name is mylist
READ8051/NOREAD8051
RD51/NORD51
General
NOREAD8051
With these controls you can mark the begin and end of an 8051 instruction block.
$rd51 ; 8051 instructions $nord51 ; XA instructions
See Appendix H
, Translate 8051 to XA, for more information.
REGISTERBANK(rb[,rb]...)/NOREGISTERBANK
RB/NORB
Primary
REGISTERBANK(0)
These controls are ignored by the assembler. They are included for compatibility.
SAVE/RESTORE
SA/RS
General
-
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.
$nolist ; source lines $save ; save values of LIST/NOLIST $list $restore ; restore value (nolist)
SYMBOLS/NOSYMBOLS
SB/NOSB
Primary
-
Not implemented; causes a warning message.
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.
TT
General
spaces
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.
$title(NEWTITLE) ; title in page header is NEWTITLE
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.
WA/NOWA
Primary
WARNING
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.
$nowa ; suppress all warnings $pl(15) ; no warning generated
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.
ZP/NOZP
Primary
ZP
The ZPAGE control specifies the XA Zero-Page mode. The NOZPAGE control specifies the XA Large-Memory mode.
asxa x.src nozp ; Large-Memory mode