MVI B 07h
LXI H 0007h
LXI D 0007h
DCR B
LOOP1: DCR B
MOV C B
INR B
LOOP: DAD D
DCR C
JNZ LOOP
MOV E L
MOV D H
DCR B
JNZ LOOP1
HLT
I couldn't find out the problem in my code. Can you please help me out? It's giving me partially wrong answer. The two LSB
bits are correct but not the MSBs
.