275
CHAPTER 11 INSTRUCTION SET
ADDC XA,rp’
Function: XA, CY <– XA+rp’+CY
Adds the contents of register pair rp’ (XA, HL, DE, BC, XA’, HL’, DE’, BC’) together with the carry flag to
the contents of the XA register pair in binary. If the addition generates a carry, the carry flag is set. If no carry
is generated, the carry flag is reset.
ADDC rp’1,XA
Function: rp’1, CY <– rp’1+XA+CY
Adds the contents of the XA register pair together with the carry flag to the contents of register pair rp’1
(HL, DE, BC, XA’, HL’, DE’, BC’) in binary. If the addition generates a carry, the carry flag is set. If no carry
is generated, the carry flag is reset.
SUBS A,@HL
Function: A <– A–(HL) ; Skip if borrow
Subtracts the data at the data memory location addressed by the HL register pair from the contents of the
A register, then sets the result in the A register. If the subtraction generates a borrow, the immediately following
instruction is skipped.
The carry flag is not affected.
SUBS XA,rp’
Function: XA <– XA–rp’ ; Skip if borrow
Subtracts the contents of register pair rp’ (XA, HL, DE, BC, XA’, HL’, DE’, BC’) from the contents of the
XA register pair, then sets the result in the XA register pair. If the subtraction generates a borrow, the
immediately following instruction is skipped.
The carry flag is not affected.
Example Data memory is compared with register pair rp’.
MOV XA, mem
SUBS XA, rp’
; (mem) • rp’
; (mem) < rp’