GP Numeric String Evaluation - EVAL Hexadecimal String Evaluation - EVAL16 Decimal String Evaluation - EVAL10 Octal String Evaluation - EVAL8 Binary String Evaluation - EVAL2 ------------------------------------------------------------- EVAL - General-Purpose Numeric String Evaluation ENTER: HL = Address of first byte of string to convert EXIT : HL = Points to character after converted string (or char causing error if error flag set) DE = 16-bit Binary value of string A = E value, Carry Flag Clear (NC) if Ok Carry Flag Set (C) if Error in String USES : AF,DE,HL Usage: This routine converts the character string pointed to by HL into a 16-bit binary representation. EVAL performs the conversion until a non-hexadecimal character is encountered, at which time it looks at the last character and the previous character to determine if the string is representing a binary, octal, decimal, or hexadecimal number. Input string characters may be upper- or lower-case. Valid input string formats are -- bbbbbbbbbbbbbbbbB -- b=0 or b=1; Binary string ttttt or tttttD -- 0 <= t <= 9; Decimal string hhhhH or hhhhX -- 0 <= h <= F; Hexadecimal string oooooooO or oooooooQ -- 0 <= o <= 7; Octal string EVAL16 - Hexadecimal String Evaluation ENTER: HL = Address of first char of string to convert EXIT : HL = Points to Character terminating conversion DE = Contains the 16-bit binary value of string A = E value USES : AF,DE,HL Usage: EVAL16 converts the string of ASCII hexadecimal characters pointed to by HL into a 16-bit binary value. Conversion progresses until an invalid hexadecimal digit (0-9, A-F) is encountered. EVAL10 - Decimal String Evaluation ENTER: HL = Address of first char of string to convert EXIT : HL = Points to character terminating conversion DE = Contains the 16-bit binary value of string A = E value USES : AF,DE,HL Usage: EVAL10 converts the string of ASCII decimal characters pointed to by HL into a 16-bit binary value. Conversion progresses until an invalid decimal digit (0-9) is encountered. EVAL8 - Octal String Evaluation ENTER: HL = Address of first char of string to convert EXIT : HL = Points to character terminating conversion DE = Contains the 16-bit binary value of string A = E value USES : AF,DE,HL Usage: EVAL8 converts the string of ASCII octal characters pointed to by HL into a 16-bit binary value. Conversion progresses until an invalid octal digit (0-7) is encountered. EVAL2 - Binary String Evaluation ENTER: HL = Address of first char of string to convert EXIT : HL = Points to character terminating conversion DE = Contains the 16-bit binary value of string A = E value USES : AF,DE,HL Usage: EVAL2 converts the string of ASCII binary characters pointed to by HL into a 16-bit binary value. Conversion progresses until an invalid binary digit (0-1) is encountered.