Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>eZ80</strong> <strong>CPU</strong><br />
User Manual<br />
130<br />
SBC A, s<br />
Subtract with Carry<br />
Operation<br />
Description<br />
A ← A – s – CY<br />
The s operand is any of r, n, (HL), (IX+d), or (IY+d). The s operand, along with<br />
the Carry Flag (c in the F register) is subtracted from the contents of the<br />
Accumulator, which contains the result. ADL mode affects operations with the<br />
HL, IX, and IY registers. ADL mode may be overridden with the .S or .L suffix.<br />
Condition Bits Affected<br />
S<br />
Z<br />
H<br />
P/V<br />
N<br />
C<br />
Set if result is negative; reset otherwise.<br />
Set if result is zero; reset otherwise.<br />
Set if borrow from Bit 4; reset otherwise.<br />
Set if overflow; reset otherwise.<br />
Set.<br />
Set if borrow; reset otherwise.<br />
Mnemonic Operands ADL Mode Cycles Op Codes<br />
SBC A,r X 1 jj<br />
SBC A,n X 2 DE, nn<br />
SBC A,(HL) X 2 9E<br />
SBC.S A,(HL) 1 3 52, 9E<br />
SBC.L A,(HL) 0 3 49, 9E<br />
SBC A,(IX+d) X 4 DD, 9E, dd<br />
SBC.S A,(IX+d) 1 5 52, DD, 9E, dd<br />
SBC.L A,(IX+d) 0 5 49, DD, 9E, dd<br />
SBC A,(IY+d) X 4 FD, 9E, dd<br />
SBC.S A,(IY+d) 1 5 52, FD, 9E, dd<br />
SBC.L A,(IY+d) 0 5 49, FD, 9E, dd<br />
jj = binary code 10 011 rrr where rrr identifies the A, B, C, D, E, H, or L<br />
register assembled as follows into the object code:<br />
Register rrr<br />
A 111<br />
B 000<br />
C 001<br />
D 010<br />
E 011<br />
H 100<br />
L 101<br />
UM007701-1100