delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/07/06:21:38

Date: Mon, 7 Jun 1999 13:19:03 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Michael Stewart <mike AT reggin DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: accessing the graphical video memory
In-Reply-To: <7jftm5$gil$1@taliesin.netcom.net.uk>
Message-ID: <Pine.SUN.3.91.990607131549.2943F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 7 Jun 1999, Michael Stewart wrote:

> I can't see any errors but there is a shorter way of doing it. _dos_ds is
> already predefined as the selector, eg.

_dos_ds provides much less protection, since it spans the entire low 1MB 
(plus 64KB in the HMA).  In contrast, the code posted here creates a 
selector which only includes the video memory, so if you accidentally 
overstep the limits, your program will crash, but the system will be 
protected.  As far as I understand, writing safe code was the whole point 
of using this method in the first place.

- Raw text -


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