delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/03:49:06

Date: Wed, 5 Mar 1997 10:31:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: nikki <nikki AT gameboutique DOT co>
cc: djgpp AT delorie DOT com
Subject: Re: weird dosmemput problem
In-Reply-To: <5fhoc1$qj1@flex.uunet.pipex.com>
Message-ID: <Pine.SUN.3.91.970305102656.14799B-100000@is>
MIME-Version: 1.0

On 4 Mar 1997, nikki wrote:

>                 if (callback_regs.x.cx>16384L) {
>                         callback_regs.x.es=0;
>                         callback_regs.x.di=0;   // frame is >16k! too long so discard

Why are you limiting the size of the buffer to 16K?  You can allocate 
much more than that and not limit it at all.

>         while (retries--) {
>                 regs.x.ax=0x400;
>                 regs.x.ds=pktout.rm_segment;
>                 regs.x.es=pktout.rm_segment;    // buggy drivers need es:
>                 regs.x.si=0;
>                 regs.x.cx=length;
>                 _go32_dpmi_simulate_int(pktdrv.irq,&regs);

The above is most likely the culprit: you don't zero out regs.x.ss, 
regs.x.sp and regs.x.flags before calling `_go32_dpmi_simulate_int'.  The 
best way is just to call `__dpmi_int' instead, though.

>         dosmemput(arpbuf,60,pktout.rm_segment*16);
> 	// !!! THE ABOVE LINE CAUSES THE PROBLEM !!!
>         send_pkt(60);

I think `send_pkt' is causing the trouble, because of regs.x.ss etc.

>         r.x.cx=typelen;

This doesn't seem to be defined anywhere.  A typo?

- Raw text -


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