1758 HEIDENHAIN Technical Manual MANUALplus 620
Module 9054 Conversion from ASCII/hexadecimal → binary
Module 9054 converts strings of ASCII-coded hexadecimal values into a block
of binary values in the word-marker range. The string in the specified string
memory is interpreted as a sequence of ASCII-coded hexadecimal numbers
and converted into a block of corresponding binary bytes. Two ASCII
characters produce one binary byte. The control saves the binary block
beginning at the specified address in the word-marker range.
Call:
PS B/W/D/K <String address in which the hexadecimal value is saved>
PS B/W/D/K <Word address from which the control saves the binary
values>
CM 9054
Error recognition:
Example Initial state:
SO = „63“
BO = 99
Marker Value Meaning
NN_GenApiModule
Error (M4203)
0 Number was converted
1 For error code see
NN_GenApiModuleErrorCode (W1022)
NN_GenApiModule
ErrorCode (W1022)
2 Invalid string address
11 Invalid word address
Odd number of characters in the string
or a character that cannot be interpreted
as hexadecimal
Function STL String accu.
(characters), data stack
[bits]
Push string address
S0 onto the data
stack
PS K+0 63
Push word address
B0 onto the data
stack
PS B0 99
Conversion of the
two ASCII characters
6 and 3 to the binary
number 99
CM 9054 01100011