Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

ST20-C1 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
MFG CO.
ST20-C1
ST-Microelectronics
STMicroelectronics ST-Microelectronics
'ST20-C1' PDF : 205 Pages View PDF
4 Using ST20-C1 instructions
4.2 Loading and storing
The loading and storing instructions are listed in Table 4.3.
Mnemonic
Name
Description
ldc n
load constant
Load the constant n.
ldl n
load local
Load the value from n words above Wptr.
stl n
store local
Store a value to n words above Wptr.
ldnl n
load non-local
Load the value from n words above Areg.
stnl n
store non-local
Store a value to n words above Areg.
lbinc
load byte and increment
Load a byte and increment the address by 1 byte.
sbinc
store byte and increment Store a byte and increment the address by 1 byte.
lsinc
load sixteen and increment Load a half word and increment the address by 2 bytes.
lsxinc
load sixteen sign extended Load a half word and sign extend to 32 bits and increment
and increment
the address by 2 bytes.
ssinc
store sixteen and increment Store a half word and increment the address by 2 bytes.
lwinc
load word and increment Load a word and increment the address by 4 bytes.
swinc
store word and increment Store a word and increment the address by 4 bytes.
Table 4.3 Loading and storing instructions
On the ST20, the term loading means pushing a value onto the evaluation stack. The
value to be loaded may be a value read from memory, a constant, a copy of another
register or a calculated value. Storing means popping a value from the evaluation
stack. The value may be written into memory or written into another register. The eval-
uation stack is described in section 3.3, and evaluation of expressions is described in
section 4.3.
Relative addresses are used for accessing memory in order to reduce code size, as
the operand values are smaller than full machine addresses. Data structures are
word-aligned, so relative addresses can be word offsets, reducing the operand size
further.
The most common operations performed by a program are loading and storing of a
small number of variables, and loading small literal values.
4.2.1 Loading constants
One primary instruction ldc is provided for loading a general constant, for initializing a
variable or register or for a constant in an expression.
4.2.2 Local and non-local variables
When loading from and storing to memory, the ST20 distinguishes between local and
non-local addressing. Local addressing means that the address is given as a word
offset from the Wptr. Non-local addressing means that the address is given as a word
offset from the Areg. In practice, the Wptr points to the stack, so local addressing is
31/205
®
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]