Re: Aw: Re: [stella] Reflex: Source of PAIN!

Subject: Re: Aw: Re: [stella] Reflex: Source of PAIN!
From: KirkIsrael@xxxxxxxxxxxxx
Date: 5 Apr 2004 21:04:56 -0000
> >> > Stuff like `byte #%10101010' is accepted, and shouldn't be.
> 
> >> What's wrong with this?
> 
> > The # means `immediate mode addressing'... there's no addressing mode
> > with a pseudo-op like `byte'. Putting the # there doesn't do anything
> > useful, and it has the non-useful possibility of confusing people who
> > are still learning 6502 assembly...
> 
> Hm... I used to interpret the # as "Use value as it's written", as opposed 
> to "Use the content of this memory address", so doing
> 
> byte #%10101010
> 
> was a natural thing to me. Almost like escaping something with \ in a 
> regexp in Perl. (Coming back to your original post here... :-) )

Yes, that's exactly how my "mental model" of it worked as well.

Making things slightly worse, I applied that to the definitions of constants,
so the start of JoustPong has lots of stuff like 

STRENGTH_OF_CEILING_REBOUND = #3

SCORE_KERNAL_LENGTH = #5

 
> Also by following this interpretation, I was never in danger to mix-up 
> addressing modes in the code either. I certainly did and do, like everyone 
> else, yet I fail to see how rejecting the # in data will help anyone here.

It really does go to do you think of it as address modes, which
constant definitions and "this byte here" don't have, or "#" as kind 
of a way of saying "this literal value".  Unless someone can point 
to a way of #/no # being ambiguous, I prefer the liberal parsing 
DASM currently uses, where putting a "#" to mean literal, not a lookup
is just ignored in cases where you couldn't possibly be doing anyway.

I guess the ambiguity I was talking about would come from the case
where someone did something like 
   .byte SomeMemoryLocationLabel
hoping that it would be filled in with...with...well, frankly I
don't know what someone would've been hoping to get with that,
since it's "obviously" an "assembly time" kind of thing, which
is why I'd like DASM to continue not to worry about it.


-- 
KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
   fight fire with napalm


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


Current Thread