7-59
BSET(P),BRST(P)
1
2
3
4
6
6
7
8
7.4 Bit processing instructions
7.4.1 Bit set and reset for word devices (BSET(P),BRST(P))
7.4 Bit processing instructions
7.4.1
Bit set and reset for word devices (BSET(P),BRST(P))
BSET(P),BRST(P)
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.
: 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)
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
Command
Command
P
D
n
D
n
BSET, BRST
BSETP, BRSTP
indicates an instruction symbol of BSET/BRST.
D
D
D
1 1
0 0
1
0
1 1
00
111
0
11D10
b15
b6
b0b1
Before execution
1 1
0 0
1
0
1 1
0
1 111
0
11D10
After execution
b15 b6
b0b1
1 is set
K6
D10BSETP
D
1 1
0 0
1
0
1 1
00
111
0
11D10
Before execution
1 1 0 000 1 100111011D10
After execution
0 is set.
K11
D10
BRSTP
b0b1
b15 b11
b0b1
b15 b11