beautypg.com

Subx – Zilog Z8F0130 User Manual

Page 250

background image

eZ8

CPU Core

User Manual

UM012820-0810

SUBX Instruction

235

SUBX

Definition

Subtract using Extended Addressing.

Syntax

SUBX dst, src

Operation

dst

 dst - src

Description

This new eZ8 extended addressing instruction subtracts the source oper-
and from the destination operand. The destination operand stores the
result. The source operand contents are unaffected. The eZ8 CPU per-
forms subtraction by adding the two’s complement of the source operand
to the destination operand.

Flags

C

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

Z

Set if the result is zero; reset otherwise

S

Set if the result is negative; reset otherwise

V

Set if an arithmetic overflow occurs; reset otherwise

D

Set to 1

H

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