delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/29/21:15:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
NNTP-Posting-Date: Mon, 29 Jul 2013 19:52:25 -0500
From: "Charles Sandmann" <cwsdpmi AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
References: <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com>
Subject: Re: _CRT0_FLAG_NULLOK
Date: Mon, 29 Jul 2013 19:52:06 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
Message-ID: <oNOdnSyZ28PUk2rMnZ2dnUVZ_qCdnZ2d@earthlink.com>
Lines: 20
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 64.91.136.221
X-Trace: sv3-lHeBHk26WaoSLyMTFixV9lT2ro3PAIlzRcfLD18thd2ybhQOn6LmpXN6KViCaQWUCogJEJft49zV0bE!iWa3BK69PieNnsMu13TL7iLnl18Yd1qfS+dY56XcgWXOz7xeejYal9CbpaK5o7xDNRGd7VlMwF3r!c2O9/9LODEkzkJPAIn5QmEQgY5p5RK0V
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Bytes: 1981
X-Original-Bytes: 1920
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Georg Potthast" <dosusb AT googlemail DOT com> wrote in message 
news:21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com...
>I got my program to work fine in real mode DOS now when I set this flag:
>
> int _crt0_startup_flags = _CRT0_FLAG_NULLOK | _CRT0_FLAG_FILL_SBRK_MEMORY;

_CRT0_FLAG_NULLOK  indicates you can read or write to the first 4KB of 
memory, which is
always an invalid pointer under DJGPP.  Windows does not support making this 
page invalid,
so this is a ugly workaround to make buggy programs work under DOS.
/* If set, disable NULL pointer protection (if it can be controlled at all). 
*/
#define _CRT0_FLAG_NULLOK                       0x0100

Programs requiring this setting would not run under Linux, Unix, VMS or any 
protected environment,
because they are fundamentally broken. 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019