Subject: Re: [stella] Very BASIC ASM Info needed... From: "Andrew Davie" <adavie@xxxxxxxxxxxxx> Date: Thu, 8 Mar 2001 17:14:40 +1100 |
> Initialize FrameCounter to 00x01x10 (x doesn't matter), then do: That's a pretty neat trick, Russ.... you can drop the clc and replace the first rol by an asl (saving a byte, and 2 cycles) lda FrameCounter asl rol rol sta FrameCounter I think, though, that we should count the extra cycles to trim off the low bits and transfer to an index register - the table lookup is a clear winner when this is taken into account. But still, your idea... at just 7 bytes... very impressive! Cheers A -- _ _ _| _ _ _| _ * _ _ , (_|| )(_|( (/_\/\/ (_|(_|\/(_(/_ ,~' L_|\ ,-' \ see my Museum of Soviet Calculators at ( \ http://www.taswegian.com/MOSCOW/soviet.html \ __ / L,~' "\__/ @--> v ----- Original Message ----- From: "Russ Perry Jr" <slapdash@xxxxxxxxxxxx> To: <stella@xxxxxxxxxxx> Sent: Thursday, March 08, 2001 4:54 PM Subject: Re: [stella] Very BASIC ASM Info needed... > At 10:25 PM +1100 3/7/01, Andrew Davie wrote: > >How about this one.... > > > > lda FrameCounter > > cmp #2 > > adc #1 > > and #3 > > sta FrameCounter > > > >Not better than the first version, though. This one is 12 cycles and 10 > >bytes. > > I'm not up on counting, as I don't really know 6502 assembly... > I guess the LDA and STA are two bytes each and 3 cycles because > they are using FrameCounter in zeropage? > > Anyway, I started thinking there was another way, and I guess there > is, though it isn't quicker... > > Initialize FrameCounter to 00x01x10 (x doesn't matter), then do: > > lda FrameCounter > clc > rol > rol > rol > sta FrameCounter > > If I counted right, that's 14 cycles, but only 8 bytes. If you need > more room than time... > -- > //*================================================================++ > || Russ Perry Jr 2175 S Tonne Dr #114 Arlington Hts IL 60005 || > || 847-952-9729 slapdash@xxxxxxxxxxxx VIDEOGAME COLLECTOR! || > ++================================================================*// > > - > Archives (includes files) at http://www.biglist.com/lists/stella/archives/ > Unsub & more at http://www.biglist.com/lists/stella/ > - Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Very BASIC ASM Info ne, Russ Perry Jr | Thread | Re: [stella] Very BASIC ASM Info ne, Russ Perry Jr |
[stella] Qb: Testbed 2.05, Andrew Davie | Date | Re: [stella] Very BASIC ASM Info ne, Russ Perry Jr |
Month |