Re: [stella] Pattern Processor code help

Subject: Re: [stella] Pattern Processor code help
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Fri, 09 May 2003 13:02:37 -0400
Since Bill pointed this out, are you sure this is doing what you expect it to be doing?

 AND #$C0

This code has the effect of moving Bit7 to Bit1, Bit6 to Bit0 and Bit5 to the Carry. Since the AND isolates bits 5 and 7 I suspect this is not what you intend:

Start With: #%10100000  c=0
ROL: #%01000000  c=1
ROL: #%10000001  c=0
ROL: #%00000010  c=1

If you're looking to move the high nibble to low, you need another ROL. Though I'd suggest just doing 4 LSR's instead and not have to worry about the Carry at all.


Archives (includes files) at
Unsub & more at

Current Thread