Novice MicroSoft C5.1 question
Richard Hancock
richardh at hpopd.HP.COM
Fri Jul 27 00:24:43 AEST 1990
Far pointers (ie. segment:offset) are 32-bit quantities in Microsoft-C. Your printf format strings assume that they are represented in 16-bits (ie. %u).
The latter example doesn't work because the segment part of y is being treated as the value for the second %u, ie. y is actually 7647:11094 and &x is 7647:11090.
Whether or not pointers are considered to be far by default depends on the memory model you're compiling under.
Richard.
More information about the Comp.lang.c
mailing list