Clear
Instruction | CLR A |
---|---|
Function | Clear Accumulator |
Bytes | 1 |
Cycles | 1 |
Encoding | 1 1 1 0 0 1 0 0 |
Operation | A = 0 |
Description | CLR A clears the Accumulator (all bits set to 0). |
Flags Affected | C AC F0 RS1 RS0 OV P |
Example | The Accumulator contains 5CH (01011100B). The following instruction, CLR A leaves the Accumulator set to 00H (00000000B). |
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 |
Instruction | CLR bit |
---|---|
Function | Clear bit |
Bytes | 2 |
Cycles | 1 |
Encoding | 1 1 0 0 0 0 1 0 bit_address |
Operation | (bit) = 0 |
Description | CLR bit clears the indicated bit (reset to 0). No other flags are affected. CLR can operate on the carry flag or any directly addressable bit. |
Flags Affected | C AC F0 RS1 RS0 OV P |
Example | Port 1 has previously been written with 5DH (01011101B). The following instruction, CLR P1.2 leaves the port set to 59H (01011001B). CLR 01h |
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 |
Instruction | CLR C |
---|---|
Bytes | 1 |
Cycles | 1 |
Encoding | 1 1 0 0 0 0 1 1 |
Operation | C = 0 |
Flags Affected | C AC F0 RS1 RS0 OV P |
Example | CLR C |
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 CPL Instruction | 8051 RL Instruction | 8051 RR Instruction | 8051 RLC Instruction | 8051 RRC Instruction | 8051 SWAP Instruction
List of topics: 8051
No comments:
Post a Comment