Hey, I'm new to assembly 8086 progamming and don't know much of the code.

How do you change the input string to all caps and show the number of characters without counting the spaces?

Enter a string: Doraemon rules!!!

Output: DORAEMON RULES!!!

Number of characters: 16

TITLE   LAB TUTORIAL 1

.model  small
.stack  100h

.data
msg1    db  "Enter a string: $"
msg2    db  "Output: $"
msg3    db  "Number of characters: $"
blank   db  0dh,0ah,'$'
string  db  99 dup(?)

.code
main    proc
    mov     ax, @data
    mov     ds, ax  
    mov dx, offset msg1
    mov ah, 9
    int 21h

    mov     si, offset string
top:    mov     ah, 1
    int     21h
    cmp     al, 13
    je  stop
    mov     [si], al
    inc     si

    jmp     top
stop:   mov     al, '$'
    mov [si], al
    mov dx, offset blank
    mov ah, 9
    int 21h
    mov dx, offset msg2
    mov ah, 9
    int 21h

    mov si, offset string
    mov     al, [si]
    cmp     al, 'a'
    jl  noconvert
    cmp     al, 'z'
    jg  noconvert
    sub     al, 32


    mov ax, 4c00h
    int 21h

main    endp
end main

Please help, I cannot do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.