349
BSET, BSETP, BRST, BRSTP
1
2
3
4
4
6
7
8
7.4
B
it pr
ocessing instru
ctions
7.4.1
BSE
T, BSETP, BRST,
B
R
STP
7.4
Bit processing instructions
: Number of the device whose bits are set/reset (BIN 16 bits)
n
: Number of the bit to be set/reset (0 to 15) (BIN 16 bits)
Function
BSET
(1) Sets (sets "1" at) the nth bit in the word device designated at .
(2) If n exceeds "15", bit set/reset is performed with the lower 4 bits of the data.
BRST
(1) Resets the nth bit of a word device designated by to 0.
(2) If n exceeds "15", bit set/reset is performed with the lower 4 bits of the data.
Operation Error
(1) There is no operation error in the BSET(P) or BRST(P) instruction.
BSET, BSETP
Bit set for word devices
BRST, BRSTP
Bit reset for word devices
7.4.1
BSET, BSETP, BRST, BRSTP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
n
––
Basic
Process
High
performance
Redundant Universal
LCPU
Command
Command
P
D
n
D
n
BSET, BRST
BSETP, BRSTP
indicates an instruction s
y
mbol of BSET/BRST.
D
D
D
1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1
D10
b15
b6
b0
b1
Before execution
1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1
D10
After execution
b15
b6
b0
b1
1 is set
K6
D10
BSETP
D
1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1
D10
Before execution
1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1
D10
After execution
0 is set.
K11
D10
BRSTP
b0
b1
b15
b11
b0
b1
b15
b11