Mail Archives: djgpp/1998/08/16/04:18:47
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 -