Mitsubishi M16C/60 Series Software Manual page 90

16-bit single-chip microcomputer
Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

SBC
When (T) = 0, (A) ← (A) – (M) – (C)
Op e r a t io n :
F u n c t io n :
When T = 0, this instruction subtracts the value of M and the
complement of C from A, and stores the results in A and C.
When T = 1, the instruction subtracts the contents of M and
the complement of C from the contents of M(X), and stores the
results in M(X) and C.
A remain unchanged, but status flag are changed.
M(X) represents the contents of memory where is indicated by
X.
St a t u s fla g : N :
V :
T :
B :
I :
D :
Z :
C :
Addressing mode
∆SBC∆#$nn
Immediate
∆SBC∆$zz
Zero page
∆SBC∆$zz,X
Zero page X
∆SBC∆$hhll
Absolute
∆SBC∆$hhll,X
Absolute X
∆SBC∆$hhll,Y
Absolute Y
∆SBC∆($zz,X)
(Indirect X)
∆SBC∆($zz),Y
(Indirect Y)
Notes 1: When T=1, add 3 to the cycle number.
2: When SBC instruction is executed in the decimal operation mode
(D = 1), decision of C is delayed. Accordingly, do not execute the
instruction which operates C such as SEC, CLC, etc.
84
S
B
U
TRACT WITH
(T) = 1, (M(X)) ← (M(X)) – (M) – (C)
N is 1 when bit 7 is 1 after the operation; otherwise N is
0.
V is 1 when the operation result exceeds +127 or –128;
otherwise V is 0.
No change
No change
No change
No change
Z is 1 when the operation result is 0; otherwise Z is 0.
C is 1 when the subtracted result is equal to or greater
than 0; otherwise C is 0.
Statement
C
ARRY
Machine codes
Byte number
E9
, nn
16
16
E5
, zz
16
16
F5
, zz
16
16
ED
, ll
, hh
16
16
16
FD
, ll
, hh
16
16
16
F9
, ll
, hh
16
16
16
E1
, zz
16
16
F1
, zz
16
16
SBC
Cycle number
2
2
2
3
2
4
3
4
3
5
3
5
2
6
2
6

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/20 series

Table of Contents