The LazyBoy Library Manual - StrToDWord

Part of the Strings group.

%imacro StrToDWord 2-3
Prefers: DX:AX, ES:DI
Prefers: DX:AX, DI

Convert an ASCIIZ string to a 32-bit unsigned integer. The ASCIIZ can be a string representing a positive integer, hexadecimal or binary number.

A hexadecimal and binary numbers are caseless. A hex number starts with either 0x or simply x.

A binary number contains only 0 and 1 followed by a single b character.

If the value is negative, contains invalid characters or requires more than a dword, the Carry flag will be set to indicate the string could not be converted.

%2 is a pointer. If no segment is provided for %2, then ES is assumed. Unless %2 is a code label, then CS will be assumed.

If %3 is SIGNED or SINT, then the output will be a signed 32-bit integer and a ASCIIZ string that represents a negative number will be permitted. However the negative symbol is forbidden for strings using hexadecimal or binary representations. For those, the high bit will indicate a negative value.

Examples:

    StrToDWord  dx:ax, di         ; convert string at es:di to an unsigned integer.
    StrToDWord  dx:ax, ASTR       ; convert string at cs:ASTR to an unsigned integer.
    StrToDWord  dx:ax, bx, sint   ; convert string at es:bx to an signed integer.