Converts a segment base and an offset address to a pointer-type value.
function Ptr(Seg, Ofs: Word): Pointer;
Windows, Real, Protected
A pointer that points to the address given by Seg and Ofs.
Seg and Ofs are expressions of type Word. The result is a pointer that points to the address given by Seg and Ofs. Like nil, the result of Ptr is assignment compatible with all pointer types.
The function result can be dereferenced and typecast:
if Byte(Ptr(Seg0040, $49)^) = 7 then
Writeln('Video mode = mono');