Download PDF file - finechips

Transcript
INSTRUCTION SET
S3CC11B/FC11B
SBC (1) – Subtract with Carry Register
Format:
SBC Rn, Ri
Description:
The SBC (Subtract with Carry) instruction is used to synthesize 32-bit subtraction. If register pairs
R0, R1 and R2, R3 hold 32-bit values (R0 and R2 hold the least-significant word), the following
instructions leave the 32-bit result in R0, R1:
SUB R0, R2
SBC R1, R3
SBC subtracts the value of register Ri, and the value of the Carry flag (stored in the T bit), from the
value of register Rn, and stores the result in register Rn. The T bit and the V flag are updated based
on the result.
Operation:
15
14
13
12
1
0
0
0
11
8
Rn
Rn := Rn + ~Ri + T bit
T bit := Carry from (Rn + ~Ri + T bit)
V flag := Overflow from (Rn + ~Ri + T bit)
if(Rn == R6/R7) Z0/Z1 := ((Rn + ~Ri + T) == 0)
Exceptions:
None
Notes:
None
6-92
7
6
5
4
0
0
1
1
3
0
Ri