Re: [stella] 6502 question

Subject: Re: [stella] 6502 question
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Fri, 04 Apr 1997 20:14:07 GMT
>It's surprising how often in 6502 programming, it is better to keep data in
>memory than in registers.  That is good since there are so few registers.

Yeah, but it's completely opposite from 80x86 programming, where you've got
at least six 16-bit registers, four of which you can access the high and
low bytes separately, and more if you know what you're doing (up to seven
32-bit registers, a couple 16-bit regs, and some floating-point storage on
the 386+), and the #1 rule is keep everything in the registers.  Compare
this to three 8-bit registers plus the stack register if you know how to
use it.

I miss having MUL and DIV instructions =)  Also, exactly which instructions
set and clear the carry?  I know the shifts and rotates do, and ADC is
obvious, but what exactly do SBC and the compares do to the carry?

>>My code had Y zeroed from a DEY/BNE loop before the LDA that I needed, so I
>>was trying to capitalize on that and failed =)  I'm going to need to use
>>LDY $80 / LDA $00,Y (the one combination you didn't mention).. thanks again
>>for the help.
>
>There is no Zero Page,Y although there is an Absolute,Y so you could
>conceivably do LDA $0000,Y and only take one more byte and no more cycles.
>I think the assembler will make this adjustment for you in most cases.

No ZP,Y?  My reference says there is and I've used it a number of times
already.. I guess DASM already adjusted it to Absolute,Y for me.

--
Archives available at http://www.biglist.com/lists/stella/archives/
E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.

Current Thread