| delorie.com/archives/browse.cgi | search |
| From: | Alan Bork <borka AT execpc DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Mem size |
| Date: | Fri, 09 Oct 1998 16:45:14 -0500 |
| Organization: | Exec-PC BBS Internet - Milwaukee, WI |
| Lines: | 17 |
| Message-ID: | <6vm064$lmc@newsops.execpc.com> |
| References: | <361E54BC DOT 62DA AT golden DOT net> |
| NNTP-Posting-Host: | skaro-2-20.mdm.mke.execpc.com |
| Mime-Version: | 1.0 |
| X-Trace: | daily-bugle.newsops.execpc.com 907969540 22220 (None) 169.207.138.148 |
| X-Complaints-To: | abuse AT execpc DOT com |
| X-Mailer: | Mozilla 4.06 [en] (WinNT; U) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
> Hi. I'm a newbie to C. I'm learning with a book right now and it's > getting into pointers. In one program you find out the address of > various pointers. In the book it says that the memory location should > only be from 0-65,535 however when I try the program in DJGPP I get > memory addresses of 300000 and above. What's going on? 16 bit code versus 32 bit code. Your book is reference to the old-school DOS where pointers where 16 bit [2^16 -- 64KB] (and then some stuff about segments and so on). DJGPP produces 32 bit pointers [2^32 -- 4GB]. That is the short answer. Others can go on about memory models, protected mode, segment/offsets versus flat, and so on. Hope that helps, Alan
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |