Date: Tue, 28 Jan 1997 12:10:38 +0200 (IST) From: Eli Zaretskii To: Gregary J Boyles cc: djgpp AT delorie DOT com Subject: Re: Real mode ISR's In-Reply-To: <5cidlf$d9m@lion.cs.latrobe.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 27 Jan 1997, Gregary J Boyles wrote: > Do I need the go32 wrappers when writing a real mode isr? Since you aren't familiar with assembly, and real-mode ISR can be only written in assembly, maybe you should avoid it altogether? Are you sure you need a real-mode handler? Hardware interrupts are reflected to protected mode by the DPMI host, so you can just install a protected-mode handler. Why do you need a real-mode one? > If not do I need to add the entry and exit code for the isr as well as > my specific code? Yes. > How do you place code in a memory block(allocated with > __dpmi_allocate_dos_memory(...)) with dosmemput(...). There is an example of such usage in the libc docs, under the related function `_go32_dpmi_allocate_dos_memory'. > Do you do so by writing the function and then setting up a pointer to it > and passing the pointer to dosmemput(...)? The pointer is not the problem; the size is: how do you get the size of a function code from C? > If so how do you know how much memory to allocate with > __dpmi_allocate_dos_memory(...)? sizeof ISRFunction(...)? In general, you can't. That's one reason that you have to write it in assembly. Another reason is that the real-mode handler must only use real-mode code, while GCC generates protected-mode code.