You are currently viewing [PRACTICAL] Implement a program to count no of zero value in given block of data
Microprocessor 8085 programming

[PRACTICAL] Implement a program to count no of zero value in given block of data

5
(2)

[PRACTICAL] IMPLEMENT A PROGRAM TO COUNT NO OF ZERO VALUE IN GIVEN BLOCK OF DATA

Are you looking for a step-by-step guide to Implement a program to count no of zero value in given block of data? here are the steps to implement a program to count no of zero value in given block of data.

Theory:

This Program find how many hexadecimal zero value in list of memory location. Here memory location stared from C050h to C05Fh and find zero value between two location. Count number of zero store in C register.

For example.

Program:

LXI H,C050H
MVI B,0FH
MVI C,00H
NEXT :MOV A,M
ANI FFH
JZ COUNT
BACK :INX H
DCR B
JNZ NEXT
HLT
COUNT: INR C
JMP BACK
HLT

Output:

 If we enter above value in list of memory location then total number of zero is 7 so value of C register is 7.

For more practical related to 885 Programming please visit the 8085 Programming link

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?