DL205 User Manual, 4th Edition, Rev. B
5–81
Chapter 5: Standard RLL Instructions - Logical
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Exclusive OR Formatted (XORF)
The Exclusive Or Formatted instruction performs an exclusive OR
of the binary value in the accumulator and a specified range of
discrete memory bits (1 to 32).
The instruction requires a starting location (Aaaa) and the number
of bits (Kbbb) to be exclusive ORed. Discrete status flags indicate if
the result of the Exclusive Or Formatted is zero or negative (the most
significant bit is on).
NOTE:
Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the binary pattern of C10–C13 (4 bits) will be
loaded into the accumulator using the Load Formatted instruction. The value in the
accumulator will be logically Exclusive Ored with the bit pattern from Y20–Y23 using the
Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator are
output to C20–C23 using the Out Formatted instruction.
S
ta
nd
ar
d
R
LL
K4
C10
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C10
C11
C12
C13
OFF
ON
ON
OFF
Y20
Y21
Y22
Y23
OFF
ON
OFF
ON
Accumulator
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
Acc.
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
1 0 1 0
C20
C21
C22
C23
OFF
OFF
ON
ON
K4
C20
Handheld Programmer Keystrokes
1
B
ENT
1
B
4
E
0
A
0
A
ENT
STR
$
SHFT
ANDST
L
3
D
OUT
GX
SHFT
5
F
5
F
OR
Q
SHFT
SET
X
SHFT
5
F
NEXT
NEXT
NEXT
NEXT
NEXT
2
C
4
E
ENT
PREV
PREV
0
A
2
C
4
E
ENT
Location
Constant
Location
Constant
The unused accumulator bits are set to zero
DirectSOFT32
X1
LDF C10
K4
X0RF Y20
K4
OUTF
C20
K4
Load the status of 4
consecutive bits (C10-C13)
into the accumulator
Exclusive OR the binary bit
pattern (Y20-Y23) with the
value in the accumulator
Copy the specified number
of bits from the accumulator
to C20-C23
XORF (Y20-Y23)
XORF
A aaa
K bbb
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
Discrete Bit Flags
Description
SP63
Will be on if the result in the accumulator is zero
SP70
Will be on if the result in the accumulator is negative
Operand Data Type
DL250-1 Range
DL260 Range
A
aaa
bbb
aaa
bbb
Inputs X
0–777
–
0–1777
–
Outputs Y
0–777
–
0–1777
–
Control Relays C
0–1777
–
0–3777
–
Stage bits S
0–1777
–
0–1777
–
Timer bits T
0–377
–
0–377
–
Counter bits CT
0–177
–
0–377
–
Special Relays SP
0-777
–
0–777
–
Global I/O GX/GY
-
–
0-3777
–
Constant K
-
1–32
-
1–32
DS
Used
HPP Used