Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!olivea!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: Short Hello World Message-ID: Date: 12 May 91 17:59:37 GMT References: <1804@tardis.Tymnet.COM> <1991May7.001146.1830@cinnet.com> <1991May10.103117.4270@cs.umu.se> <1991May11.072139.781@starnet.uucp> Organization: Not an Organization Lines: 32 In article <1991May11.072139.781@starnet.uucp> sschaem@starnet.uucp (Stephan Schaem) writes: > > And to add to sub.l Dn,Dn... Moveq is faster on the 68000 4 compared to > 8, 4 compared to 6 on a 68010, and same timing on a 68020... > a word size sub on data registers is the same has clr.w... on all above > 680x0. > > Conclusion.Dont use sub.l dn,dn or sub.w dn,dn use moveq #0,dn and > clr.w dn.... > > Stephan. Uh, actually, you don't want to use CLR either if you can help it because CLR always *reads* the ea before writing a 0 to it. This true all the way through 020's at least. For word operations it isn't too bad, but take a look at clr.l D0 ... 6 cycles on a 68000. MOVEQ is faster. And on memory CLR. is horrific since it reads the memory location before writing it. Before people get huffy about CLR, please remember that Motorola has gotten CLR's instruction timings wrong in every other edition of their handbook. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA