[stella] Re: some little 6502 questions

Subject: [stella] Re: some little 6502 questions
From: Chris Wilkson - MCD <cwilkson@xxxxxxxxxxxxx>
Date: Fri, 28 Mar 1997 16:29:32 -0800 (PST)
> 
> > 
> > AND	#%01111111	; this should mask off the sign bit
> > 			; note that abs(-128) would be 0 using this method
> 
> Won't work for absolute values.  $FD is -3, but $7D is 125 when masked.

Ack!  Two things wrong here.  There was supposed to be a 6809 complement
instuction stuck in there.  Which brings us to the second thing:
6809 mode...off!  :}  Stupid, stupid, stupid...

> 
> How about:
> 
>  TAX
>  LDA ABSVALUE,X

[snip]

Good answer, Jim.

-Chris

--
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