3 ms·
; http://forum.6502.org/viewtopic.php?t=1206 http://forum.6502.org/viewtopic.php?t=1206 LDX #$00 ; clear bit count loop ASL ; shift a bit
by mmphosis 4y ago
; http://forum.6502.org/viewtopic.php?t=1206 http://forum.6502.org/viewtopic.php?t=1206
LDX #$00 ; clear bit count
loop
ASL ; shift a bit
BCC skip ; did one shift out?
INX ; add one to count
skip
BNE loop ; repeat till zero
RTS