From: broeker AT physik DOT rwth-aachen DOT de Newsgroups: comp.os.msdos.djgpp Subject: Re: rep Date: 27 Mar 2000 14:10:56 GMT Organization: Aachen University of Technology (RWTH) Lines: 38 Message-ID: <8bnq5g$gd9$1@nets3.rz.RWTH-Aachen.DE> References: <8biqji$5fm$1 AT agnus DOT ngi DOT it> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 954166256 16809 137.226.32.75 (27 Mar 2000 14:10:56 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 27 Mar 2000 14:10:56 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com GiLbI wrote: > movl $153600,%ecx > movl $0,%eax > stosl repnz That's definitely incorrect syntax. I wonder why gas didn't throw you an error message for this. > why if i write repxx at the beginning of statement it isn't correct? > (repnz stosl -> error) Because unlike in Intel Syntax, 'rep*' is not a prefix, in AT&T asm; it's a separate instruction. > and why "stosl repnz" repeat 1 times instead 153600? Because there is no 'rep' applied to the 'stosl'. > code converted with ta2as is "rep: stosl", but always the iterations are > only one. 'rep: stosl', or maybe 'repnz: stosl' is the correct code, sort of. You actually need two opcodes repnz stosl The separation by ':' in the line above should do the same, but it may not work, for some reason. See the source code for '__dj_movedata()' in 'djlsr203.zip', for comparison. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.