Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.bbs-scene.org!macgui.com!mmphosis From: mmphosis Newsgroups: comp.sys.apple2.programmer Subject: Re: Fastest method to copy/process a range of bytes? Date: Thu, 9 Aug 2012 06:09:56 +0000 (UTC) Organization: Mac GUI Lines: 26 Message-ID: References: NNTP-Posting-Host: gunshin.wiredns.net Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: technocratmedia-w1.news.bbs-scene.org 1344492596 2241 74.119.145.48 (9 Aug 2012 06:09:56 GMT) X-Complaints-To: abuse@bbs-scene.org NNTP-Posting-Date: Thu, 9 Aug 2012 06:09:56 +0000 (UTC) User-Agent: Mac GUI City Usenet Posting Xref: csiph.com comp.sys.apple2.programmer:363 save a few more cycles by stuffing the entire routine in the zero page, and rather than lda/sta (indirect),y instead make the last copy lda/sta absolute,y ptr = :5+1 ; source ptr is one byte past the lda absolute,y instruction ptr_mp = :d+1 ; destination ptr_mp is one byte past the lda absolute,y instruction org $0080 ; * = $0080 . . . :5 lda ptr,y ; move odd byte (1, 3, ..., 255) :d sta ptr_mp,y . . . * your assembler directives may vary ** and, every assembler seems to do labels differently *** I am using xa and ended up having to hand assemble this because xa couldn't resolve the ptr indirection to assemble to zero page instructions