www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/01/19:01:00

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP!... execute CODE in DATA segment seems not work
Date: Tue, 01 Sep 1998 18:22:43 -0300
Organization: NBTel Internet
Lines: 19
Message-ID: <35EC65A3.78892F9C@unb.ca>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980831120305 DOT 22974I-100000 AT is>
NNTP-Posting-Host: fctnts13c33.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:
> When you press Ctrl-C (which is supposed to generate the SIGINT
> signal), that keypress is caught by the keyboard handler installed by
> the DJGPP startup code.  The handler processes Ctrl-C by making the DS
> limit be 4K.  Since all data in your program lives above the first 4K
> (that's how things are set up at startup), the first time your program
> touches any of its data, a CPU exception is generated, because
> protected mode doesn't allow accesses to data beyond the DS limit.
> This exception is caught by the DJGPP exception handler, which sees
> that the exception was generated on behalf of a Ctrl-C, restores the
> DS limit to its normal value, then calls "raise(SIGINT);".
	That was a neat idea.
-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca


m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca


- Raw text -


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