www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/03/11:53:53

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9906031553.AA16649@clio.rice.edu>
Subject: Re: __dpmi_simulate_real_mode_procedure_retf_stack
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Thu, 3 Jun 1999 10:53:26 -0600 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.990603094045.7269I-100000@is> from "Eli Zaretskii" at Jun 3, 99 09:46:25 am
X-Mailer: ELM [version 2.4 PL20]
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> The problem is that the code does copy the values to the PM stack as 
> bytes (it uses "REP MOVSB"), but then it sticks the same number of bytes 
> into ECX, where the DPMI function expects the number of words.  This will 
> cause some of the RM stack to use twice as large space, and to have garbage 
> in some of it.

Okay, I misunderstood - so it needs to be a rep movsw instead.  It seems
obvious that noone is using this function at this point...

> So to fix this, we need to right-shift the argument before putting it in 
> ECX.  Then the docs could be left alone.  Alternatively, we could change 
> the docs to say "words" and change the code to use MOVSW instead of MOVSB 
> when copying to the PM stack.

I would prefer the later, so the wrapper function is similar to the DPMI spec.

- Raw text -


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