delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/07/19:28:22

Message-ID: <3259AACB.6E28@gbrmpa.gov.au>
Date: Tue, 08 Oct 1996 09:13:48 +0800
From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Reply-To: leathm AT gbrmpa DOT gov DOT au
Organization: Great Barrier Reef Marine Park Authority
MIME-Version: 1.0
To: Daniel Jungbluth <danju AT t-online DOT de>
CC: djgpp AT delorie DOT com
Subject: Re: asm(" ..?.. ");
References: <01BBB46D DOT BFAC5DC0 AT slip00-156 DOT btx DOT dtag DOT de>

> rep movsd ds:[esi],es:[edi]
 
> I have tried to convert it into 'rep movsl %es:%edi,%ds:%esi', but this does not work.

The problem is your format is completely wrong. 

The 'rep movsd' instructions automatically use the es:edi pair as the
destination, and the ds:esi pair as the source. 

What you need to do is move the segment and offset values into the
registers first, and then execute the rep movsl instructions.

This is some pseudo code to show you what I mean:

	mov		source_segment, %ds
	mov		source_offset, %esi
	mov		dest_segment, %es
	mov		dest_offset, %edi
	mov		count, %ecx			
	rep
	movsl

Note the rep and the movsl are on seperate lines.

Leathal.

- Raw text -


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