convert an uppercase letter to lowercase with Intel 8085

Discussion in 'Assembly Language Programming (ALP) Forum' started by panayiotispatra, Nov 25, 2008.

  1. panayiotispatra

    panayiotispatra New Member

    Oct 25, 2007
    Likes Received:
    Trophy Points:
    Can somebody help με το change the following program that is written in 8086 in 8085
    I want to convert an uppercase letter to lowercase with Intel 8085

    org 100h
    jmp start
    new_line db 0Dh,0Ah, '$' ; new line code.
    lea dx, string
    mov ah, 0ah
    int 21h
    mov bx, dx
    mov ah, 0
    mov al, ds:[bx+1]
    add bx, ax ; point to end of string.
    mov byte ptr [bx+2], '$' ; put dollar to the end.
    lea dx, new_line
    mov ah, 09h
    int 21h
    lea bx, string
    mov ch, 0
    mov cl, [bx+1] ; get string size.
    jcxz null ; is string is empty?
    add bx, 2 ; skip control chars.
    ; check if it's a lower case letter:
    cmp byte ptr [bx], 'a'
    jb ok
    cmp byte ptr [bx], 'z'
    ja ok
    and byte ptr [bx], 11011111b
    inc bx ; next char.
    loop upper_case
    lea dx, string+2
    mov ah, 09h
    int 21h
    ; wait for any key press....
    mov ah, 0
    int 16h

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