Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   To print the memory address (http://www.go4expert.com/forums/print-memory-address-t24451/)

mangup 9Jan2011 11:49

To print the memory address
 
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.....

mangup 9Jan2011 11:58

Re: To print the memory address
 
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]


All times are GMT +5.5. The time now is 08:21.