DL205 User Manual, 4th Edition, Rev. B
5–137
Chapter 5: Standard RLL Instructions - Number Conversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ASCII to HEX (ATH)
The ASCII TO HEX instruction converts a table of ASCII
values to a specified table of HEX values. ASCII values are
two digits and their HEX equivalents are one digit.
This means an ASCII table of four V-memory locations would only require two V-memory
locations for the equivalent HEX table. The function parameters are loaded into the
accumulator stack and the accumulator by two additional instructions. Listed below are the
steps necessary to program an ASCII to HEX table function. The example on the following
page shows a program for the ASCII to HEX table function.
Step 1: Load the number of V-memory locations for the ASCII table into the first level of the
accumulator stack.
Step 2: Load the starting V-memory location for the ASCII table into the accumulator. This
parameter must be a HEX value.
Step 3: Specify the starting V-memory location (Vaaa) for the HEX table in the ATH instruction.
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.
In the example on the following page, when X1 is ON the constant (K4) is loaded into the
accumulator using the Load instruction and will be placed in the first level of the accumulator
stack when the next Load instruction is executed. The starting location for the ASCII table
(V1400) is loaded into the accumulator using the Load Address instruction. The starting
location for the HEX table (V1600) is specified in the ASCII to HEX instruction. The table
below lists valid ASCII values for ATH conversion.
aaa
ATH
V
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
Operand Data Type
DL250-1 Range
DL260 Range
aaa
aaa
V-memory V
All (See page 3 - 55)
All (See page 3 - 56)
ASCII Values Valid for ATH Conversion
ASCII
Hex Value
ASCII Value
Hex Value
30
0
38
8
31
1
39
9
32
2
41
A
33
3
42
B
34
4
43
C
35
5
44
D
36
6
45
E
37
7
46
F
DS
Used
HPP
N/A