Mail Archives: djgpp/1999/09/27/09:33:47
On Sun, 26 Sep 1999, Prashant TR wrote:
> int _ctr0_startup_flags = _CRT0_FLAG_NEARPTR;
This is wrong: you are eliminating all the other bits in
_crt0_startup_flags. (Also, the above line has a typo.) Please use
the code example in the FAQ as your starting point.
> printf("%s\n", (__djgpp_nearptr_enable()) ? "Enabled"
> : "Disabled");
What does this print when you run the program?
> x = (char *)(__djgpp_conventional_base);
> f = x[0x1000000]; // Both these don't seem to work.
What does ``don't seem to work'' mean?
In this snippet, f should get the value of the byte at the linear
address 16MB. But that linear address might not be mapped to any
physical address. If you want to get to the 16MB physical address,
you need to use the technique of section 18.7 of the FAQ to map the
range of physical addresses you want to access into your logical
address space.
> _farpeekl(_dos_ds, 0x1000000); // Accessing 16MB
This won't work: __djgpp_nearptr_enable only enlarges the limit of the
DS selector. The _dos_ds selector is not changed.
- Raw text -