Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.atari.st Subject: Re: ASSEMBLY MOVE/CLEAR/SET/COMPARE ROUTINES (was Clearing memory chain) Message-ID: <8808180442.AA08547@cory.Berkeley.EDU> Date: 18 Aug 88 04:42:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 42 :copying 12 long words with movem (a0)+,regs; movem regs,(a1); add.l Rn,a1" : takes 242 cycles on the 68000, :while 12 successive "move.l (a0)+, (a1)+" takes 240 cycles. :(timings derived from Motorola'a 68000 manual) :when copying fewer words, move.l is even better. : :the move.l appoach does not require saving and restoring all :your registers, and can be coded in C with decent compilers. * BULL SHIT * The motorola manual states the following for movem.l: movem M->R, long: (An)+: 12 + 8n clock cycles movem R->M, long: (An): 8 + 8n clock cycles add.l D0,A1: 8 clock cycles Total clocks to move 12 longwords of data from source to destination in an ascending copy is: 220 clock cycles --- move.l (A0)+,(A1)+ : 20 clock cycles Total clocks to move 12 longwords of data from source to destination in an ascending copy is: 240 clock cycles move.l -(A0),-(A1) : 22 clock cycles Total clocks to move 12 longwords of data from source to destination in a decending copy is: 264 clock cycles the comparison is valid because in both cases you still need the outer DBF loop. NOW WHERE IN THE HELL DID YOU GET *YOUR* INFORMATION ????? -Matt -Matt