Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack 100h
- .data
- input_string db 'We are DUET Students',10,13,'$'
- .code
- main proc
- mov ax,@data;
- mov ds,ax;
- mov ah,09
- ;; lea dx,input_string
- mov dx,offset input_string
- int 21h
- mov di,offset input_string
- Check_first_upper_case:
- cmp [di],'$'
- je last ; if got "$" then go to last label and end
- cmp [di],90
- jle First_upper_case
- inc di
- jmp Check_first_upper_case
- again:
- cmp [di],'$'
- je last ; if got "$" then go to last label and end
- cmp [di],90
- jle Last_upper_case
- inc di
- jmp again
- First_upper_case:
- mov ah,02
- mov dl,[di]
- int 21h
- inc di
- jmp again;
- Last_upper_case:
- cmp [di],65
- jge print
- inc di
- jmp again
- print:
- mov bl,[di]
- ;mov ah,02
- ; int 21h
- inc di
- jmp again
- last:
- mov ah,02
- mov dl,10
- int 21h
- mov dl,13
- int 21h
- mov dl,bl
- int 21h
- mov ah,4ch
- int 21h
- main endp
- end main
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement