News for hackers. Stuff that matters.
Re:Counting set bits in an interesting way by mark-r on Saturday April 30, 2022 @04:15PM (#31218889)
You could remove one branch by doing add 0 with carry instead of the increment.
Re:Counting set bits in an interesting way by mmphosis on Saturday April 30, 2022 @04:53PM (#31219225)
; yes, A becomes the counter, and shift a zero page byte

  byte  EQU $EB
        STA byte
        LDA #$00
        CLC
  loop
        ADC #$00
        LSR byte
        BNE loop
        ADC #$00
        RTS