Monday, February 29, 2016

8051 CLR Instruction

Clear

InstructionCLR A
FunctionClear Accumulator
Bytes1
Cycles1
Encoding1 1 1 0 0 1 0 0
OperationA = 0
DescriptionCLR A clears the Accumulator (all bits set to 0).
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleThe 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

InstructionCLR bit
FunctionClear bit
Bytes2
Cycles1
Encoding1 1 0 0 0 0 1 0 bit_address
Operation(bit) = 0
DescriptionCLR 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 AffectedC AC F0 RS1 RS0 OV P
ExamplePort 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

InstructionCLR C
Bytes1
Cycles1
Encoding1 1 0 0 0 0 1 1
OperationC = 0
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleCLR 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