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 for the 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
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...