Swap — Swap Nibbles - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.69 SWAP — SWAP NIBBLES
dst
SWAP
dst (0 – 3)  dst (4 – 7)
Operation:
The contents of lower four bits and upper four bits of the destination operand are swapped.
C: Undefined.
Flags:
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result bit 7 is set; cleared otherwise.
V: Undefined.
D: Unaffected.
H: Unaffected.
Format:
opc
Given register 00H = 3EH, register 02H = 03H, and register 03H = 0A4H:
Examples:
SWAP 00H
SWAP @02H  
In the first example, if general register 00H contains the value 3EH (00111110B), the statement
"SWAP 00H" swaps the lower and upper four bits (nibbles) in the 00H register, leaving the value
0E3H (11100011B).
7
dst
Register 00H = 0E3H
 
Register 02H = 03H, register 03H = 4AH
4 3
0
Bytes
Cycles
2
6-81
6 INSTRUCTION SET
Opcode
Addr Mode
(Hex)
4
F0
4
F1
dst
R
IR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents