ST10 FAMILY PROGRAMMING MANUAL
159/172
Examples
Multiplication Examples
CoMULus
R0, R1, rnd
; (ACC) <-- (R0)*(R1) + rnd
CoMULus-
R2, [R6+]
; (ACC) <-- -(R2)*((R6))
; (R6) <-- (R6) + 2
CoMULus
[IDX1+QX0], [R11+QR0]
; (ACC) <-- ((IDX1))*((R11))
; (R11) <-- (R11) + (QR0)
; (IDX1) <-- (IDX1) + (QX0)
CoMULus-
[IDX0], [R15]
; (ACC) <-- -((IDX0))*((R15))
CoMULus
[IDX0+QX0], [R9-QR1], rnd
; (ACC) <-- ((IDX0))*((R9)) + rnd
; (R9) <-- (R9) - (QR1)
; (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
FF
h
C000
h
0000
h
1
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
FF
h
FA2A
h
F456
h
1
0
0
-
0
-
1
FF
h
FA2B
h
0000
h
1
0
0
-
0
-
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...