Need help with 8085 µP ALP ...?

I have to count the number of odd as well as even bytes occuring in a block of data (say from 3001H to 3005H) length of block is at 3000H. have to store the result at 300AH and 300BH respectively ...

I have tried this but there is something wrong and its not working right .. :

LXI H,3000H

MOV C,M

MVI B,00H

MVI D,00H

label1:INX H

MOV A,M

RRC

JNC label

INR D

DCR C

JNZ label1

label:INR B

DCR C

JNZ label1

LXI H,300AH

MOV M,D

INX H

MOV M,B

HLT

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.