English
Language : 

UPD17P133 Datasheet, PDF (230/289 Pages) NEC – 4-BIT SINGLE-CHIP MICROCONTROLLER
CHAPTER 18 INSTRUCTION SET
<2> Function
(r) ← (r) (m)
Exclusive-ORs (XOR) the general register contents with data memory contents. Stores the result in general
register.
<3> Example 1
Compares the address 0.03H contents and the address 0.0FH contents. If different bits are found, set and
store them in address 0.03H. If all the bits in address 0.03H are reset (i.e., the address 0.03H contents are
the same as those for address 0.0FH), jumps to LBL1; otherwise, jumps to LBL2.
This example is to compare the status of an alternate switch (address 0.03H contents) with the internal status
(address 0.0FH contents) and to branch to changed switch processing.
1010
Address 03H
XOR
0110
Address 0FH
1100
Address 03H
Bits changed
MEM003
MEM00F
MEM
MEM
XOR
SKNE
BR
BR
0.03H
0.0FH
MEM003, MEM00F
MEM003, #00H
LBL1
LBL2
Example 2
Clears the address 0.03H contents:
0101
Address 03H
XOR
0101
Address 03H
0000
Address 03H
MEM003 MEM 0.03H
XOR MEM003, MEM003
215