Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!skynet.be!newsfeed1.funet.fi!newsfeeds.funet.fi!news.hit.fi!maanantai.hit.fi!pkoistin From: Petri Koistinen Newsgroups: comp.sys.m68k Subject: Re: HELP! Date: Thu, 26 Oct 2000 01:56:34 +0300 Organization: Helsinki Institute of Technology, Finland Lines: 45 Message-ID: References: <8t7k5f$2un$1@nnrp1.deja.com> NNTP-Posting-Host: maanantai.hit.fi Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <8t7k5f$2un$1@nnrp1.deja.com> On Wed, 25 Oct 2000 jenmw1978@my-deja.com wrote: > I have written the following code for the purpose of filling memory > space from $4000 to $40FF with the number sequence from $0 to $FF... > It does not seem to be working, if anyone could help me out as to what > I am doing wrong I would greatly appreciate it... > > ORG $0 > DC.L $8000 > DC.L START > > ORG $2000 > > START LEA $4000,A3 > MOVE.L #0,D1 > > LOOP CMP.L #$FF,D1 > BGT LOOP > > MOVE.B D1,(A3) > ADD.B #1,D1 > ADDA.L #1,A3 > BRA LOOP > > LEA $4000,A3 > BREAK Loop testing is in wrong place, it should be at end (and some other mistakes). But how about change midle part to this: START LEA $4100,A3 MOVEQ #-1,D1 LOOP MOVE.B D1,-(A3) DBEQ D1, LOOP BREAK It will fill $4000 to $40FF with $0 - $FF, but it will start filling for end ($40FF) to beging ($4000). Regards Petri Koistinen