1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

To print the memory address

Discussion in 'Assembly Language Programming (ALP) Forum' started by mangup, Jan 9, 2011.

  1. mangup

    mangup New Member

    Joined:
    Jan 27, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    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.....
     
  2. mangup

    mangup New Member

    Joined:
    Jan 27, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    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]
     

Share This Page