EasyManua.ls Logo

ST ST7 - Page 71

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
71/317
4 - Architecture of the ST7 core
From the categories above, numbers can be distinguished because they start with a decimal
figure. For hexadecimal numbers that may start with a letter, there are two main conventions:
In the so-called Intel convention, a number will only be recognized as such if the first digit is a
figure; for example,
FAh is not considered a number; 0FAh is;
In the Motorola and and few other conventions, any hexadecimal number must start with a
special character, like $ for Motorola; no ambiguity is possible then. The ST7 tools use this
convention by default.
All other categories except comments are made of single words that begin with a letter. For
example,
HERE is a legal name for a label.
The vocabulary of the Operation Mnemonic category is defined by the manufacturer. It con-
tains the operation codes specific to the microcontroller, commonly called opcodes. There are
also other words that are not opcodes, but that have a similar function in the language. For
that reason, they are named pseudo-ops.
Opcodes are named after the abbreviation of the function of the instruction. Some are ob-
vious, like
ADD; some abbreviated, like SUB (subtract); others are acronyms like TNZ (Test for
Negative or Zero).
The pseudo-ops include commands to the assembly program, to direct it to make memory res-
ervations, like
DS (reserve Data Storage) or DCW (Define Constant Word), or other similar com-
mands.
The labels are names that the programmer freely assigns to data in memory, constant values,
or pieces of code. This improves the clarity of the source text. For example, if the programmer
has reserved a byte in memory forthe result of an analog to digital conversion, he uses the fol-
lowing statement:
Voltage: DS 1 ; Voltage read back from input
He can then use this name to load this value into the accumulator:
ld A, Voltage ; Get value into accumulator
Which is easier to read than the numeric sequence:
C6 01 24

Table of Contents

Related product manuals