assume ds:data,cs:code
data segment
msg db 0ah,0dh,'enter the mobile number$'
number db 20,0,20 dup('$')
yes db 0ah,0dh,'YES$'
no db 0ah,0dh,'NO$'
data ends
code segment
start:mov ax,seg data
mov ds,ax
lea dx,msg
mov ah,09h
int 21h
lea dx,number
mov ah,0ah
int 21h
lea dx,number
mov sl,dx
inc si
inc si
mov cx,000ah
again:mov al,[si]
and al,0fh
mov [si],al
inc si
loop again
lea dx,number
mov si,dx
inc si
inc si
mov cx,0009h
mov ax,0000h
mov ai,[si]
adding:add al,[si+1]
inc si
loop adding
mov bl,03h
div bl
and ah,0ffh
jz yess
lea dx,no
mov ah,09h
int 21h
jmp down
yess:lea dx,yes
mov ah,09h
int 21h
down: mov ah,4ch
int 21h
code ends
Quiz Champion's Mastermind series - Quiz 2
-
X was born in 1892. X is known for his fantasy books. Y was called 'the
American X'. Y is also a famous fantasy writer. Movies have been made out
of X's no...
No comments:
Post a Comment