delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/07/10:53:33

From: Jan-Jaap Severs <janjaaps AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Inline asm translations?
Date: Mon, 07 Feb 2000 14:29:00 +0100
Organization: Ye 'Ol Disorganized NNTPCache groupie
Lines: 38
Message-ID: <389ED6AC.76B16F3F@yahoo.com>
NNTP-Posting-Host: newsreader1.cybercomm.nl
Mime-Version: 1.0
X-Trace: poffertje.cybercomm.nl 949933895 1972 213.196.1.11 (7 Feb 2000 14:31:35 GMT)
X-Complaints-To: usenet AT newsreader DOT cybercomm DOT nl
NNTP-Posting-Date: 7 Feb 2000 14:31:35 GMT
X-Mailer: Mozilla 4.51 [nl]C-CCK-MCD {World Online} (Win98; I)
X-Accept-Language: nl
Cache-Post-Path: localhost.localdomain!unknown AT 226 DOT 16 DOT dialup DOT cybercomm DOT nl
X-Cache: nntpcache 2.4.0b2 (see http://www.nntpcache.org/)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi people. Seems my previous msg was lost somewhere before it reached
the newsgroup. Anyway, could someone please try and translate these two
pieces of inline Intel asm code to AT&T inline asm code? I could really
use those translations in trying to understand AT&T syntax. Thanx in
advance.

Here are those pieces:

void FillDoubleBuffer( int color )
{
        asm {
          mov cx, double_buffer_size
          mov al, BYTE PTR color
          mov ah, al
          les di, double_buffer
          rep stosw
        }
}

And another one:

asm {
les di, dest_addr
mov al, BYTE PTR color
mov ah, al
mov cx, xe
sub cx, xs
inc cx
shr cx, 1
rep stosw
}

You might recognize them from an Andre LaMothe book...

Anyway, thanks for helping me out,

Jan-Jaap

- Raw text -


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