ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 30

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
4.1 Manipulating the evaluation stack
4
This chapter describes the purpose for which the sequential instructions are intended,
except for the multiply-accumulate instructions, which are described in Chapter 5.
These instructions are described in the context of their intended use. Some instruc-
tions are designed for use in a particular sequence of instructions, so this chapter
describes those sequences. Instructions for exceptions are described in Chapter 6
and multi-tasking instructions are described in Chapter 7.
The architecture of the ST20-C1, including the registers and memory arrangement, is
described in Chapter 3.
4.1
The evaluation stack consists of the registers Areg, Breg and Creg. The general
action of the evaluation stack is described in section 3.3.1.
Instructions are provided for shuffling and re-order ing the values on the evaluation
stack, as listed in Table 4.1.
rot pops the value from Areg off the evaluation stack and rotates it into Creg, and arot
pushes the value from Creg onto the stack. rev swaps the Areg and Breg, and dup
pushes a copy of Areg onto the stack.
Table 4.2 shows how each of these affects the evaluation stack. Each row shows the
contents of the evaluation stack after one of these instructions is executed if the initial
values of the Areg, Breg and Creg are a, b and c respectively.
Many instructions leave the initial Areg in Creg. This value may be restored into the
Areg by using arot .
30/205
Using ST20-C1 instructions
Manipulating the evaluation stack
rot
arot
rev
dup
Instruction
Table 4.1 Evaluation stack manipulation instructions
rot
arot
dup
rev
Mnemonic
Table 4.2 Evaluation stack manipulation
Areg
b
c
b
a
rotate stack
anti-rotate stack
duplicate stack
reverse stack
Breg
Name
a
a
a
c
Creg
a
b
c
b

Related parts for ST20-C1