www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/26/11:26:08

Date: Mon, 26 May 1997 18:25:20 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mark Slagell <bald_soprano AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: setting segment register for string instructions
In-Reply-To: <33895D98.1322@geocities.com>
Message-ID: <Pine.SUN.3.91.970526182235.9325D-100000@is>
MIME-Version: 1.0

On Mon, 26 May 1997, Mark Slagell wrote:

> 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.

AFAIK, in a DJGPP program DS is already set to the data segment, so you 
shouldn't need to change it.  Unless, of course, you are in an interrupt 
handler.  Are you?

> I've noticed the compiler never seems to generate string instructions. 

AFAIK, it should generate string instructions if you e.g. use `memcpy' 
library function and compile with -O3.  But I didn't test this lately.

- Raw text -


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