Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack 100h
- .data
- input db 'We are DUET Students',10,13,'$'
- .code
- main proc
- mov ax,@data;
- mov ds,ax;
- mov ah,09
- mov dx,offset input
- int 21h
- mov di,offset input
- check_first_upper_case:
- cmp [di],'$'
- je last
- cmp [di],90
- jle First_upper_case
- inc di
- jmp check_first_upper_case
- again:
- cmp [di],'$'
- je last
- 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]
- 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