Re: [stella] 6502 basics: signed LSR

Subject: Re: [stella] 6502 basics: signed LSR
From: Russ Perry Jr <slapdash@xxxxxxx>
Date: Sun, 15 Feb 2004 13:18:15 -0600
At 8:10 PM +0100 2/15/04, Thomas Jentzsch wrote:
>KirkIsrael wrote:
>> Is there a better way of dividing a signed 1-byte integer
>> by 2 than this? (which says, if var is positive, just do LSR,
>> otherwise LSR and OR w/ -128 i.e. #%10000000 )

> 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.  :-)
-- 
//*================================================================++
||  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