Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Spanish  ▼
ALLDATASHEET.ES

X  

ST20-C1 Datasheet(PDF) 38 Page - STMicroelectronics

No. de pieza ST20-C1
Descripción Electrónicos  Instruction Set Reference Manual
PDF  205 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  STMICROELECTRONICS [STMicroelectronics]
Página de inicio  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST20-C1 Datasheet(HTML) 38 Page - STMicroelectronics

Back Button ST20-C1 Datasheet HTML 34Page - STMicroelectronics ST20-C1 Datasheet HTML 35Page - STMicroelectronics ST20-C1 Datasheet HTML 36Page - STMicroelectronics ST20-C1 Datasheet HTML 37Page - STMicroelectronics ST20-C1 Datasheet HTML 38Page - STMicroelectronics ST20-C1 Datasheet HTML 39Page - STMicroelectronics ST20-C1 Datasheet HTML 40Page - STMicroelectronics ST20-C1 Datasheet HTML 41Page - STMicroelectronics ST20-C1 Datasheet HTML 42Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 38 / 205 page
background image
4.4 Arithmetic
38/205
®
Saturated arithmetic is achieved on the ST20-C1 by evaluating an expression and
then performing the
saturate instruction. If an overflow or underflow has occurred then
the corresponding status bit will have been set, which will cause saturate to change
the value in Areg to the most positive or most negative value respectively.
saturate
clears the overflow and underflow bits.
For example, to perform a saturated multiply of
a and b:
ld a; ld b;
mul; saturate;
4.4.4
Unary minus
The expression
(-e) can be evaluated with overflow signalling by:
e; not; adc 1;
or
ldc 0; e; sub;
The first sequence , using
not, requires one less stack register than the second. not is
a bitwise inversion which is described in section 4.8.
4.4.5
Long arithmetic
The long arithmetic instructions are listed in Table 4.6.
Multiple length addition and subtraction
Multiple length addition or subtraction are performed using
addc and subc, executed
once for each word of the result. For both instructions, the carry (or borrow) is held in
the carry bit of the status register. This keeps the carrying separate from overflow, so
address calculations may be safely performed using
add, sub and wsub without
affecting the carry.
The
addc instruction forms (Breg + Areg)+ Statuscarry leaving the least significant
word of the result in Areg and the most significant (carr y) bit in the carry bit of the
status register. The Areg is rotated into the Creg.
Similarly, the
subc instruction forms (Breg - Areg)- Statuscarry leaving the least
significant word of the result in Areg and the borrow bit in the carry bit of the status
register. The Areg is rotated into the Creg.
Addition of two double length unsigned values,
X and Y, giving Z, without overflow
signalling can therefore be compiled as follows
Mnemonic
Name
addc
add with carry
subc
subtract with carry
umac
unsigned multiply accumulate
Table 4.6 Long arithmetic instructions



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com