SBB

SUBTRACT WITH

BORROW

SBB

Operation:

if (CF) = 1 then (DEST) = (LSRC)- (RSRC) -1

else (DEST) - (LSRC) - (RSRC)

Description:

see destination,source

SBB (Subtract w.ith Borrow) subtracts the source from the destination, subtracts one if CF is set, and returns the result to the destina- tion operand. Both operands may be bytes or words. Both operands may be signed or

Flags Affected:

AF,CF,OF,PF,SF,ZF

unsigned binary numbers (see AAS and DAS). SBB updates AF,· CF, OF, PF, SF, and ZF. Since it incorporates a borrow from a previous operation, SBB may be used to write routines that subtract numbers longer than 16 bits.

2-147

Page 182
Image 182
Intel 210200-002 manual Subtract with Borrow, See destination,source