December 2001 Commands 7 – 111
Word processing
with the
EXCLUSIVE OR
command
Syntax: XO (EXCLUSIVE OR)
Operands: B, W, D, K
Action:
Gate the contents of the word accumulator and the operand with EXCLUSIVE
OR. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D
= K = 32 bit), 8, 16 or 32 bits will be influenced in the accumulator. Thus, bit 0
of the accumulator is gated with bit 0 of the operand, bit 1 of the accumulator
with bit 1 of the operand, etc. The TNC saves the result of the operation in the
word accumulator.
Example:
Gate the content of byte S B5 and B6 with EXCLUSIVE OR, and assign the
result to word W8.
Initial state:
Byte B5 = 2A (hex)
Byte B6 = 36 (hex)
Word W8 = ?
Function STL Accumulator contents [bit] Operand contents [bit]
31..15 ..................... 7 ................. 0 1 5 .......... 8 7............ 0
Load byte B6 into
the word
accumulator.
L B6 0 ..... 0 000000000110110 00110110
Gate the contents of
the word
accumulator and
byte B5 with
EXCLUSIVE OR.
XO B5 0 ..... 0 000000000011100 00101010
Assign the gating
result to word W8.
= W8 0 ..... 0 000000000011100 00011100