70/317
4 - Architecture of the ST7 core
core has no
Y
index register, so its instruction set does not take the
Y
index register into ac-
count. If needed, it must be pushed on entering the interrupt service routine using a
PUSH Y
in-
struction, and restored by putting a
POP Y
just before the
IRET
.
The stack pointer must be initialized at the start of the execution. The
RSP
instruction resets it
to its bottom value, that differs from one variant of the ST7 to another depending on the
number of registers provided at the beginning of page zero.
The value of the
SP
may be transferred to
A
,
X
or
Y
or set from these registers. This allows you
to access the data in the stack or to save the stack pointer. This is useful for example for
building multitasking kernels, as mentioned in Chapter 2 and illustrated in Chapter 7.
The
PUSH
and
POP
instructions mentioned earlier in this paragraph may be used to temporarily
store a register that has to be reused later. This is very useful as the core has not many in-
ternal registers.
4.3 INSTRUCTION SET AND ADDRESSING MODES
4.3.1 A word about mnemonic language
In the text above, we have given examples that use the mnemonic language. For those of you
that are not familiar with the mnemonic language of the ST7, here is a refresher. More details
will be given in the paragraph that discusses addressing modes and in the chapter about the
assembler.
The mnemonic language spans the gap between machines whose language is exclusively nu-
meric, and humans who are more comfortable with letters and words. Unlike high-level lan-
guages that provide for complex concepts that must be translated into machine language
using complex constructs, mnemonic language is easily translated into machine language
since there is almost a word-for-word correspondence between numeric machine language
and verbal mnemonic language.
Mnemonic language, also called assembly language, associates short names to the various
objects the programmer uses. A translation program, called Assembler, translates these
words into numbers. The words involved belong to the following classes:
Labels
Operation mnemonics
Operand names
Macro names
Numbers
Comments
Содержание 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 ...