
136/317
6 - STMicroelectronics Programming Tools
06-ast7
The source text is, like an ordinary text, made of words. There are two kinds of words (groups
of characters in the text): the predefined words, that are the opcodes and the pseudo-ops, and
user-defined words, called identifiers, that according to their use are called either Labels or
Symbols. Both obey the rule below:
Syntax: a label or a symbol name must start with a letter, and the other characters may include
letters and figures, and the underscore character (_). Any number of characters is allowed;
however, only the first 30 characters are meaningful, that is, if two names have the same first
30 characters, they will be considered the same and an error will occur. The ST7 assembler is
case-sensitive, that is, upper-case and lower-case characters are considered different. Ex-
ample:
ThisLabel
and
Thislabel
are different.
The source text is made up of lines, that are terminated by a carriage-return character. Each
of the lines of the source text represents one complete command and is called a Statement. A
statement itself is divided in fields, numbered from left to right.
Syntax: A statement may have zero to four fields, separated by at least one space or tabula-
tion character. These fields are called, in order: the label field, the operation field, the operand
field and the comment field.
Ex: register declaration
segment definition
File.asm
Assembler
source file
asm.exe
(-li option)
File.obj
File.lst
Relocatable object file
Listing file
Assembler invocation :
"asm -li file"; -li option produces a listing file (.lst).
File1.inc
include files
File2.inc