Date: Sun, 16 Aug 1998 11:17:21 +0300 (IDT) From: Eli Zaretskii To: Endlisnis cc: djgpp AT delorie DOT com Subject: Re: displaying a bmp In-Reply-To: <35D30756.63EEF1F3@unb.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.