Convert_Hex_String

include vmm.inc

mov edx, OFFSET32 String ; points to hexadecimal string

VMMcall Convert_Hex_String

mov [Value], eax ; value of string

mov [TermChar], edx ; points to terminating character


The Convert_Hex_String service converts a string representing a hexadecimal number into a value. The service also returns a pointer to the character in the string that marked the end of the hexadecimal number.

This service is only valid during initialization.

Parameters

String

Points to the null-terminated string to convert. The string can be any combination of hexadecimal digits (0–9, A-F), and may terminated with an uppercase or lowercase letter H.

Return Value

The EAX register contains the value of the hexadecimal string, and the EDX register contains the address of the character in the string that terminated the hexadecimal value. If a letter H terminates the number, EDX contains the address the character immediately following the H.

Uses

Flags

See Also

Convert_Boolean_String, Convert_Decimal_String, Convert_Fixed_Point_String