title: "count no.of 1's" .model small .stack 100h .data num1 db 05 count db dup(0) .code mov ax,@data mov ds,ax xor ax,ax mov al,num1 mov cx,08 mov bl,0 again: rol al,1 jnc noadd inc bl noadd:loop again mov count,bl mov ah,4ch int 21h end
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter