Here is some code for byte double. It was posted on the old board, not on this board yet.
So, with out further ado: reslo = $9b ;low byte of answer reshi = $9c ;high byte of answer *=$1300 ; takes one byte and makes it into 2. doubling the pattern in it. ; takes .a and puts results into .a and .x ; low in .a and high in .x start sta reslo jsr Rolling sta reshi jsr Rolling ldx reshi rts
Rolling lda #%00010000 clc @loop asl reslo rol bcc @loop ;4 bits in a now goto index tax lda table,x rts Table byte $00,$03,$0c,$0f,$30,$33,$3c,$3f byte $c0,$c3,$cc,$cf,$f0,$f3,$fc,$ff