Message-ID: <35D70926.E44143CE@unb.ca> Date: Sun, 16 Aug 1998 13:30:31 -0300 From: Endlisnis MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: displaying a bmp References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk 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