Intel 80286, 80287 manual SUB-Integer Subtraction

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 319
Image 319

THE 80286 INSTRUCTION SET

SUB-Integer Subtraction

Opcode

 

Instruction

Clocks

Description

28

Ir

 

SUB

eb,rb

2,mem=7

Subtract byte register from EA byte

29

Ir

 

SUB

eW,rw

2,mem=7

Subtract word register from EA word

2A

Ir

 

SUB

rb,eb

2,mem=7

Subtract EA byte from byte register

2B

Ir

 

SUB

rW,ew

2,mem=7

Subtract EA word from word register

2C

db

 

SUB

AL,db

3

Subtract immediate byte from AL

20

dw

 

SUB

AX,dw

3

Subtract immediate word from AX

80

15

db

SUB

eb,db

3,mem=7

Subtract immediate byte from EA byte

81

15

dw

SUB

eW,dw

3,mem=7

Subtract immediate word from EA word

83

15

db

SUB

eW,db

3,mem=7

Subtract immediate byte from EA word

FLAGS MODIFIED

Overflow, sign, zero, auxiliary carry, parity, carry

FLAGS UNDEFINED

None

OPERATION

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

Page 319
Image 319
Intel 80286, 80287 manual SUB-Integer Subtraction