Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
DSUM, DSUMP
- 280 -
{ DSUM, DSUMP ... Count of No. of 32-bit data set to "1"
Usable device
Bit device Word device
Con-
stant
Pointer
X Y M L F BSB T SM VTCDRWSWZSDKH P
Digit
desig-
nation
Index
No. of
steps
S
{ { { { { { {
D
{ { { { { { {
{
4
DSUM
Operation command
D
S
DSUM
DSUMP
DSUMP
DS
Setting data
D
Head No. of device
to count the total No.
of bits set to 1.
S
Head No. of device
where the total No. of
bits is stored.
Function
The total No. of bits that are set to 1 in the 32-bit data of the device designated with S is stored in the
16-bit data designated with D.
01
D after execution
10001000
1
1
1
11
32 bits
S before execution
000
00
100
0
000 00
00
B15……………………………………………B0
Total No. of "1" bits
ThetotalNo.of"1"bitsissetinBIN.
(In this example, 8 is set.)
00
Execution conditions
The execution conditions for DSUM, DSUMP are as shown below.
Operation command OFF
DSUM
ON
Executed per scan
Executed per scan
DSUMP