cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/16/04:20:46

Date: Sun, 16 Aug 1998 11:20:30 +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: <35D5BC70.41E201F@unb.ca>
Message-ID: <Pine.SUN.3.91.980816111836.6981T-100000@is>
MIME-Version: 1.0

On Sat, 15 Aug 1998, Endlisnis wrote:

> > > 1]    Your set_mode function should have a line like:
> > >       memset(&r, 0, sizeof(r));
> > >       or you might get unexpected (and undesired) results occationally.
> > Why? what does this do?
> 
>     It is covered in section #18.3 of the FAQ.  The interrupt uses a stack provided
> by the caller, if you just let 'ss', and 'sp' be random (uninitialized) values, the
> you may crash your program.  If they are zero'ed then __dpmi_int will make a stack
> for you.

The same section 18.3 also explains that __dpmi_int zeroes SS and SP 
itself, so there's no need for the application to do that.  It is only 
required when the _go32_dpmi_simulate_int function is called.

- Raw text -


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