Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!udel!mmdf From: gay%elde.epfl.ch@cunyvm.cuny.edu (David Gay) Newsgroups: comp.sys.amiga Subject: Bug in Lattice C 4.01 Message-ID: <3563@louie.udel.EDU> Date: 31 Jul 88 17:56:52 GMT Sender: mmdf@udel.EDU Lines: 30 I recently found a bug in Lattice C 4.01 (both patches), in the 16-bit library routine movmem (well, actually there were 2 bugs !). Here is a correct version: CSECT text XDEF _movmem _movmem MOVEA.L 4(A7),A0 MOVEA.L 8(A7),A1 MOVE.W 12(A7),D0 BLE exit CMPA.L A0,A1 BCS upwards ADDA.W D0,A0 The old version had ADDA.L ... ADDA.W D0,A1 SUBQ.W #1,D0 lpdown MOVE.B -(A0),-(A1) DBRA D0,lpdown RTS upwards SUBQ.W #1,D0 This line was missing loopup MOVE.B (A0)+,(A1)+ DBRA D0,loopup exit RTS END To