SBB

Subtraction with borrow

SBB

SuBtract with Borrow


[Syntax]

SBB src, dest

 

[Operation]

dest = dest - src - !C;

 

[Function]

-

This instruction subtracts src and the inverse of the C flag (borrow) from dest and places the result in dest.

 

[Instruction Format]

Syntax

Processng Size

src

dest

Code size

(Byte)

SBB src, dest

L

Rs

Rd

3

L

[Rs].L

Rd

4

L

dsp:8[Rs].L

Rd

5

L

dsp:16[Rs].L

Rd

6

[Flag Change]

Flag

C

Z

S

O

Change

 

 

 

 

Conditions

C : The flag is set if an unsigned operation produces no overflow; otherwise it is cleared.

Z : The flag is set if dest is 0 after the operation; otherwise it is cleared.

S : The flag is set if the MSB of dest after the operation is 1; otherwise it is cleared.

O : The flag is set if a signed operation produces an overflow; otherwise it is cleared.

 

[Description Example]

SBB R1, R2

SBB [R1], R2