Delta DVP-ES2/EX2/SS2/SA2/SX2/SE Two-Way Radio User Manual


 
DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming
3-386
API Mnemonic Operands Function
168
D MVM P
Transfer Designated Bits
Controllers
ES2/EX2 SS2 SA2
SE
SX2
Bit Devices Word devices Program Steps Type
OP
X Y M S K H KnX KnY KnM KnS T C D E F
S
1
* * * * * * ***
S
2
* * * * * * * * ***
D * * * * * * ***
MVM, MVMP: 7 steps
DMVM,DMVMP:
13 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S
1
: Source device 1 S
2
: Bits to be masked (OFF) D: D =( S
1
& S
2
) | ( D & ~ S
2
)
Explanations:
1. The instruction conducts logical AND operation between S
1
and S
2
first, logical AND operation
between D and ~S
2
secondly, and combines the 1
st
and 2
nd
results in D by logical OR
operation.
2. Rule of Logical AND operation: 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0, 1 AND 1 = 1
3. Rule of Logical OR operation: 0 OR 1= 1, 1 OR 0 = 1, 0 OR 0 = 0, 1 OR 1 = 1.
Program Example 1 :
When X0 = ON, MVM instruction conducts logical AND operation between 16-bit register D0 and
H’FF00 first, logical AND operation between D4 and H’00FF secondly, and combines the 1
st
and 2
nd
results in D4 by logical OR operation.
MVM
X0
D0
HFF00 D4
010101011 101010
111 11 100 0 0011 000
101 10 000000 00
10
AND
b15 b0
執行前
執行後
D0=HAA55
HFF00
D4=HAA34
HAA00
001101000 010010
00000011 11100 111
000 00 000110 00
01
AND
b15 b0
D4=H1234
H00FF
H0034
OR
101 10 000110 00
11
Program Example 2 :
Simplify instructions:
WAND
X0
HFF00
D110 D110
MVM
X0
D110
HFF00 D120
WAND H00FF D120 D120
WOR D100 D120 D120
=