Date: Mon, 14 Jul 1997 14:19:18 +0000 From: Bill Currie Subject: Re: Q: interrupts and segment changes. To: Shawn Hargreaves Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <33CA3566.47C1@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <33C8A01A DOT E8E AT mcs DOT nl> <6ZxdyDA4qMyzEwjH AT talula DOT demon DOT co DOT uk> Precedence: bulk Shawn Hargreaves wrote: > Maybe, but remember that many djgpp programs are run under environments > like Win95 that are not 'decent' memory managers :-) And depending what > you do in your handler, it's unlikely that all the code and memory it > can ever access will be touched every time it is called. Given the > consequences of reentrant calls to the DOS disk I/O functions (in the > worst case, a clobbered filesystem), it just isn't worth taking the > risk. And it's not difficult to do, especially using (Alaric William's idea) the __attribute__((section)) trick. Unfortunately, this requires a patched gcc (next version (2.8?) will have the patch) and a fixed gas from binutils 2.8.1 (I can supply the patched gas.exe and Alaric has the patched gcc on his web page). And another reason for locking your interrupt memory: cwsdpmi won't allow the program to run if it doesn't lock the memory (cwsdpmi detects accesses to unlocked memory in interrupt handlers and aborts the program). Bill -- Leave others their otherness.