[comp.lang.c] 8086 pointers - summary

djm@castle.ed.ac.uk (D Murphy) (09/11/89)

In reply to my query a while ago about what a pointer on an 8086 machine
actually gets compiled to, the answer is that in the models which keep
all the data in one segment (tiny, small and medium) it is a 16 bit value
which is used in DX etc as an offset to DS which (presumably) is set by the
compiler. In the larger models, it is a 32 bit value, the most significant
2 bytes of which are used in DS. Overrides to the 16 bit pointers can be
made by declaring:

char far *foo;

I'm sorry if I offended any purists by talking about a 20 bit pointer - I
do know better but this is Intel's fault :-)

Many thanks to those who replied.

Murff.....