delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/26/10:47:58

From: Mark Slagell <bald_soprano AT geocities DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: setting segment register for string instructions
Date: Mon, 26 May 1997 04:53:28 -0500
Organization: dept. of redundancy dept.
Lines: 12
Message-ID: <33895D98.1322@geocities.com>
NNTP-Posting-Host: dial20.ppp.iastate.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I couldn't find an answer for this in the FAQ....

Using string instructions, I'm getting me some intermittent crashes. 
I'm guessing my problem is that I need to set %ds explicitly, but to
what?  The memory being addressed is an ordinary C array, so I'm not
trying to access conventional DOS memory or anything like that.

I've noticed the compiler never seems to generate string instructions. 
Maybe the speed difference between "movw (%ebx),%ax; addl $2,%ebx" and
"lodsw" is insignificant anyway, but I'd still like to figure this out.

  -- Mark

- Raw text -


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