beautypg.com

Sbc hl, sp, Operation, Description – Zilog EZ80F916 User Manual

Page 346: Condition bits affected attributes

background image

eZ80

®

CPU

User Manual

UM007715-0415

CPU Instruction Set

337

SBC HL, SP

Subtract with Carry

Operation

HL  HL – SP – C

Description

The Stack Pointer (SP) and the Carry Flag (C) are subtracted from the contents of the HL

register. The result is written to HL. In ADL mode, or if the .L suffix is employed, the 24-

bit Stack Pointer Long (SPL) is used. In Z80 mode of if the .S suffix is employed, the 16-

bit Stack Pointer Short (SPS) is used.

Condition Bits Affected

Attributes

S

Set if result is negative; reset otherwise.

Z

Set if result is 0; reset otherwise.

H

Set if borrow from bit 12; reset otherwise.

P/V

Set if overflow; reset otherwise.

N

Set.

C

Set if borrow; reset otherwise.

Mnemonic Operand

ADL Mode Cycle

Opcode (hex)

SBC

HL,SP

X

2

ED, 72

SBC

.S

HL,SP

1

3

52, ED, 72

SBC

.L

HL,SP

0

3

49, ED, 72

This manual is related to the following products: