Standard
RLL Instructions
5–85
Standard RLL Instructions
Number Conversion Instructions
aaa
ATH
V
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.
Operand Data Type DL05 Range
aaa
Vmemory V All (See p. 4–28)
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
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.
ASCII Values Valid for ATH Conversion
ASCII Value 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
ASCII to HEX
(ATH)