Convert_Fixed_Point_String


include vmm.inc

mov     ecx, Places      ; number of decimal places
mov     edx, String      ; address of fixed-point string
VMMcall Convert_Fixed_Point_String

mov     [Value], eax     ; fixed-point value
mov     [TermChar], edx  ; address of terminating character

Converts a string representing a fixed-point number into a fixed-point value. The service also returns a pointer to the character in the string that marked the end of the number. This service is only valid during initialization. Uses EAX, EDX, Flags.

Places

Number of digits after the decimal point to convert. The service skips over any extra digits without calculating them into the fixed-point value.

String

Address of the null-terminated string to convert. For more information about the format of the string, see below.

A fixed-point number is a decimal number that consists of an integer, a fraction, or a combination of integer and fraction. The integer can be any combination of decimal digits and may be preceded by a plus sign (+) or a minus sign (-) to indicate a positive or negative fixed-point value. The fraction can be any combination of decimal digits but must be preceded with a decimal point (.).

See also Convert_Boolean_String, Convert_Decimal_String, Convert_Hex_String