Re: [stella] newbie question

Subject: Re: [stella] newbie question
From: KirkIsrael@xxxxxxxxxxxxx
Date: 24 Sep 2003 16:05:32 -0000
> Tom Dunn wrote:
> >                 sta #180
> 
> Replace all "sta #xy" with "lda #xy". 
> (sta stores, lda loads)

Heh...I don't know if linguistically it's more intuitive 
in German, but "load" (move to active registers from memory)
and "store" (put back in memory from active registers) just 
isn't intuitive to me, which function is which...I always 
have to glance at elsewhere in my code, and notice that 
LDA (often with a constant) usually precedes the STA, and
then I can figure out which one I'm looking for from that.

One other newbie thing to watch out for: when you finally
decide to start using constants (like "CEILING_VALUE" for
5, "FLOOR_VALUE" for 180) MAKE SURE you put a "#" before 
the value when you refer to it, ala
  CMP #FLOOR_VALUE
and not 
  CMP FLOOR_VALUE
I burnt more time on that kind of thing than anything else...
you get some *weird* effects when you're loading values from
spots in memories rather than directly as constants.

Also, certain types of compares require clearing out the
carry bit I think, another easy thing to forget about in
your early days.

Good luck!
-Kirk

-- 
KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
"If you feel it, but it isn't right, don't do it and don't 
 believe it. We can be better than natural -- we're human."--Penn Jillette


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


Current Thread