delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/28/05:19:15

Date: Tue, 28 Jan 1997 12:10:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Gregary J Boyles <boylesgj AT lion DOT cs DOT latrobe DOT edu DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: Real mode ISR's
In-Reply-To: <5cidlf$d9m@lion.cs.latrobe.edu.au>
Message-ID: <Pine.SUN.3.91.970128120122.10987K-100000@is>
MIME-Version: 1.0

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 -


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