.model small
.stack 100h
.data
msg db "DEEPRAJ BHUJEL$"
.code
main proc
mov ax,@data
mov ds,ax
mov si,offset msg
take: mov dl,[si]
cmp dl,'$'
je stop
mov ah,2
int 21h
mov dl,13
mov ah,2
int 21h
mov dl,10
mov ah,2
int 21h
inc si
jmp take
stop: call help
mov ax,4c00h
int 21h
main endp
help proc
mov ax,@data
mov ds,ax
mov si,offset msg
first: mov dl,[si]
cmp dl,'$'
je last
cmp dl,' '
je next
mov ah,2
int 21h
inc si
jmp first
next: mov dl,13
mov ah,2
int 21h
mov dl,10
mov ah,2
int 21h
inc si
jmp first
last: ret
help endp
end
OUTPUT:
.stack 100h
.data
msg db "DEEPRAJ BHUJEL$"
.code
main proc
mov ax,@data
mov ds,ax
mov si,offset msg
take: mov dl,[si]
cmp dl,'$'
je stop
mov ah,2
int 21h
mov dl,13
mov ah,2
int 21h
mov dl,10
mov ah,2
int 21h
inc si
jmp take
stop: call help
mov ax,4c00h
int 21h
main endp
help proc
mov ax,@data
mov ds,ax
mov si,offset msg
first: mov dl,[si]
cmp dl,'$'
je last
cmp dl,' '
je next
mov ah,2
int 21h
inc si
jmp first
next: mov dl,13
mov ah,2
int 21h
mov dl,10
mov ah,2
int 21h
inc si
jmp first
last: ret
help endp
end
OUTPUT:
No comments:
Post a Comment