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