help needed wid 8085 alp!

Discussion in 'Assembly Language Programming (ALP) Forum' started by 12341234, Aug 23, 2007.

  1. 12341234

    12341234 New Member

    Joined:
    Aug 23, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i want solution for these!
    i m beginner in alp.

    1. A program in 8085 assembly language to store EFH in following registers
    Registers: B,C,D,H,L
    (using only MOV & MVI instructions)
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
  3. duynguyenvan

    duynguyenvan New Member

    Joined:
    Aug 28, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Hello,
    Could you pls help me answer this question:
    - Please take a look at my small Assembly program that reads a tring from keyboard, then displays all the characters that are not uper-case letters in reverse order:
    Code:
    .model small
    .stack 100
    .data
            tb1 db 'Pls enter a string, enter to finish $'
            tb2 db 10,13,'The characters that are not uper-case : $'
            xau db 80 dup(?)
    .code
    Main proc
            mov ax,@data
            mov ds, ax
            mov es, ax
            mov ah,9
            lea dx,tb1
            int 21h
            xor cx,cx
            lea di,xau
    nhap:        mov ah,1
            int 21h
            cmp al,13
            je thoi
            cmp al,'A'
            jb dung
            cmp al,'Z'
            ja dung
            jmp nhap
    dung:        stosb
            inc cx
            jmp nhap
    thoi:        mov ah,9
            lea dx,tb2
            int 21h
            dec di
            mov si,di
            std
            mov ah,2
    quay:        lodsb        
            mov dl,al
            int 21h
            loop quay
            mov ah,4ch
            int 21h
    Main endp
            End main
    
    The code above runs very well, even though i did not use the Clear Direction Flag (cld) instruction after the instruction in red (lea di,xau)
    The string processing is still in forward direction.
    The question is that: Why?

    I appreciate your help.

    Regards,
    Duy.

    Duy V. Nguyen
    ODWME/Bluebird Project Leader- GPSG - IBM
    Summers, NY 10589-3216
    United States
     
    Last edited by a moderator: Aug 28, 2007
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice