Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!bruce!monu0.cc.monash.edu.au!monu4!ins760z From: ins760z@monu4.cc.monash.edu.au (mr c.r. hames) Newsgroups: comp.sys.amiga.programmer Subject: Re: Assembly Graphics Help Needed Message-ID: <1991Jun27.140403.15476@monu0.cc.monash.edu.au> Date: 27 Jun 91 14:04:03 GMT References: <91177.015130G60LG@CUNYVM.BITNET> Sender: news@monu0.cc.monash.edu.au (Usenet system) Organization: Monash University, Clayton, Vic 3168, Australia Lines: 32 In article <91177.015130G60LG@CUNYVM.BITNET> G60LG@CUNYVM.BITNET (Anton Mitchell) writes: > > I have tried to get this assembly program to work for the longest. >Any help would be great. What I dont understand is when assembled and >executed the bitplanes are not cleared. When allocating the memory I set >the Clear and Chip flags. But it is not cleared. The only way I have been >able to clear the bitplanes is by using: > lea PlaneAdr,a1 > move.l PlaneSize*6,d1 > Loop: move.w #0,(a1)+ > dbra d1,Loop Besides the faults with your allocate mem putting words into d0 and d1 instead of longs which has been mentioned and the general nastiness of wacking in your own copperlist. REMEMBER that dbra does one more operation than what the counter started with. Many people forget this an overwrite memory not owned by them. So if you want to clear 100 words. move.l MemPtr,a0 moveq #100-1,d1 ; Note The -1 moveq #0,d0 ; lets not be too slow hey! Loop: move.w d0,(a0)+ dbra d1,Loop -- Chris Hames Person to blame for DirWork, VMK, FSDirs, etc And soon for PC-Task? ins760z@monu4.cc.monash.edu.au OR bytey@phoenix.pub.uu.oz.au OR 3:633/353 I speak for nobody not even myself.....