Mitsubishi Electronics E60 Video Game Controller User Manual


 
SUM
- 176 -
{ SUM ... Count of No. of 16-bit data items set to 1
Usable device
Bit device Word device
Con-
stant
Pointer Level
X Y M L SM F T C D R Z K H P N
Digit
desig-
nation
No. of
steps
Index
S
D
4
SUM
Operation command
D
S
SUM
Setting data
D
No. of device to count
the total No. of bits set
to 1
S
No. of device where the
total No. of bits is stored
Function
The total No. of bits in the 16-bit data of the device designated with S that are set to "1" is stored in D.
01
D after execution
1000100001 1111
16 bits
S before execution
000001000000 0000
B15 ............................................ B0
Total No. of "1"s
The total No. of "1"s is set in BIN
(In this example, 8 is set.)
Execution conditions
The execution conditions for SUM are as shown below.
Operation command OFF
SUM
ON
Executed per scan
Executed per scan