DL205 User Manual, 4th Edition, Rev. B
5–152
Chapter 5: Standard RLL Instructions - Table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Find Greater Than (FDGT)
The Find Greater Than instruction is used to search for the first
occurrence of a value in a V-memory table that is greater than
the specified value (Aaaa), which can be either a V-memory
location or a 4-digit constant. The function parameters are
loaded into the first level of the accumulator stack and the
accumulator by two additional instructions. Listed below are
the steps necessary to program the Find Greater Than function.
NOTE:
This instruction does not have an offset, such as the one required for the FIND instruction.
Step 1: Load the length of the table (up to 255 locations) into the first level of the accumulator stack.
This parameter must be a HEX value, 0 to FFFF.
Step 2: Load the starting V-memory location for the table into the accumulator. This parameter must
be a HEX value.
Step 3: Insert the FDGT instruction which specifies the greater than search value.
Results: The offset from the starting address to the first Vmemory location which contains the greater
than search value is returned to the accumulator as a HEX value. SP53 will be set on if the
value is not found and 0 will be returned in the accumulator.
Helpful hint: — For parameters that require HEX values when referencing memory locations,
the LDA instruction can be used to convert an octal address to the HEX equivalent and load
the value into the accumulator.
FDGT
A aaa
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
LD
K6
X1
LDA
O 1400
LD
K2
V1400 0
V1401 1
V1402 2
V1403 3
V1404 4
V1405 5
V1406
V1407
0 1 2 3
0 5 0 0
9 9 9 9
3 0 7 4
8 9 8 9
1 0 1 0
X X X X
X X X X
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
ANDST
L
3
D
PREV
5
F
SHFT
8
I
3
D
TMR
N
8
I
1
B
ENT
PREV
6
G
ENT
J
ENT
SHFT
ANDST
L
3
D
1
B
4
E
0
A
8
I
2
C
ENT
0
A
FIND
K8989
Convert octal 1400 to HEX
300 and load the value into
the accumulator
Load the constant value 2
into the lower 16 bits of
the accumulator
Find the location in the table
where the value 8989 resides
Offset
Begin here
Table length
Accumulator
0 0 0 0 0 0 0 4
V1404 contains the location
where the match was found.
The value 8989 was the 4th
location after the start of the
specified table.
NEXT
J
9
9
0
A
ENT
Direct
SOFT
DS
Used
HPP Used