www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/28/21:18:15

From: Eric Jacobs <no AT no DOT no>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NEAR POINTERS
Date: Fri, 27 Jun 1997 19:38:55 +0000
Organization: Erol's Internet Services
Lines: 26
Message-ID: <33B416CF.4C8B@no.no>
References: <199706261619 DOT AA233631987 AT typhoon DOT rose DOT hp DOT com>
NNTP-Posting-Host: dam-as3s18.erols.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Andrew Crabtree wrote:
> 
> >
> > Ok, quick question...I use __djgpp_nearpt_enable() so i  can write directly
> > to video memory (it is so much faster than using memput or the poke
> > functions). Anyway, i was wondering, what exactly this function does.
> It sets the limit of your DS selector to -1 (0xFFFFFFFF).
> 
> >  Does
> > it disable protected mode completely.
> It effectively does, since your limit is now 4 GB, and memory will wrap.
> This means that through DS you have access to the entire memory on the
> system.


It's misleading to say that __djgpp_nearptr_enable() turns protected mode
off, because the processor still deals with interrupts etc as normal for
protected mode. It's more correct to say that it disables memory
protection (for your DS at least), because now you can synthesize near
pointers for any location in memory.

In the low-level/interrupt section of the FAQ there's some nice source
code for keyboard handlers and other interrupts in protected mode
(i think this question was asked in this thread, was it?)

-ej

- Raw text -


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