delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/30/12:01:56

Date: Sun, 30 Aug 1998 17:48:11 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michel Gallant <mgallant AT NOSPAM DOT grassroots DOT ns DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: HELP!... execute CODE in DATA segment seems not work
In-Reply-To: <640G1.53$R44.703526@sapphire.mtt.net>
Message-ID: <Pine.SUN.3.91.980830174802.20257l-100000@is>
MIME-Version: 1.0

On Sat, 29 Aug 1998, Michel Gallant wrote:

> As far as I know, in protected mode, code in a data segment simply
> will not excecute.  That's one of the was protected mode protects
> programs and data- by not allowing confusion between segments.

That's exactly the reason why DJGPP sets both CS and DS to have the
same base address and the same limit.  This way, you can define an
array with byte codes and then reference it via CS as executable
code.

- Raw text -


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