From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in __dpmi_simulate_real_mode_procedure_retf_stack Date: Thu, 20 Jan 2000 09:28:00 +0200 Organization: NetVision Israel Lines: 25 Message-ID: References: <13001ab4 DOT 241463ff AT usw-ex0101-008 DOT remarq DOT com> NNTP-Posting-Host: is.elta.co.il Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: news.netvision.net.il 948353474 24858 199.203.121.2 (20 Jan 2000 07:31:14 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 20 Jan 2000 07:31:14 GMT X-Sender: eliz AT is In-Reply-To: <13001ab4.241463ff@usw-ex0101-008.remarq.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 19 Jan 2000, Nigel Pattinson wrote: > /* Set up %esi, %edi to copy data to the PM stack. */ > subl %ecx, %esp > movl %esp, %edi > movl ARG3, %esi > > /* Copy the data. */ > cld > rep > movsw > > Since the size of the parameters (in ecx) is in 16-bit words, it looks > to me like the line > > subl %ecx, %esp > > only reserves half the required amount of stack space. But the copy of the data to the stack (see above) *also* uses words: it copies with "rep movsw". So it moves ECX words to the stack, and that's exactly the amount of storage reserved there by subl. So where exactly is the problem here?