www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/04/21:19:00

Date: Tue, 4 Nov 1997 18:18:17 -0800 (PST)
Message-Id: <199711050218.SAA14979@adit.ap.net>
Mime-Version: 1.0
To: Andreas Burman <abu1016 AT ba DOT ssdn DOT skelleftea DOT se>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Asm Convert

At 05:02  11/3/1997 -0800, Andreas Burman wrote:
>I'm converting my 3d-engine from 16 to 32 bits, it's going quite well
>but I have some problems whit djgpps assambler syntax. How do I convert
>the following Tasm code to djgpp?
>
> les di,dest
This appears to be a load of a conventional far pointer, which is
meaningless under DJGPP. You will probably have to think about what it
really wants to do, then ask here.
> mov al,BYTE PTR color
movb color,%al
> mov ah,al
movb %al,%ah
> mov cx,end
movw end,%cx
> sub cx,start
subw start,%cx
> inc cx
incw %cx
> shr cx,1
shrw 1,%cx
> rep stosw
rep
stosw

But consider using stosl instead, it stores 32-bit values and thus takes
half as long. You'll have to change your shift and the value that gets stored.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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