Xref: news2.mv.net comp.os.msdos.djgpp:605 From: pausch AT electra DOT saaf DOT se (Paul Schlyter) Newsgroups: comp.os.msdos.djgpp Subject: Re: aligment / based pointers Date: 27 Jan 1996 22:55:30 +0100 Organization: Svensk Amat|rAstronomisk F|rening Lines: 28 Message-ID: <4ee70i$ite@electra.saaf.se> References: <960118222321_100662 DOT 3563_EHV63-1 AT CompuServe DOT COM> <4e74he$976 AT news DOT manawatu DOT gen DOT nz> NNTP-Posting-Host: electra.saaf.se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <4e74he$976 AT news DOT manawatu DOT gen DOT nz>, Malcolm Taylor wrote: >>2. Does DJGPP-C understand based pointers ? > > What is a based pointer? It's Microsoft's way of declaring a C near pointer so that it uses some other segment register than DS. Usually SS is used instead. This really only applies to segmented 16-bit code. Since DJGPP uses a 32-bit "flat" memory model, where all segment registers are equal (with the possible exception of CS): all pointers are "near" and "far" pointers does not exist. They're not needed since 32-bit addresses can cover all of addressable memory. Thus, the concept of a "based pointer" is meaningless in DJGPP as well as in any other environment using the "flat" memory model. (in principle 32-bit code could be segmented too, but no environment in use today uses 32-bit segmented code. The "flat" memory model seems to have been universally accepted for 32-bit code on the x86). -- ---------------------------------------------------------------- Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF) Grev Turegatan 40, S-114 38 Stockholm, SWEDEN e-mail: pausch AT saaf DOT se psr AT home DOT ausys DOT se