![Samsung S3C80M4/F80M4 User Manual Download Page 185](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174185.webp)
S3C80M4/F80M4
INSTRUCTION SET
6-83
SWAP
—
Swap Nibbles
SWAP
dst
Operation:
dst (0 – 3)
↔
dst (4 – 7)
The contents of the lower four bits and upper four bits of the destination operand are swapped.
7
0
4 3
Flags: C:
Undefined.
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:
Bytes Cycles Opcode
(Hex)
Addr Mode
dst
opc dst
2 4 F0
R
4 F1
IR
Examples:
Given: Register 00H = 3EH, register 02H = 03H, and register 03H = 0A4H:
SWAP 00H
→
Register 00H = 0E3H
SWAP @02H
→
Register 02H = 03H, register 03H = 4AH
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).
Summary of Contents for S3C80M4/F80M4
Page 1: ...S3C80M4 F80M4 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Page 44: ...ADDRESS SPACES S3C80M4 F80M4 2 20 NOTES ...
Page 84: ...CONTROL REGISTERS S3C80M4 F80M4 4 26 NOTES ...
Page 102: ...INTERRUPT STRUCTURE S3C80M4 F80M4 5 18 NOTES ...
Page 190: ...INSTRUCTION SET S3C80M4 F80M4 6 88 NOTES ...
Page 202: ...RESET and POWER DOWN S3C80M4 F80M4 8 6 NOTES ...
Page 216: ...8 BIT TIMER 0 S3C80M4 F80M4 11 4 NOTES ...
Page 220: ...8 BIT PULSE WIDTH MODULATION S3C80M4 F80M4 12 4 NOTES ...
Page 230: ...ELECTRICAL DATA S3C80M4 F80M4 13 10 NOTES ...