Set Bit
| Instruction | SETB bit |
|---|---|
| Function | Set Bit |
| Bytes | 2 |
| Cycles | 1 |
| Encoding | 1 1 0 1 0 0 1 0 bit_address |
| Operation | (bit) = 1 |
| Description | SETB sets the indicated bit to one. SETB can operate on the carry flag or any directly addressable bit. No other flags are affected. |
| Flags Affected | C AC F0 RS1 RS0 OV P |
| Example | SETB 63h The carry flag is cleared. Output Port 1 has been written with the value 34H (00110100B). The following instructions, SETB C SETB P1.0 sets the carry flag to 1 and changes the data output on Port 1 to 35H (00110101B). |
| 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 | SETB C |
|---|---|
| Bytes | 1 |
| Cycles | 1 |
| Encoding | 1 1 0 1 0 0 1 1 |
| Operation | C = 1 |
| Flags Affected | C AC F0 RS1 RS0 OV P |
| Example | SETB 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 Boolean Variable Manipulation Instructions | 8051 CPL Instruction | 8051 CLR Instruction | 8051 ORL Instruction | 8051 ANL Instruction | 8051 MOV Instruction | 8051 JC Instruction | 8051 JBC Instruction | 8051 JB Instruction | 8051 JNC Instruction | 8051 JNB Instruction
List of topics: 8051
No comments:
Post a Comment