*BSD News Article 12245


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!miller.cs.uwm.edu!knier
From: knier@miller.cs.uwm.edu (Robert Knier )
Newsgroups: comp.os.386bsd.questions
Subject: Problem with stosb asm inst
Date: 3 Mar 1993 12:38:38 GMT
Organization: University of Wisconsin, Milwaukee
Lines: 27
Message-ID: <1n28seINNf78@uwm.edu>
NNTP-Posting-Host: 129.89.9.13

	I have been having some wrong results when optimizing
some assembly code for a Future Domain SCSI card.  More specifically,
I took the following code:

	cld
	movb (%esi), %al
	movb %al, (%edi)
	incl %edi

and replaced it with the following:

	movb (%esi), %al
	stosb

The resulting code when compiled does not work.  This paricular code
is repeated n times when data is read from an i/o port.
	The machine I am running on is a 386 20Mhz Northgate system
with 2 65mb RLL drives and a 340mb SCSI drive.  The contoller is a 
Future Domain 885 compatible.  This particular 386 is quite old (about
3 years) - I'm sorry but I don't have the rev number.  Any help would
be apprieciated.


Thanks,

Bob Knier
(knier@miller.cs.uwm.edu)