UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
73
BSWAP
Bit Swap
BSWAP dst
Operation
dst[7:0]
←
dst[0:7]
Description
The contents of the Register are bit flipped:
dst[7] <--> dst[0]
dst[6] <--> dst[1]
dst[5] <--> dst[2]
dst[4] <--> dst[3]
Flags
Attributes
Escaped Mode Addressing
Using Escaped Mode Addressing, address mode R specifies a Working Register. If the
destination address is prefixed by
EH
(1110B), a Working Register is inferred. For exam-
ple, if Working Register R12 (
CH
) is the desired destination operand, use
ECH
as the desti-
nation operand in the opcode. To access Registers with addresses
E0H
to
EFH
, either set
the Working Group Pointer, RP[7:4], to
EH
or use indirect addressing.
Example
•
If Register 27H contains the value
53H
(01010011B), the statement:
BSWAP 27
Object Code: D5 27
C
Undefined.
Z
Set if the result is zero; reset otherwise.
S
Set if the result is negative; reset otherwise.
V
Reset to 0.
D
Unaffected.
H
Unaffected.
Mnemonic
Destination
Opcode (Hex)
Operand 1
Operand 2
Operand 3
BSWAP
R1
D5
R1
—
—