beautypg.com

Cpcx – Zilog Z8F0130 User Manual

Page 142

background image

eZ8

CPU Core

User Manual

UM012820-0810

CPCX Instruction

127

CPCX

Definition

Compare with Carry using Extended Addressing.

Syntax

CPCX dst, src

Operation

dst - src - C

Description

For this new eZ8 extended addressing instruction, the source operand
with the C bit is compared to (subtracted from) the destination operand
and the appropriate flags are set accordingly. The contents of both oper-
ands are unaffected. For multiprecision operation, repeating this instruc-
tion enables multibyte compares. Only if the initial state of the Zero flag
is 1 and the result of the compare is 0 is the Zero flag set.

Flags

C

Set if a borrow is required by bit 7; reset otherwise

Z

Set if the result is zero and the initial Zero flag is 1; reset otherwise

S

Set if the result is negative; reset otherwise

V

Set if an arithmetic overflow occurs; reset otherwise

D

Unaffected

H

Unaffected