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.

Applies To:
20X2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:
    Share:
    Print:

    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.

    Comments

    • Login to leave a comment.