Convert a 32-bit integer value to a real mode segment and offset pointer.
Only integer values from 0x00000
to 0xfffff
can be converted with this macro. Larger integer
values will return unchanged with the carry flag set. I did not think supporting integer
values up to 0x10ffef
was worth the extra code required to support them.
A converted integer will result in a pointer with the smallest offset required. The
offset will be in the range of 0x0000
and 0x000f
. The segment
portion of the value will be anything from 0x0000
and 0xffff
.
Example:
IntToPtr ES:DI ; convert an integer value to a pointer
See also PtrToInt and FlattenPtr.