delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/13/12:51:08

Date: Thu, 13 Jan 2000 22:49:17 +0500 (MVT)
From: Prashant TR <prashant_tr AT yahoo DOT com>
To: Martin Stromberg <eplmst AT lu DOT erisoft DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: Problems with protected_mode_int
In-Reply-To: <85junr$31i$1@antares.lu.erisoft.se>
Message-ID: <Pine.LNX.4.10.10001132243370.521-100000@yahoo.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 13 Jan 2000, Martin Stromberg wrote:

> : > Yes, you can (at least theoretically).
> 
> : Could you explain this in more detail?
> 
> Something like this:
> 
> asm("
> my_handler:
> ...
> 
> my_handler_end:
> ");
> 
> int main()
> {
>   unsigned char code[1000];
> 
>   memcpy(code, &my_handler, my_handler_end - my_handler);
> 
>   lock(code, my_handler_end - my_handler);
>   installhandler(code);
> 
> }

Correct. But if the "unsigned char code[1000]" was in some other
subroutine. Your program would die
 
Otherwise, agreed. But your program will still have to use _my_cs().
That's what I meant.

- Raw text -


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