Справочник Пользователя для Mitsubishi Electronics QCPU

Скачать
Страница из 1204
7-59
BSET(P),BRST(P)
1
2
3
4
6
6
7
8
7
.4 Bit pr
oce
ssin
g instructions
7
.4.1 Bi
t set and
 reset for word devic
es (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 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