delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/13/06:04:50

Date: Thu, 13 Sep 2001 11:23:17 +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: <9nppvi$2c8g$1@pandora.alkar.net>
Message-ID: <Pine.SUN.3.91.1010913112105.354C-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:

> I have 2 pointers:
>  char *seg1, *seg2;
> 
> How can I make that  any operation like on *seg1='1'; was addressed by
> ES register and
>  *seg2='2'; by DS ?

You can't, not with DJGPP: ES and DS are segment registers, and in 
protected mode they can only be loaded with valid segment selectors, not 
with any arbitrary number.  If you load a value that is not a valid 
selector, your program will get a GPF and crash.

Why do you need to do that, anyway?

- Raw text -


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