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

URGENT 8085 initialize positions in memory

Discussion in 'Assembly Language Programming (ALP) Forum' started by airmang, Dec 5, 2008.

  1. airmang

    airmang New Member

    Joined:
    Dec 5, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello!

    I have an assignment for 8085 - convert a given string to uppercase.
    The string is 'digital.'
    The '.' means that this is the end of the string.
    I'm not allowed to use pseudo-operands.

    This is my code:
    Code:
    init:
    lxi h,9001
    mvi d,64    ;letter d
    mov m,d
    inx h
    
    mvi d,69    ;letter i
    mov m,d
    inx h
    
    mvi d,67    ;letter g
    mov m,d
    inx h
    
    mvi d,69    ;letter i
    mov m,d
    inx h
    
    mvi d,74    ;letter t
    mov m,d
    inx h
    
    mvi d,61    ;letter a
    mov m,d
    inx h
    
    mvi d,6c    ;letter l
    mov m,d
    inx h
    
    mvi d,2e    ;.
    mov m,d
    inx h
    
    
    
    main:
    lxi h,9001
    lxi d,9101
    mov a,m
    mvi b,2e
    
    loop:
    cmp b
    jz end
    sui 20    ;subtract 32
    stax d
    inx h
    mov a,m
    inx d
    jnz loop
    
    end:
    hlt 
    My problem is the first part - 'init'
    It doesn't look good at all!!! What else can I do?
    How can I initialize the positions of the memory with ANY given string?
    can I read from a file?
    can I ask the user to give one by one the characters until the '.' is given??

    how exactly? I haven't got any example I'm affraid.....:confused:

    Help me please!
    Thank you.
     

Share This Page