Re: [stella] An Efficient Waste Of Time

Subject: Re: [stella] An Efficient Waste Of Time
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Fri, 18 Oct 2002 17:26:47 -0400
Manuel wrote:

>Actually it's 6 + 5 * (ZeroPage - 1), since a branch taken is 3 cycles.

Ugh, You'd think I'd know better than to post at 2am by now....

>Well, this certainly is fine - for any selfmodifying RAM kernels.

Um, sure, you could do that but for a RAM routine I'd think you should just skip the JMP altogether and just copy over only as many NOPs to RAM as you need to execute (Or, you could have a list of NOPs and just drop the RTS in at the correct place).

What I mean't was something like:


JMPaddress EQU $80

   lda #10
   jsr DoPause

   ...  ;Code here

   lda #20
   jsr DoPause

   ...  ;Code here

 org $f200
DoPause:
   clc
   adc #$0d
   sta JMPaddress
   lda #$f2
   adc #0            ;You can avoid this if max length won't exceed page boundary
   sta JMPaddress+1
   jmp (JMPaddress)
   nop
   nop
   nop
   nop
   nop
   nop
        ;Bunch more NOPs...
   rts


Chris...

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread