User's Manual

THE
80286
INSTRUCTION SET
SUB-Integer
Subtraction
Opcode
Instruction Clocks
28
Ir
SUB eb,rb
2,mem=7
29
Ir
SUB eW,rw
2,mem=7
2A
Ir
SUB rb,eb
2,mem=7
2B
Ir
SUB rW,ew
2,mem=7
2C
db
SUB AL,db
3
20
dw
SUB AX,dw
3
80
15
db SUB eb,db
3,mem=7
81
15
dw
SUB eW,dw
3,mem=7
83
15
db SUB eW,db
3,mem=7
FLAGS MODIFIED
Overflow, sign, zero, auxiliary carry, parity, carry
FLAGS UNDEFINED
None
OPERATION
Description
Subtract byte register from
EA
byte
Subtract word register from
EA
word
Subtract
EA
byte from byte register
Subtract
EA
word from word register
Subtract immediate byte from AL
Subtract immediate word from
AX
Subtract immediate byte from
EA
byte
Subtract immediate word from
EA
word
Subtract immediate byte from
EA
word
The second operand
is
subtracted from the first operand, and the first operand
is
replaced with the
result.
When a byte-immediate value
is
subtracted from a word operand, the immediate value
is
first
sign-extended.
PROTECTED MODE EXCEPTIONS
#GP(O) if the result
is
in
a non-writable segment. #GP(O) for an illegal memory operand effective
address
in
the
CS,
DS,
or
ES
segments; #SS(O) for an illegal address
in
the
SS
segment.
REAL ADDRESS MODE EXCEPTIONS
Interrupt
13
for a word operand
at
offset
OFFFFH.
B-109