To print the memory address

mangup's Avatar, Join Date: Jan 2009
Go4Expert Member
dear Expert
My problem is:
Ten data bytes are stored in memory location starting from xx50. Write an ALP to find if 40H exist in the list. If it exist, WAP in 8085 to print the memory address (of 40H).
Data(H):30,3A,59,89,E2,40,12,D1,88,98.

What I did:
LXI H,xx50H
LOOP : MVI B, 0AH
Mov A,M
CPI 40H
JZ FOUND
INX H
DCR B
JNZ LOOP
FOUND: ?????
HLT
So, What may be at this point, i.e. after FOUND. Coz if I write OUT, it will print the 40H, and If I write STA, it will also store the 40 H at he specified location. So how to print the memory address that contains 40H data.
Please help me. I dont know if there is instruction that does that.....
0
mangup's Avatar, Join Date: Jan 2009
Go4Expert Member
dear Expert
My problem is:
Ten data bytes are stored in memory location starting from xx50. Write an ALP to find if 40H exist in the list. If it exist, WAP in 8085 to print the memory address (of 40H).
Data(H):30,3A,59,89,E2,40,12,D1,88,98.

What I did:
LXI H,xx50H
MVI B, 0AH
LOOP: Mov A,M
CPI 40H
JZ FOUND
INX H
DCR B
JNZ LOOP
FOUND: ?????
HLT
So, What may be at this point, i.e. after FOUND. Coz if I write OUT, it will print the 40H, and If I write STA, it will also store the 40 H at he specified location. So how to print the memory address that contains 40H data.
Please help me. I dont know if there is instruction that does that.....[/quote]