Date: Tue, 18 Feb 1997 12:14:39 +0200 (IST) From: Eli Zaretskii To: Andrew Crabtree cc: djgpp AT delorie DOT com Subject: Re: Realmode Callbacks In-Reply-To: <199702171942.AA004628557@typhoon.rose.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 17 Feb 1997, Andrew Crabtree wrote: > I'm having some difficulty installing a real mode callback to > a Packet Driver. Why do you need a real-mode callback at all? Is that a hardware interrupt (if so, you can install a protected-mode handler only) or a software interrupt? > If anybody has an example of installing a protocol over a > Packet Driver and just wants to post that that would be fine. You can llok at the port of WATTCP library to DJGPP. One port is cited in the DJGPP FAQ list; another is available as part of the Lynx sources ported by DJ Delorie: ftp://ftp.delorie.com/pub/dj/lynx26s.zip. > 1) From the FAQ I think I should be calling go32_alloc_realmode_retf > and then using __dpmi_int. The pktdrv call needs a ton of registers > passed and originally I was using int86x but this always crashed. Don't use int86x at all, always use __dpmi_int. > Are these the "proper" routines to use or should I always use > the dpmi calls or the go32 calls. Everything I'm writing will be in C. Then use _go32_XXX functions and lock the data and code of your program (the FAQ shows how). > 2) What is the best way to use 2 bytes of real mode memory. I know > that I can either dpmi_conventional_alloc or use the transfer > buffer. How does one write into the transfer buffer, I only saw > examples of how to pass it to real mode routines? Use one of the methods in section 18.4 of the FAQ. For 2 bytes, using `_farpokew' library function seems the most appropriate. The transfer buffer has _dos_ds as its selector and __tb as its linear address.