delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/16/04:18:47

Date: Sun, 16 Aug 1998 11:17:21 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: displaying a bmp
In-Reply-To: <35D30756.63EEF1F3@unb.ca>
Message-ID: <Pine.SUN.3.91.980816111537.6981S-100000@is>
MIME-Version: 1.0

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.

- Raw text -


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