Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Convert_Fixed_Point_String
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     ecx, Places     ; number of decimal places
mov     edx, String     ; points to string to convert
VMMcall Convert_Fixed_Point_String
 
mov     [Value], eax    ; fixed-point value
mov     [TermChar], edx ; pointer to terminating character
 
The Convert_Fixed_Point_String service converts a string representing a
fixed-point number into a fixed-point value. This 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.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
Places     Specifies the number of digits after the decimal point to
           convert. If a fixed-point number has extra digits, the service
           skips over the digits without calculating them into the
           fixed-point value.
 
String     Points to the null-terminated string to convert. The Comments
           section describes the format of the string.
 
Return Value
 
The EAX register contains the normalized value of fixed-point number; the
actual value is computed as EAX * 10 ** (-Places). The EDX register contains
the address of the character in the string marking the end of the
fixed-point number.
 
Comments
 
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 (.).
 
Uses
 
EAX, EDX, Flags
 
See Also
 
Convert_Boolean_String, Convert_Decimal_String, Convert_Hex_String