- Name:
- setbit
- Syntax:
-
SETBIT var, bit
Var - is the target variable.
Bit - is the target bit (0-7 for byte variables, 0-15 for word variables)
- Description:
-
Set a specific bit in the variable.
This command sets (sets to 1) a specific bit in the target variable.
Set a bit in a variable
Set bit 0 in byte variable b6 and bit 15 in word variable w4
- Code Example:
-
setbit b6, 0 setbit w4, 15
Copy Code Submit an Example
Submit Your Own Code!
You must be logged in to submit code examples. Login now.