Mail Archives: djgpp/1997/01/28/05:19:15
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.
- Raw text -