ST10 FAMILY PROGRAMMING MANUAL
157/172
Notes: The result of CoMULu is never saturated, whatever the value of MS bit is. (see multiplication
examples below).
Examples
Multiplication Examples
CoMULu
R0, R1, rnd
; (ACC) <-- (R0)*(R1) + rnd
CoMULu-
R2, [R6+]
; (ACC) <-- -(R2)*((R6))
; (R6) <-- (R6) + 2
CoMULu
[IDX0], [R11+]
; (ACC) <-- ((IDX0))*((R11))
; (R11) <-- (R11) + 2
CoMULu-
[IDX1-], [R15+QR0]
; (ACC) <-- -((IDX1))*((R15))
; (R15) <-- (R15) + (QR0)
; (IDX1) <-- (IDX1) - 2
CoMULu
[IDX0+QX0], [R9-], rnd
; (ACC) <-- ((IDX0))*((R9)) + rnd
; (R9) <-- (R9) - 2
; (IDX0) <-- (IDX0) + (QX0).
Cases
op 1
op 2
rnd
MAE
MAH
MAL
N
Z
C
SV
E
SL
MP=x, MS=x
8000
h
8000
h
x
00
h
4000
h
0000
h
0
0
0
-
0
-
MP=x, MS=x
7FFF
h
7FFF
h
0
00
h
3FFF
h
0001
h
0
0
0
-
0
-
1
00
h
3FFF
h
0000
h
0
0
0
-
0
-
MP=x, MS=x
8001
h
F456
h
0
00
h
7A2B
h
F456
h
0
0
0
-
0
-
1
00
h
7A2C
h
0000
h
0
0
0
-
0
-
MP=x, MS=x
FFFF
h
FFFF
h
0
00
h
FFFE
h
0001
h
0
0
0
-
0
-
1
00
h
FFFE
h
0000
h
0
0
0
-
0
-
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...