Message-Id: <199701222148.WAA00572@math.amu.edu.pl> Comments: Authenticated sender is From: "Mark Habersack" Organization: What? (Poznan, Poland) To: Gene Buckle Date: Wed, 22 Jan 1997 23:06:51 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Passing a parameter to interrupt handler. Reply-to: grendel AT ananke DOT amu DOT edu DOT pl CC: djgpp AT delorie DOT com Once upon a time (on 21 Jan 97 at 16:22) Gene Buckle said: > > > Of all the great examples I've found for writing IRQ handlers, I've not > > > seen one that documents how to pass a parameter (specifically a pointer > > > to a structure) to the installed routine. > > The only way I can see is through shared (and locked!) memory. > > The whole program is locked in memory via the CRT0 flags. My problem is > that the program calling the interrupt (0xef in this case) won't be the same > one that has the code for the actual ISR in it. ;) Hmm... that changes things a bit. *If* your proggy will work under DPMI 1.0 server and *if* the other program is guaranteed to use DPMI services, then shared memory is not a dream - you have it for free. If these conditions are not satisfied, you can provide a callback (say hanging on int2fh) that will pass the RM/PM address (as specified in registers on entry to the int2Fh handler) of the shared memory block you've allocated *from DOS* using DPMI services. Note that this memory has to come from DOS since it is not guaranteed that your "server's" memory will map 1:1 to DOS memory, and thus whether it will be accessible for other DOS apps or not. You pass the calling app a far pointer to the memory block (again RM/PM) and that's it! > > _http://ananke.amu.edu.pl/~grendel_________________________ > > We buy fresh bagels from the corner store where swastikas > > are spat from areosols. I sit in the bar sipping iced white > > russians, trying to score but nobody's pushing. And everyone > > looks at everyone's faces, searching for signs and praying > > for traces of a conscience in residence, are we sitting on > > a barbed wire fence chasing the clouds home? > > > > You've got a collection of the oddest .sig quotes.... ;) Thanks, I do my best! ;-) I'm constantly extending the set - they're going to be even more odd, I promise! ;-) _http://ananke.amu.edu.pl/~grendel_________________________ We buy fresh bagels from the corner store where swastikas are spat from areosols. I sit in the bar sipping iced white russians, trying to score but nobody's pushing. And everyone looks at everyone's faces, searching for signs and praying for traces of a conscience in residence, are we sitting on a barbed wire fence chasing the clouds home?