intel.
MCS”-51 PROGRAMMER’SGUIDE AND INSTRUCTION SET
SUBB ~direct
Bytes:
cycles:
Encoding:
Operation:
SUBB A@Ri
Bytes:
cycles:
Encoding:
Operation:
SUBB A,4$dats
Bytes:
Cycles:
Encoding:
Operation:
SWAP A
2
1
I
1001
0101
I
directaddress
SUBB
(A) - (A) – (C) – (direct)
1
1
I1OO1 IOllil
SUBB
(A) - (A) - (C) - ((M))
.
f
1
1001 0100
I
immediate data
SUBB
(A) - (A) - (C) – #data
Function:
Description:
Example:
Bytes:
Cycles:
Encoding:
Operation:
Swapnibbleswithinthe Accumulator
SWAP A interchange the low-and high-ordernibblea(four-bit fields)of the Accumulator
(bits 3-0md bits7-4).Theoperationcan ako bethoughtofas a four-bitrotateinstruction.No
flagsare affected.
The Accumulatorholdsthe valueOC5H(11OO31O1B).The instruction,
SWAP A
leavesthe Accumulatorholdingthe value5CH(O1O111OOB).
1
1
1100
0100
SWAP
(A3-0)~ (A7-4)
2-71