DL205 User Manual, 4th Edition, Rev. B
5–149
Chapter 5: Standard RLL Instructions - Table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
For example, supppose we have a table starting at V3000
that is two words long, as shown to the right. Each word
in the table contains 16 bits, or 0 to 17 in octal. To set bit
12 in the second word, we use its octal reference (bit 14).
Then we compute the bit’s octal address from the start of
the table, so 17 + 14 = 34 octal. The following program
shows how to set the bit as shown to a “1”.
In this ladder example, we will use input X0 to trigger the Set Bit operation. First, we will
load the table length (2 words) into the accumulator stack. Next, we load the starting address
into the accumulator. Since V3000 is an octal number we have to convert it to hex by using
the LDA command. Finally, we use the Set Bit (or Reset Bit) instruction and specify the octal
address of the bit (bit 34), referenced from the table beginning.
MSB LSB
V3000
MSB LSB
V3001
1
7
01
6
1
5
1
4
1
3
1
2
1
1
1
0
7654321
16 bits
Standard RLL
Handheld Programmer Keystrokes
DirectSOFT
LD
K2
X0
Load the constant value 2
(Hex.) into the lower 16 bits
of the accumulator.
LDA
O 3000
SETBIT
O 34
Set bit 34 (octal) in the table
to a ”1”.
Convert octal 3000 to HEX
and load the value into the
accumulator. This is the
table beginning.
STR
$
SHFT
ANDST
L
3
D
SHFT
0
A
ENT
2
C
0
A
ENT
8
I
MLR
T
0
A
0
A
ANDST
L
3
D
ENT
SET
X
3
D
4
E
1
B
0
A
PREV
NEXT
ENT
SHFT
3
D