ST10 FAMILY PROGRAMMING MANUAL
169/172
Addressing Modes
Examples
Subtraction Examples
Mnemonic
Rep
Format
Bytes
CoSUB
Rw
n
, Rw
m
No
A3 nm 0A 00
4
CoSUBR
Rw
n
, Rw
m
No
A3 nm 12 00
4
CoSUB2
Rw
n
, Rw
m
No
A3 nm 4A 00
4
CoSUB2R
Rw
n
, Rw
m
No
A3 nm 52 00
4
CoSUB
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm 0A rrrr:rqqq
4
CoSUBR
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm 12 rrrr:rqqq
4
CoSUB2
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm 4A rrrr:rqqq
4
CoSUB2R
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm 52 rrrr:rqqq
4
CoSUB
Rw
n
, [Rw
m
⊗]
Yes
83 nm 0A rrrr:rqqq
4
CoSUBR
Rw
n
, [Rw
m
⊗]
Yes
83 nm 12 rrrr:rqqq
4
CoSUB2
Rw
n
, [Rw
m
⊗]
Yes
83 nm 4A rrrr:rqqq
4
CoSUB2R
Rw
n
, [Rw
m
⊗]
Yes
83 nm 52 rrrr:rqqq
4
CoSUB
R0, R1
; (ACC) <-- (ACC) - (R1)\(R0)
CoSUB2
R2, [R6+]
; (ACC) <-- (ACC) - 2*( ((R6)) \ (R2) )
; (R6) <-- (R6) + 2
Repeat 3 times
CoSUB
CoSUB
[IDX1+QX1], [R10+QR0] ; (ACC) <-- (ACC) - ( ((R10))\((IDX1)) )
; (R10) <-- (R10) + (QR0)
; (IDX1) <-- (IDX1) + (QX1)
Repeat MRW times CoSUB2R
CoSUB2R
R4, [R8 - QR1]
; (ACC) <-- 2*( ((R8))\(R4) ) - (ACC)
; (R8) <-- (R8) - (QR1)
Instr.
MS
op 1
op 2
ACC (before)
ACC (after)
N
Z
C
SV
E
SL
CoSUB
x
183A
h
72AC
h
00 7FFF FFFF
h
00 0D53 E7C5
h
0
0
0
-
0
-
CoSUBR
x
183A
h
72AC
h
00 7FFF FFFF
h
FF F2AC 183B
h
1
0
1
-
0
-
CoSUB2
x
0C1D
h
3956
h
00 E604 5564
h
00 7358 3D2A
h
0
0
0
-
0
-
CoSUB2R
x
0C1D
h
3956
h
00 E604 5564
h
FF 8CA7 C2D6
h
1
0
1
-
0
-
CoSUB
0
FFFF
h
FFFF
h
7F FFFF FFFF
h
80 0000 0000
h
1
0
1
1
1
-
1
00 7FFF FFFF
h
0
0
1
1
0
1
CoSUB2
0
0000
h
3000
h
7F FFFF FFFF
h
7F 9FFF FFFF
h
0
0
0
-
1
-
CoSUB2
0
0001
h
0000
h
80 0000 0000
h
7F FFFF FFFE
h
0
0
0
1
1
-
1
FF 8000 0000
h
1
0
0
1
0
1
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...