Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
8 Applied Instructions (Move and Compare)
8.1 CMP / Compare
134
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation(CMP, CMPP)
The comparison value specified by and the comparison source specified by are compared with
each other. According to the result (smaller, equal or larger), any of the three points of the devices specified
by turns on.
The source data specified by and are handled as BIN (binary) values.
Comparison is executed algebraically. Example: -10 < 2
2. 32-bit operation(DCMP, DCMPP)
The comparison value specified by and the comparison source specified by are compared with
each other. According to the result (smaller, equal or larger), any of the three points of the devices specified
by turns on.
The source data specified by and are handled as BIN (binary) values.
Comparison is executed algebraically. Example: -125400 < 22466
Command input
Even if the command input turns OFF and CMP instruction is not executed,
to +2 latch the status just before the command input turns OFF from ON.
Command
input
48
49
50
51
Latched
Latched
Latched
CMP
EN
s1
s2
ENO
d
Comparison
value data
Comparison
source data
M100
M100
M101
M102
s2
d
+1
d
+2
d
d
s1
s1 s2
Turns on in the case of >
d
s1 s2
Turns on in the case of =
s1 s2
Turns on in the case of <
Command input
Command
input
48
49
50
51
Latched
Latched
Latched
DCMP
EN
s1
s2
ENO
d
M100
100
101
102
Even if the command input turns OFF and DCMP instruction is not executed,
to +2 latch the status just before the command input turns OFF from ON.
d
d
s2 s2
+1,
d
+1
d
+2
s1 s1
+1,
d
Turns on in the case of
[ +1, ] > [ +1, ]
s2s1 s1 s2
Turns on in the case of
[ +1, ] = [ +1, ]
s2s1 s1 s2
Turns on in the case of
[ +1, ] < [ +1, ]
s2s1 s1 s2
Comparison
value data
Comparison
source data