Subject: Re: [stella] 6502 basics: signed LSR From: Thomas Jentzsch <tjentzsch@xxxxxx> Date: Sun, 15 Feb 2004 20:10:27 +0100 |
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 Have fun! Thomas _______________________________________________________ Thomas Jentzsch | *** Every bit is sacred ! *** tjentzsch at web dot de | ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] 6502 basics: signed LS, Russ Perry Jr | Thread | Re: [stella] 6502 basics: signed LS, Russ Perry Jr |
Re: [stella] 6502 basics: signed LS, Russ Perry Jr | Date | Re: [stella] 6502 basics: signed LS, Russ Perry Jr |
Month |