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.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to