Intel 80286, 80287 manual SBB-Integer Subtraction With Borrow, Sbb

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 309
Image 309

THE 80286 INSTRUCTION SET

SBB-Integer Subtraction With Borrow

Opcode

 

Instruction

Clocks

Description

18

Ir

 

SBB

eb,rb

2,mem=7

Subtract with borrow byte register from EA

 

 

 

 

 

 

byte

19

jr

 

SBB eW,rw

2,mem=7

Subtract with borrow word register from EA

 

 

 

 

 

 

word

1A

Ir

 

SBB rb,eb

2,mem=7

Subtract with borrow EA byte from byte

 

 

 

 

 

 

register

1B

Ir

 

SBB rW,ew

2,mem=7

Subtract with borrow EA word from word

 

 

 

 

 

 

register

1C

db

 

SBB AL,db

3

Subtract with borrow imm. byte from AL

10

dw

 

SBB

AX,dw

3

Subtract with borrow imm. word from AX

80

13

db

SBB

eb,db

3,mem=7

Subtract with borrow imm. byte from EA byte

81

13

dw

SBB

eW,dw

3,mem=7

Subtract with borrow imm. word from EA word

83

13

db

SBB eW,db

3,mem=7

Subtract with borrow imm. byte from EA word

FLAGS MODIFIED

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

FLAGS UNDEFINED

None

OPERATION

The second operand is added to the carry flag and the result is subtracted from the first operand. The first operand is replaced with the result of the subtraction, and the flags are set accordingly.

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-99

Page 309
Image 309
Intel 80286, 80287 manual SBB-Integer Subtraction With Borrow, Sbb