[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hires - to - Lores ... Yikes



On 24 Jul 2004 23:09:05 GMT, mjmahon@aol.com (Michael J. Mahon) wrote:

>cranem@[nospam]aol.com replied:
>
>>My 6502 code is a *bit* rusty these days, but I think this would do
>>the job.  If I'm wrong about the ROL opcode, replacing it with a
>>simple LDA #$40 would do the job at the expense of being twice the
>>size (but being more generic).
>>
>>                                 LDA #$20     ;%00100000
>>                                 STA $0304
>>                                 ROL              ;%01000000
>>                                 STA $0307
>>300- A2 00                LDX  #$00
>>302- BD 00 20           LDA $2000,X
>>305- 9D 00 04           STA $0400,X
>>308- E8                      INX
>>309- D0 F7                BNE $0302
>>30B- EE 04 03           INC $0304
>>30E- EE 07 03           INC $0307
>>311- AD 07 03          LDA $0307
>>314- C9 08               CMP #$08
>>316- D0 E8               BNE $0300
>>318- 60                     RTS
>
>I'd definitely recommend the LDA--that value is one of the
>things someone might want to change!

Yeah, and I wasn't watching the code closely enough, either.  That
needs to be a $04 not a $40...so instead of ROL use LDA #$04.