276
µPD750008 USER'S MANUAL
SUBS rp’1,XA
Function: rp’1 <– rp’1+XA ; Skip if borrow
Subtracts the contents of the XA register pair from the contents of register pair rp’1 (HL, DE, BC, XA’, HL’,
DE’, BC’), then sets the result in register pair rp’1. If the subtraction generates a borrow, the immediately
following instruction is skipped.
The carry flag is not affected.
SUBC A,@HL
Function: A, CY <– A–(HL)–CY
Subtracts the data at the data memory location addressed by the HL register pair together with the carry
flag from the contents of the A register, then sets the result in the A register. If the subtraction generates a
borrow, the carry flag is set. If no borrow is generated, the carry flag is reset.
If the execution of this instruction generates no borrow when this instruction is followed by the ADDS A,
#n4 instruction, the ADDS A, #n4 instruction is skipped. If a borrow is generated, the ADDS A, #n4 instruction
is executed, and the skip function of the ADDS A, #n4 instruction is disabled. Accordingly, a combination of
these instructions can be used for number system conversion. (See Section 11.1.)
SUBC XA,rp’
Function: XA, CY <– XA–rp’–CY
Subtracts the contents of register pair rp’ (XA, HL, DE, BC, XA’, HL’, DE’, BC’) together with the carry flag
from the contents of the XA register pair, then sets the result in the XA register pair. If the subtraction generates
a borrow, the carry flag is set. If no borrow is generated, the carry flag is reset.
SUBC rp’1,XA
Function: rp’1, CY <– rp’1–XA–CY
Subtracts the contents of the XA register pair together with the carry flag from the contents of register pair
rp’1 (HL, DE, BC, XA’, HL’, DE’, BC’), then sets the result in register pair rp’1. If the subtraction generates
a borrow, the carry flag is set. If no borrow is generated, the carry flag is reset.
AND A,#n4
Function: A <– A n4 n4 = I3-0: 0-FH
ANDs the contents of the A register with the 4-bit immediate data n4, then sets the result in the A register.
Example The high-order two bits of an accumulator are set to 0.
AND A,#0011B