[fpc-devel] i8086 huge pointers

Max Nazhalov stein_nospam at mail.ru
Mon Apr 7 02:51:34 CEST 2014

Sunday, April 6, 2014, Nikolay Nikolov wrote:

NN> Back in the old days, I never used huge pointers, because I wrote in Turbo Pascal,
NN> which didn't have them, so I don't have an opinion which way is better.
NN> So, which way should FPC for i8086 follow?

BP7 does not normalize pointers, since it targets DPMI16, where such normalization is senseless.
Moreover, it uses special typed const "system.SelectorInc" to handle offset overflows.
Under real mode, SelectorInc is barely $1000.
Under DPMI16 environment SelectorInc can be obtained by DPMI function INT31h/AX=0003h (usually, it returns 8).
With this approach the whole pointer arithmetics is similar between real and protected modes.

WBR, Max.

More information about the fpc-devel mailing list