Language:
Русский
English
Ptr (function)
Converts a segment base and an offset address to a pointer-type value.
Declaration
function Ptr(Seg, Ofs: Word): Pointer;
Target
Windows, Real, Protected
Return Value
A pointer that points to the address given by Seg and Ofs.
Remarks
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');