Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!pacbell.com!tandem!zorch!amiga0!mykes From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz) Newsgroups: comp.sys.amiga.programmer Subject: Re: Assembly Graphics Help Needed Message-ID: Date: 28 Jun 91 11:26:06 GMT References: <91177.015130G60LG@CUNYVM.BITNET> <1991Jun27.140403.15476@monu0.cc.monash.edu.au> Organization: Amiga makes it possible Lines: 38 In article <1991Jun27.140403.15476@monu0.cc.monash.edu.au> ins760z@monu4.cc.monash.edu.au (mr c.r. hames) writes: >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. > As well, most assemblers will allow you to let the OS do your memory allocation for you. For example, instead of using AllocMem to allocate screen bitplanes, you could do the following: SECTION screen,BSS,CHIP myScreen ds.b (WIDTH/8)*HEIGHT*DEPTH And you can put your copper list right into CHIP ram, too: SECTION copper,DATA,CHIP myCopper dc.w ... ... -- **************************************************** * I want games that look like Shadow of the Beast * * but play like Leisure Suit Larry. * ****************************************************