The LazyBoy Library Manual - PtrToInt

Part of the System group.

%imacro PtrToInt 1
Prefers: ES:DI

Convert a pointer to a 32-bit integer value.

In real mode, any pointer can be converted to a 32-bit integer value by carefully combining its segment and offset and calculating a integer value.

Converting a pointer to a simple integer can make comparisons between pointers simpler. For example, b800:1234, b803:1204 and b923:0004 would all be the same memory location in real mode and have the same 32-bit value of 0x000b9234 after conversion.

Example:

    PtrToInt ES:DI     ; convert pointer to integer value

See also IntToPtr and FlattenPtr.