A-382
SC140 DSP Core Reference Manual
SBC
SBC
Subtract With Borrow (DALU)
SBC
Description
Status and Conditions that Affect Instruction
Status and Conditions Changed by Instruction
Example
sub d0,d1,d1
sbc d2,d3
Operation
Assembler Syntax
Db – Dc – C
→
Dd
SBC Dc,Dd
SBC Dc,Dd
Subtracts the first data register (Dc) from the second (Dd), then subtracts the borrow (C bit) and stores the
result in the second data register (Dd). The source operands are a data register pair. The destination register
is the second register of the pair.
This instruction can be used in multiple-precision subtraction as illustrated in the example, which is a
64-bit subtraction.
Register Address
Bit Name
Description
SR[0]
C
Subtracted as a borrow from the LSB.
SR[5:4]
S[1:0]
Scaling mode bits determine which bits in the result are used in the Ln bit
calculation.
Register Address
Bit Name
Description
EMR[2]
DOVF
Set if the result cannot be represented in 40 bits.
Ln
L
Calculates and updates the Ln bit in the destination register.
SR[0]
C
Calculates and updates the carry bit in the status register.
Note:
The carry bit is set correctly for multiple-precision arithmetic using long word operands if the extension of the destination
data register is the sign-extension of bit 31.
Register/Memory Address
Before
After
D0
$00 0000 0008
L1:D1
$0:$00 0000 0005
$0:$FF FFFF FFFD
SR
$00E4 0000
$00E4 0001
D2
$00 0000 0003
L3:D3
$0:$00 0000 0005
$0:$00 0000 0001
Summary of Contents for SC140 DSP Core
Page 12: ...xii SC140 DSP Core Reference Manual ...
Page 18: ...xviii SC140 DSP Core Reference Manual ...
Page 32: ...1 6 SC140 DSP Core Reference Manual Core Architecture Features ...
Page 180: ...4 70 SC140 DSP Core Reference Manual Trace Unit Registers ...
Page 250: ...6 70 SC140 DSP Core Reference Manual Programming Rules ...
Page 314: ...7 64 SC140 DSP Core Reference Manual NOP Definition ...
Page 463: ...DI SC140 DSP Core Reference Manual A 149 15 8 7 0 DI 1 1 4 1 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 ...
Page 478: ...A 164 SC140 DSP Core Reference Manual EI ...
Page 618: ...A 304 SC140 DSP Core Reference Manual MOVES 4F s15 sssssssssssssss Signed 15 bit offset ...
Page 638: ...A 324 SC140 DSP Core Reference Manual MPYR ...
Page 746: ...A 432 SC140 DSP Core Reference Manual ZXTA x ...
Page 758: ...I 10 Index ...
Page 759: ...SC140 DSP Core Reference Manual i ...
Page 760: ......