954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Zero count

How can i count the number of zeros in an integer using assembly ???

dante5458
Newbie Poster
5 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Let's forget the "using assembly" part of the question for a second... do you have an idea of how to count the zeros in an integer at all? Please give us what you've come up with so far.

gusano79
Posting Pro
519 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

actually i do .. for example in java if u want to count the zeroes in the number the code will be as follows


int count=0;
int number;
while (number>0){
if (number % 10 == 0){
count=count +1;
}
number=number/10;
}

dante5458
Newbie Poster
5 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Okay! Where are you getting stuck translating this to assembly? Also, which assembler are you writing for?

gusano79
Posting Pro
519 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: