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
0
1
6
1
5
1
4
1
3
1
2
1
1
1
0
7 6 5 4 3 2 1
16 bits
S
ta
n
d
a
rd
R
L
L
Handheld Programmer Keystrokes
Direct
SOFT
LD
K
2
X0
L
oad the
c
onstant
v
al
u
e
2
(
He
x.)
i
nto the lo
w
er
16
bi
ts
o
f
the a
ccu
m
u
lator
.
LDA
O
3000
SETBIT
O
34
S
et
bi
t
34
(
o
c
tal
)
i
n the ta
b
le
to a
”1”.
C
on
v
ert o
c
tal
3000
to H
EX
and load the
v
al
u
e
i
nto the
a
ccu
m
u
lator
.
T
h
i
s
i
s the
ta
b
le
b
eg
i
nn
i
ng
.
STR
$
S
H
FT
ANDST
L
3
D
S
H
FT
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
P
REV
NEXT
ENT
S
H
FT
3
D