delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/13/07:34:13

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problems with protected_mode_int
Date: 13 Jan 2000 07:26:51 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 35
Message-ID: <85junr$31i$1@antares.lu.erisoft.se>
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10001130720580 DOT 561-100000 AT yahoo DOT com>
NNTP-Posting-Host: spica-144.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Prashant TR (prashant_tr AT yahoo DOT com) wrote:
: On 12 Jan 2000, Martin Stromberg wrote:

: > : You can't run an interrupt handler in a stack. Use _my_cs(). Although
: > : both SS, DS and CS have the same base, they have different access rights.
: > 

: > 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);

}


Shostakovich, String Quartet 14,

							MartinS

- Raw text -


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