|
Subject: Re: [stella] Very BASIC ASM Info needed... From: Russ Perry Jr <slapdash@xxxxxxxxxxxx> Date: Wed, 7 Mar 2001 23:54:30 -0600 |
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/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [stella] Very BASIC ASM Info ne, Manuel Polik | Thread | Re: [stella] Very BASIC ASM Info ne, Andrew Davie |
| Re: [stella] Very BASIC ASM Info ne, Manuel Polik | Date | [stella] Qb: Testbed 2.05, Andrew Davie |
| Month |