DosFreak wrote:
in delphi you can use Ptr to an absolute address, can i do this in vc++.
The Delphi Ptr function converts an integer to a pointer. In C/C++, all
you need is a cast:
void* p = reinterpret_cast<void*>(0xFFFF5);
As others have said, this only works in DOS. You'll get an access
violation if you try to execute this in Win32.
Also, you should never use an integer to store a pointer, because that's
not going to work on x64, where int is 32-bit and void* is 64-bit. A lot
of Delphi code uses integers for HDC and HANDLE variables. There will be
major portability issues with those programs.
And finally, if you plan to distribute your product, you shouldn't steal
the font from the BIOS. There are plenty of monospace fonts out there,
and some of them were designed to look like a DOS terminal.
Tom