2-33

2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Sequence Output Instructions
2
SETB/RSTB
SETB/RSTB
Applicable Program Areas
Operands
Operand Specifications
Flags
Function
Instruction Mnemonic Variations Function
code Function
SINGLE BIT SET SETB @SETB, !SETB,
!@SETB 532 SETB(532) turns ON the specified bit.
SINGLE BIT RESET RSTB @RSTB, !RSTB,
!@RSTB 533 RSTB(533) turns OFF the specified bit.
Symbol
SETB RSTB
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
D Word address UINT 1
N Bit number UINT 1
Area Word addresses Indirect DM addresses Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
DOK OK OK OK OK OK OK OK OK --- --- --- ---
NOK
Operand Description Data type
Error Flag P_ER ON if N is not within the specified range of 0000 to 000F (&0 to &15).
OFF in all other cases.

SETB

SETB(532) turns ON bit N of word D

when the execution condition is ON. The

status of the bit is not affected when the

execution condition is OFF.

D: Word address
SETB(532)
D
NN: Bit number
D: Word address
RSTB(533)
D
NN: Bit number
Execution condition ON
OFF
Bit N of word D ON
OFF
15
This bit is turned OFF.