delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/16/13:06:38

Message-ID: <35D70926.E44143CE@unb.ca>
Date: Sun, 16 Aug 1998 13:30:31 -0300
From: Endlisnis <s257m AT unb DOT ca>
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com
Subject: Re: displaying a bmp
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980816111537 DOT 6981S-100000 AT is>

Eli Zaretskii wrote:

> On Thu, 13 Aug 1998, Endlisnis wrote:
>
> > Bjorn Hansen wrote:
> >
> > > void set_mode(int mode)
> > >      {
> > >      __dpmi_regs r;
> > >      r.x.ax = mode;
> > >      __dpmi_int(0x10, &r);
> > >      };
> > >
> > 1]    Your set_mode function should have a line like:
> >       memset(&r, 0, sizeof(r));
> >       or you might get unexpected (and undesired) results occationally.
>
> This is incorrect.  __dpmi_int itself zeroes out the members of
> __dpmi_regs structure which need that, so the application doesn't have
> to.

     I stand corrected.  I mis-understood the section of the FAQ that covered
this.  I re-read it and now it makes sence.
--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




- Raw text -


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