delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/19/03:34:43

Date: Thu, 19 Jun 1997 10:27:17 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: sar AT maties DOT sun DOT ac DOT za
cc: djgpp AT delorie DOT com
Subject: Re: NASM - How to access vid ram inside DJ
In-Reply-To: <33A5C490.101F@maties.sun.ac.za>
Message-ID: <Pine.SUN.3.91.970619102021.27193E-100000@is>
MIME-Version: 1.0

On Mon, 16 Jun 1997 sar AT maties DOT sun DOT ac DOT za wrote:

> Since memory
> protection is there to prevent different programs in the same physical
> memory of stepping on each other, and DJGPP always runs as the only
> program in its memory space, what is the problem?

This is a common misconception.  DOS is described as a single-tasked OS 
and people therefore think that it always runs only one program.  But 
that is not true.  First, DOS itself is always loaded resident in memory 
and you don't want to step on its code or data.  Second, there are TSRs 
and device drivers that are loaded and sometimes active (CWSDPMI, loaded 
by the DJGPP startup code, is one of them).  Third, your current active 
DJGPP program itself could have been spawned by another program (e.g., 
when you run it from RHIDE) and you don't want the child to kill its 
parent, right?

Nearptrs let your program write to any address in the 4GB address space, 
so a runaway program can clobber anything and everything.

- Raw text -


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