www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/07/07:40:16

Date: Thu, 7 Mar 1996 12:31:24 +0000 (GMT)
From: Andy Molyneux <molyneua AT cs DOT man DOT ac DOT uk>
To: battle DOT axe AT pegasuz DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: ASM code & Random
In-Reply-To: <TCPSMTP.16.3.6.-15.44.16.2983759767.73238@PEGASUZ.COM>
Message-Id: <Pine.SUN.3.91.960307123009.470C-100000@n9c>
Mime-Version: 1.0

On Wed, 6 Mar 1996 battle DOT axe AT pegasuz DOT com wrote:

> A9>This is the code:
> 
> asm("
>   pusha
>   movl $0xa0000,%edi
>   movl _virt,%esi       # virt declared somewhere
>   movl $32000,%ecx
>   movw _dos_seg,%es
>   cld
>   rep movsw
>   popa
> ")

That's not quite right; it should be "rep ; movsw" or "rep" followed 
by "movsw" on the next line, because GAS treats "rep" as a separate 
instruction.

- Andy

| Andrew Molyneux            Internet: molyneua AT cs DOT man DOT ac DOT uk
| University of Manchester   Tel     : (+44)161-485-3291
| REAL programmers write  a=b!=4?b%2?c:d:e  without even
| thinking about it :-)

- Raw text -


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