www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/16/16:50:59

Date: Sun, 17 Nov 1996 10:28:52 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Memory Protection
To: Glen Miner <gminer AT ca DOT newbridge DOT com>
Cc: djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <328EE8E4.6E0C@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <Pine DOT SUN DOT 3 DOT 90 DOT 961116092939 DOT 24811A-100000 AT coop10>

Glen Miner wrote:
> 
> Hmm, how would this be better than the dosmemput/get functions? (Sorry,
> I'm a new to pmode and this whole selector buisness is confusing)


dosmemput/get uses the dos selector which is set to have a 4gb limit and
a base of 0,
thus no protection and all refrences have to add in the base of the
screen 
(ie 0xa0000+x+y*320 for mode 13h).

Using a specialized selector provides protection because it's limit is
64k (the size 
of the screen segment) and because the base is set to 0xa0000, you don't
need to add
an offset to your calculated address (ie x+y*320) which saves 2 clocks
on a 386 (my
computer).

Bill
-- 
Leave others their otherness.

- Raw text -


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