Re: [stella] 6502 basics: signed LSR

Subject: Re: [stella] 6502 basics: signed LSR
From: Russ Perry Jr <slapdash@xxxxxxx>
Date: Sun, 15 Feb 2004 14:35:55 -0600
At 3:25 PM -0500 2/15/04, Eric Ball wrote:
>> Thomas Jentzsch wrote:
>> > Yup:
>> >  lda var
>> >  cmp #$80
>> >  ror
>> >  sta var

>> Ha ha...  I was feeling silly enough after reading Eric's code,
>> but this seals it.  Back to lurking for ME I think.  :-)

> Trust Thomas to come up with the most efficient & elegant way to do
> something with the 6502.

At least I was thinking the right way -- I wanted to not have two
LSRs in the code and was trying to find a way to preserve the sign
info.  Sadly, I ended up with more shifting in the end since I wasn't
aware of the CMP opcode.  I've really gotta get familiar with the
instruction set one of these days...
-- 
//*================================================================++
||  Russ Perry Jr   2175 S Tonne Dr #114   Arlington Hts IL 60005  ||
||  847-952-9729   slapdash@xxxxxxx [NEW!]   VIDEOGAME COLLECTOR!  ||
++================================================================*//
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread