Subject: Re: Aw: [stella] BCD to pointer. From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx> Date: Thu, 13 May 2004 12:23:18 -0700 |
>Now my problem is multiplying by 5 (the height of my fonts) >This is how I handle the low nybble > > and #$0F > sta temp > asl > asl > adc temp > >Is there an easy way to do this to the top nybble? >at the moment I'm lsr'ing 4 times then applying the same method as above. The second round could be... ; Think of left nibble as val*16 ; So divide by 4 to get val*4 ; Store that, then divide by 4 again to get val ; Add to stored value to get (val*4)+val = val*5 and #$F0 ; This is necessary lsr lsr sta temp lsr lsr adc temp I think the logic is sound. -Lee ---------------------------------------------------------------------------------------------- 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: Aw: [stella] BCD to pointer., happy_dude | Thread | Re: Aw: [stella] BCD to pointer., Manuel Rotschkar |
Re: [stella] BCD to pointer., cybergoth | Date | Re: [stella] Horizontal scrolling d, Manuel Rotschkar |
Month |