Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!kingkong.cis.ohio-state.edu!meekins From: meekins@kingkong.cis.ohio-state.edu (Tim Meekins) Newsgroups: comp.sys.apple2 Subject: Re: help optimizing asm routine (and help with GetCaretTime) Message-ID: <125198@tut.cis.ohio-state.edu> Date: 24 May 91 14:33:54 GMT Sender: news@tut.cis.ohio-state.edu Organization: The Ohio State University, Department of Computer and Information Science Lines: 36 In article <1991May24.111453.27330@nntp-server.caltech.edu> toddpw@nntp-server.caltech.edu (Todd P. Whitesel) writes: >>:6 ldy ]x >>:4 lda []off_image],y >> sta []image],y >> dey >> dey >> bpl :4 > >Jeezus. LHG at its slowest uses a loop like this. You can use MVP/MVN a lot >of the time (yes, you really can use them -- get sneaky), and most of the >time (except under Orca) you can map the stack into the shadowed graphics >page and romp pixels to the screen. A lot also depends on where off_image and image point to. If you know they're in the same bank you can greatly speed this up. Also self-modifying code is handy in these situations. For minor speed improvement, try unrolling by a factor of 1. This will cut the bpl count in half. But then you need to know you're copying a min up 4 bytes instead of 2... > >Sure it sounds sick but that's tough noogies. Think about it for a while and >then mail me. Don't listen to Tim Meekins, or your code won't work with >AppleTalk (in fact he's lucky it works at all -- do you EVER check to see >where the standard GrafPort is, Tim?). > Come on Todd, that was only in ONE program a LONG time ago.. I challenge you to crash ZLaunch.... (Hmmm. well I'm assuming my newer demos work....) -- ++------------S-U-P-P-O-R-T---S-H-A-R-E-W-A-R-E---O-R---D-I-E-!-----------++ || Tim Meekins || Snail Mail: || Apple II || || meekins@cis.ohio-state.edu || 8372 Morris Rd. || Forever! || \\___timm@pro-tcc.cts.com________/\____Hilliard, OH 43026__/\_____________//