delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/02/20:22:16

From: Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>
Subject: Re: DOS memory allocation
To: iclone!mat AT sloth DOT swcp DOT com (Mat Hostetter)
Date: Fri, 2 Dec 1994 08:23:29 -0600 (CST)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> Perhaps _go32_dpmi_simulate_int() should abort if SP is not evenly
> divisible by four?  It's not clear that you ever want an SP *not*
> evenly divisible by four, and that would help catch some uninitialized
> SP bugs.  The overhead for this check is insignificant compared to
> everything else that happens.

Since this is DOS stack in the low memory area, division by 2 is wise
(not 4).  Note!  There are good reasons to provide your own
stack - if the call needs more than 30 words of stack space you must
provide your own stack (DPMI specification requirement).

- Raw text -


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