Re: [stella] Usefull illegal opcodes (part 2: NOP)

Subject: Re: [stella] Usefull illegal opcodes (part 2: NOP)
From: Ruffin Bailey <rufbo@xxxxxxxxxxxxx>
Date: Tue, 06 Mar 2001 07:43:25 -0500
At 10:31 AM 3/6/01 +0100, you wrote:
Hi again,
here is another example of an usefull illegal opcode: NOP!

However, there are a lot of branches (2 bytes) which can be easily replaced with BIT (1 byte):

Now that is neat! A couple of questions...


The only problem is, that BIT changes flags (V,N,Z) which are sometimes needed later. But there is an illegal opcode solution for that: NOP.
To replace BIT ABS (opcode $2c) you can use $0c (NOP ABS). Here is an example from my Thrust code:

What does "ABS" mean? I apologize in advance if that's painfully obvious and I'm missing it.


.byte $0c ; <-- here I use an illegal NOP because I need the overflow- and negative-flags!

How many cycles do these two commands take? Looks like it's nearly time to update Nick's cycle counting paper.


Thanks for the neat trick!

Ruffin Bailey


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

Current Thread