Date: Wed, 7 Oct 1998 12:12:54 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: Linear address 0 makes my day ;) In-Reply-To: <19981007065343.24344.qmail@hotmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Tue, 6 Oct 1998, Jari Tuominen wrote: > I have been wondering about CWSDPMI memory management, > why it won't allow using of Linear Address 0? Because accessing a null pointer is a very common programmatic error. ANSI C assures that no real address is zero, so any program that uses such addresses has a bug. > Windows DPMI allows it ! Somebody already pointed out that Windows itself has so many bugs that it probably won't be able to run without letting null pointers live and thrive. > Is there any ways to solve this annoying bug? This is not a bug, it's a feature, and a great help to locating bugs in your programs. Why would you need to remove it? Do you like your code to use uninitialized pointers that peek up garbled values? If you really need that, you could remove the part of the startup code which calls the DPMI function to protect the null page. It's in crt0.s inside djlsr201.zip.