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

Скачать
Страница из 1204
7-61
TEST(P),DTEST(P)
1
2
3
4
6
6
7
8
7
.4 Bit pr
oce
ssin
g instructions
7
.4.2 Bi
t te
sts (TES
T(P),DTEST(P))
7.4.2  
Bit tests (TEST(P),DTEST(P))
TEST(P),DTEST(P)
Function
TEST
(1) Fetches bit data at the location designated by 
 within the word device designated by 
and writes it to the bit device designated by 
.
(2) The bit device designated by 
 is OFF when the relevant bit is "0" and ON when it is "1".
(3) The position designated by 
 indicates the position of an individual bit in a 1-word data 
block (0 to 15).  When 16 or more is designated at 
, the target is the bit data at the position 
indicated by the remainder of n / 16.  For example, when n   18, the target is the data at b2 
since the remainder of 18 / 16  1 is "2".
DTEST
(1) Fetches bit data at the location designated by 
 within the 2-word device designated by 
or 
+1, and writes it to the bit device designated by 
.
(2) The bit device designated by 
 is OFF when the relevant bit is "0" and ON when it is "1".
:  Number of the device where bit data to be extracted is stored (BIN 16 bits)
:  Location of the bit data to be extracted (0 to 15 (TEST)/0 to 31 (DTEST)) (BIN 16/32 bits)
:  Number of the bit device where the extracted data will be stored (bits)
Setting 
Data
Internal Devices 
R, ZR
J
\
U
\G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
Basic
Process
High
performance
Redundant Universal
Command
Command
P
TEST, DTEST
TESTP, DTESTP
S1
S2
S1
S2
D
D
indicates an instruction symbol of TEST/DTEST.
S1
S2
D
S1
S2
D
S2
S1
D
D
S2
S2
bit
b15
b0
b5
S1
D
S2
S2
(When      =5)
S2
S1
S1
D
D