130
WAND D10 D12 D14
D·
X0
S1· S2·
<Logic OR >
WOR D10 D12 D14
D·
X0
S1· S2·
< Logic WXOR >
WXOR D10 D12 D14
D·
X0
S1· S2·
If use this instruction along with CML instruction, XOR NOT operation could also be
executed.
WXOR D10 D12 D14
D·
X0
S1· S2·
CML D14 D14
Example 1:
The16 bits data is composed by X0~X7, and store in D0.
Transform the state of X0, X1, X2, X3 to 8421 code and store in D0.
Example 2:
Combine the low 8 bits of D0 and D2 to a word.
WAND D0 HFF D10
X0
WAND D2 HFF D12
SWAP D12
WOR D10 D12 D20
LDP X0
WAND D0 HFF D10
WAND D2 HFF D12
SWAP D12
WOR D10 D12 D20
0 or 0=0 0 or 1=1
1 or 0=1 1 or 1=1
0 xor 0=0 0 xor 1=1
1 xor 0=1 1 xor 1=0
//X0 rising edge
//Logic and, take the low 8 bits of D0 and save in D10
// Logic and, take the low 8 bits of D2 and save in D12
//swap the low 8 bits and high 8 bits of D12
//combine the low 8 bits of D10 and high 8 bits of D12,
and save in D20
tudonghoatoancau.com