org $1000 db $23,$55 org $1005 zero_cnt rmb 1 lp_cnt rmb 1 org $1500 clr zero_cnt ; initialize the zero count to 0 ldaa #16 staa lp_cnt ; initialize loop count to 16 ldd $800 ; place the 16-bit number in D again lsrd bcs chk_end ; branch if the lsb is a 1 inc zero_cnt chk_end dec lp_cnt bne again ; have we tested all 16 bits yet? forever bra forever end