ST10 FAMILY PROGRAMMING MANUAL
130/172
Examples
Addition Examples
CoADD
R0, R1
;
(ACC)
<-- (ACC) + (R1)\(R0)
CoADD2
R2, [R6+]
; (ACC)
<-- (ACC) + 2*( ((R6))\(R2) )
; (R6)
<-- (R6) + 2
Repeat 3 times CoADD
CoADD
[IDX1+QX1], [R10+QR0]
;
(ACC)
<-- (ACC) + ( ((R10))\((IDX1)) )
; (R10)
<-- (R10) + (QR0)
; (IDX1)
<-- (IDX1) + (QX1)
Repeat MRW times CoADD2
CoADD2
R4, [R8 - QR1]
; (ACC)
<-- (ACC) + 2*( ((R8))\(R4) )
;
(
R8)
<-- (R8) - (QR1)
Instr.
MS
op 1
op 2
ACC (before)
ACC (after)
N
Z
C
SV
E
SL
CoADD
x
0000
h
FFFF
h
00 0100 0000
h
00 00FF 0000
h
0
0
1
-
0
-
CoADD2
x
0000
h
0200
h
00 0300 0000
h
00 0700 0000
h
0
0
0
-
0
-
CoADD
0
0000
h
4000
h
7F BFFF FFFF
h
7F FFFF FFFF
h
0
0
0
-
1
-
CoADD
0
0001
h
4000
h
7F BFFF FFFF
h
80 0000 0000
h
1
0
0
1
1
-
CoADD
0
FFFF
h
FFFF
h
FF FFFF FFFF
h
FF FFFF FFFE
h
1
0
1
-
0
-
CoADD
0
FFFF
h
FFFF
h
00 0000 0001
h
00 0000 0000
h
0
1
1
-
0
-
CoADD
0
FFFF
h
FFFF
h
80 0000 0000
h
7F FFFF FFFF
h
0
0
1
1
1
-
CoADD2
0
0001
h
2000
h
FF C000 0001
h
00 0000 0003
h
0
0
1
-
0
-
CoADD2
0
0001
h
1800
h
FF C000 0001
h
FF F000 0003
h
1
0
0
-
0
-
CoADD
0
B4A1
h
73C2
h
00 7241 A0C3
h
00 E604 5564
h
0
0
0
-
1
-
1
00 7FFF FFFF
h
0
0
0
-
0
1
CoADD
0
B4A1
h
A3C2
h
FF 8241 A0C3
h
FF 2604 5564
h
1
0
1
-
1
-
1
FF 8000 0000
h
1
0
1
-
0
1
CoADD
0
B4A1
h
73C2
h
7F B241 A0C3
h
80 2604 5564
h
1
0
0
1
1
-
CoADD
0
B4A1
h
A3C2
h
80 0241 A0C3
h
7F A604 5564
h
0
0
1
1
1
-
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...