Mail Archives: djgpp/1998/08/16/13:06:38
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 -