www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/08/18:15:20

Date: Sat, 8 Jan 94 17:14:55 EST
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: VCPI problem resolved
Reply-To: babcock AT cfa DOT harvard DOT edu

A few days ago, I posted regarding a program which worked under DPMI, but
failed under VCPI.  I found my problem, and though I'd post it since it is
an easy mistake to make.  The guilty code was:

      go32_regs.x.ax = 0x1680;            /* give up time slice */
      _go32_dpmi_simulate_int(0x2f, &go32_regs);

What's wrong?  SS and SP registers are not initialized (the docs say to put
in zeroes if you don't want to provide your own stack space), so some random
bit of memory got used as stack space.  OS/2 worked because I use different
code for releasing time slices there.  I'm not sure why Windows worked;
perhaps I wasn't stomping on anything critical.

- Raw text -


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