ZiLOG Z8 Series User Manual page 247

Table of Contents

Advertisement

Swap Nibbles
Syntax
SWAP dst
Instruction Format
OPC
Operation
dst(7-4) ↔ dst(3-0)
The contents of the lower four bits and upper four bits of the destination operand are
swapped.
Flag
C
Z
S
V
D
H
Note:
Address modes R or IR can be used to specify a 4-bit Working Register. In this format, des-
tination Working Register operand is specified by adding
the operand. For example, if Working Register
is used as the destination operand in the Op Code.
ECh
E
Example 1
If Register
SWAP B3h
Op Code: F0 B3
leaves the value
UM001604-0108
Cycles
6
dst
6
Description
Unaffected
Set if the result is zero; cleared otherwise.
Set if the result bit 7 is set; cleared otherwise.
Undefined
Unaffected
Unaffected
dst
contains
(10110011B), the statement:
BCh
B3h
(00111011B) in Register
3Bh
OPC
Address Mode
(Hex)
dst
F0
R
F1
IR
(
1110b
is the destination operand, then
R12 (CH)
. The Z and S Flags are cleared.
BCh
®
Z8
CPU
User Manual
) to the high nibble of
Eh
Instruction Description
240

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Z8 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Z8 cpu

Table of Contents