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.4 Arithmetic
ldl Xhi; ldl Ylo; umac; stl Z1;
ldl Xhi; ldl Yhi; umac; rev; stl Z3;
ldc 0; rev; ldl Z2; addc; stl Z2;
ldl Z3; addc; stl Z3
This gives a quadruple length unsigned result Z, where Z0 is the least significant and
Z3 the most significant word of Z.
4.4.6 Object length conversion
Object length conversion operations are provided by the instructions listed in Table
4.7.
Mnemonic
Name
xbword
sign extend byte to word
xsword
sign extend sixteen to word
Table 4.7 Object length conversion instructions
Section 3.1 explains that data can be represented in data objects of various sizes.
This section describes the instructions that can be used to convert between these
representations.
Most of the ST20-C1 integer arithmetic instructions operate on signed integers held in
the evaluation stack registers as 32-bit objects, and produce results in this form.
Object length conversion is important for conversion of high level language data types.
The ST20-C1 therefore provides instructions that allow a byte or half-word signed
integer to be sign extended to 32-bits by copying the sign bit to all the bits that were
previously not significant, as shown in Figure 3.2. The sign extension is performed on
the value in the Areg and the result is placed in the Areg. The other registers are not
affected.
xbword extends a signed byte to a word by copying bit 7 into bits 8 to 31. xsword
extends a signed half-word to a word by copying bit 15 into bits 16 to 31.
lsxinc loads a sixteen bit value, sign extends it to 32 bits and increments the address
by two bytes. This is the same as:
lsinc; xsword;
40/205
®
Share Link: GO URL

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