bdfs1m0rStructured Programming Macros

#CONH-Convert Character Hexadecimal to Binary

Use this macro to generate inline code to convert a character hexadecimal number to a binary value. Each pair of character hexadecimal digits converts to 1 byte of binary.

This macro only converts data that corresponds to the EBCDIC characters A-Z and 0-9. The corresponding hexadecimal values are as follows:

Hexadecimal Value
EBCDIC Value
 X'C1'-X'C9' 
A-I
 X'D1'-X'D9' 
J-R
 X'E2'-X'E9' 
S-Z
 X'F0'-X'F9' 
0-9
Note:
See Table 1 for a summary of all the conversion macros.

Format




INPUT=reg1
specifies a register, reg1, that points to the start of the string to convert.

TO=reg2
specifies a register, reg2, that points to the location that will contain the converted value.

MAX=reg3
specifies a register, reg3, that contains the maximum number of characters to convert. Specify this value as a multiple of 2. If the value is not a multiple of 2, it will be rounded up to a multiple of 2. For example, if you specify 3, the value used will be 4.

WORK=workarea
specifies an 8-byte work area.

Entry Requirements

None.

Return Conditions

Programming Considerations

Examples

Related Macros

#CONB-Convert Character Decimal to Binary.