III.8 Assembler Controls

ASEM-51 implements a number of assembler controls that influence the assembly process and list file generation. There are two groups of controls: primary and general controls.
Primary controls can only be used at the beginning of the program and remain in effect throughout the assembly. They may be preceded only by control statements, blank and commentary lines. If the same primary control is used multiple times with different parameters, the last one counts.
General controls may be used everywhere in the program. They perform a single action, or remain in effect until they are cancelled or changed by a subsequent control statement.
A control statement starts always with a '$' character, followed by one or more assembler controls.
Assembler controls may have a number or string type operand, which must always be enclosed in parentheses.
Number type operands are arithmetic expressions that must be known on pass 1. String type operands are character strings which are enclosed in parentheses instead of quotes. In analogy to quoted strings, no control characters (including tabs) are allowed within these strings! The string delimiter ')' can be represented by two subsequent ')' characters.
If a control statement changes the listing mode, the control statement itself is always listed in the previous listing mode!
The following table lists all the implemented controls and their abbreviations:

ControlTypeDefaultAbbreviationMeaning
$COND
$NOCOND
$CONDONLY
G
G
G
$COND ---
---
---
list full IFxx .. ENDIF constructions
don't list lines in false branches
list assembled lines only
$DATE(string) P '' $DA inserts date string into page header
$DEBUG
$NODEBUG
P
P
$NODEBUG $DB
$NODB
include debug information into object
don't include debug information
$EJECT G   $EJ start a new page in list file
$ERROR(string)
$WARNING(string)
G
G
  ---
---
force a user-defined error
output a warning message to console
$GEN
$NOGEN
$GENONLY
G
G
G
$GEN $GE
$NOGE
$GO
list macro calls and expansion lines
list macro calls only
list expansion lines only
$INCLUDE(file) G   $IC include a source file
$LIST
$NOLIST
G
G
$LIST $LI
$NOLI
list subsequent source lines
don't list subsequent source lines
$MACRO(n)
$NOMACRO
P
P
$MACRO(50) $MR
$NOMR
reserve n % of free memory for macros
reserve all for the symbol table
$MOD51
$NOMOD51
P
P
$MOD51 $MO
$NOMO
enable predefined SFR symbols
disable predefined SFR symbols
$NOBUILTIN P list SFR --- don't list predefined symbols
$NOTABS P use tabs --- don't use tabs in list file
$PAGING
$NOPAGING
P
P
$PAGING $PI
$NOPI
enable listing page formatting
disable listing page formatting
$PAGELENGTH(n) P n=64 $PL set lines per page for listing
$PAGEWIDTH(n) P n=132 $PW set columns per line for listing
$PHILIPS P MCS-51 --- switch on 83C75x family support
$SAVE
$RESTORE
G
G
  $SA
$RS
save current $LIST/$GEN/$COND state
restore old $LIST/$GEN/$COND state
$SYMBOLS
$NOSYMBOLS
P
P
$SYMBOLS $SB
$NOSB
create symbol table
don't create symbol table
$TITLE(string) G copyright $TT inserts title string into page header
$XREF
$NOXREF
P
P
$NOXREF $XR
$NOXR
create cross reference
don't create cross reference

The subsequent paragraphs contain detailed explanations of the implemented controls.

  1. Primary Controls
  2. General Controls



[contents] [up] [back] [next]