delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/13/11:16:08

Date: Thu, 13 Sep 2001 17:14:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: dima 3141596 <dima AT rts-ukraine DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: addressing question
In-Reply-To: <9nqhdg$2gnu$1@pandora.alkar.net>
Message-ID: <Pine.SUN.3.91.1010913171139.3657H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 13 Sep 2001, dima 3141596 wrote:

> >The various ways of accessing the video memory from a DJGPP program are
> >described and explained in the DJGPP FAQ, sections 10.2 and 18.4.
> 
> tnx for your answer, but I must write own library to direct access to
> the video memory.

So?  The advice in the FAQ can be used in your own library, can't it?

> >> In the Turbo C I can do  it :     char far* scr = MK_FP(segment,
> >> offset);
> >>  then any instruction like it:       *scr = '1';  will generate asm
> code
> >>            mov ax,segment
> >>            mov es,ax
> >>            mov  es:[offset] , '1'   ------> here ES !!!
> >
> >This won't work in protected mode, even in Turbo C.
> 
>  Are you sure ??? :)

Yes, I'm sure.  The MK_FP part won't work in protected mode, unless you 
use some DOS extender which transparently maps real-mode segments such 
as 0xa000 into protected-mode selectors.  DJGPP doesn't do that, so you 
must employ the techniques outlined in the FAQ.

- Raw text -


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