538
CHAPTER 28 INSTRUCTION OPERATION
User’s Manual U12697EJ3V0UM
(7) 16-bit arithmetic instructions: ADDW, SUBW, CMPW
Mnemonic
Operand
Bytes
Operation
Flag
S
Z
AC P/V CY
ADDW
AX, #word
3
AX, CY
←
AX + word
×
×
×
V
×
rp, #word
4
rp, CY
←
rp + word
×
×
×
V
×
rp, rp'
2
rp, CY
←
rp + rp'
×
×
×
V
×
AX, saddrp2
2
AX, CY
←
AX + (saddrp2)
×
×
×
V
×
rp, saddrp
3
rp, CY
←
rp + (saddrp)
×
×
×
V
×
saddrp, rp
3
(saddrp), CY
←
(saddrp) + rp
×
×
×
V
×
rp, sfrp
3
rp, CY
←
rp + sfrp
×
×
×
V
×
sfrp, rp
3
sfrp, CY
←
sfrp + rp
×
×
×
V
×
saddrp, #word
4/5
(saddrp), CY
←
(saddrp) + word
×
×
×
V
×
sfrp, #word
5
sfrp, CY
←
sfrp + word
×
×
×
V
×
saddrp, saddrp'
4
(saddrp), CY
←
(saddrp) + (saddrp')
×
×
×
V
×
SUBW
AX, #word
3
AX, CY
←
AX – word
×
×
×
V
×
rp, #word
4
rp, CY
←
rp – word
×
×
×
V
×
rp, rp'
2
rp, CY
←
rp – rp'
×
×
×
V
×
AX, saddrp2
2
AX, CY
←
AX – (saddrp2)
×
×
×
V
×
rp, saddrp
3
rp, CY
←
rp – (saddrp)
×
×
×
V
×
saddrp, rp
3
(saddrp), CY
←
(saddrp) – rp
×
×
×
V
×
rp, sfrp
3
rp, CY
←
rp – sfrp
×
×
×
V
×
sfrp, rp
3
sfrp, CY
←
sfrp – rp
×
×
×
V
×
saddrp, #word
4/5
(saddrp), CY
←
(saddrp) – word
×
×
×
V
×
sfrp, #word
5
sfrp, CY
←
sfrp – word
×
×
×
V
×
saddrp, saddrp'
4
(saddrp), CY
←
(saddrp) – (saddrp')
×
×
×
V
×
CMPW
AX, #word
3
AX – word
×
×
×
V
×
rp, #word
4
rp – word
×
×
×
V
×
rp, rp'
2
rp – rp'
×
×
×
V
×
AX, saddrp2
2
AX – (saddrp2)
×
×
×
V
×
rp, saddrp
3
rp – (saddrp)
×
×
×
V
×
saddrp, rp
3
(saddrp) – rp
×
×
×
V
×
rp, sfrp
3
rp – sfrp
×
×
×
V
×
sfrp, rp
3
sfrp – rp
×
×
×
V
×
saddrp, #word
4/5
(saddrp) – word
×
×
×
V
×
sfrp, #word
5
sfrp – word
×
×
×
V
×
saddrp, saddrp'
4
(saddrp) – (saddrp')
×
×
×
V
×