Tuesday, December 1, 2020

Assembly 8086 program to Count number of 0's in a number

Hey guys!! 


Today we will see the program of microprocessor 8086 to find and count the number of ones in a register or 16 bit number.


Let's go!!


data segment

number01 dw 4560h

counter db 00h

data ends

code segment

start :

assume cs:code, ds:data

mov dx,data

mov ds,dx

mov cx,10h

mov ax,number01

up:ror ax,1

jc dn

inc counter

dn: loop up

mov ah,04ch

int21h

code ends

end start

 

Programs:-

For many other Language Programs of microprocessor 8086, C++ , Data Structures and MSBTE diploma and engineering related concepts visit our  BLOG

 

No comments:

Post a Comment