You are on page 1of 1

;SHWETHA R 1MS09TE053 ;Program to determine the number of ones in a given number .model small .

data x dw 1234h count equ 10h result db 00h .code mov ax,@data mov ds,ax mov ax,x mov dl,00h mov cl,count back:ror ax,01h jnc loc1 inc dl loc1:loop back mov result,dl mov ah,4ch int 21h end

RESULT: ><ones.dat >l >g Program terminated normally (52) >dw x l1 43FF:000C 1234 >db result l1 43FF:0000 >q

05

You might also like