Swap nibbles within the Accumulator
Instruction | SWAP A |
---|---|
Function | Swap nibbles within the Accumulator |
Bytes | 1 |
Cycles | 1 |
Encoding | 0 1 0 0 0 1 0 0 |
Operation | A3-0 swap A7-4 |
Description | SWAP A interchanges the low- and high-order nibbles (four-bit fields) of the Accumulator (bits 3 through 0 and bits 7 through 4). The operation can also be thought of as a 4-bit rotate instruction. No flags are affected. |
Flags Affected | C AC F0 RS1 RS0 OV P |
Example | The Accumulator holds the value 0C5H (11000101B). The instruction, SWAP A leaves the Accumulator holding the value 5CH (01011100B). |
Bytes: Number of bytes required to encode the instruction. Cycles: Number of instruction cycles required to execute the instruction. Note that there are 12 oscillator cycles to one instruction cycle on a standard 8051. Encoding: Lists the byte encoding for the instruction. Operation: Lists, step-by-step, the operations performed by the instruction. Flags Affected: are highlighted in Bold |
Related topics:
8051 Logical Operation Instructions | 8051 ANL Instruction | 8051 ORL Instruction | 8051 XRL Instruction | 8051 CLR Instruction | 8051 CPL Instruction | 8051 RL Instruction | 8051 RR Instruction | 8051 RLC Instruction | 8051 RRC Instruction
List of topics: 8051
No comments:
Post a Comment