model small
.stack 100h
.data
msg db "enter ur choice: [1-5]$"
una db "one$"duha db "two$"
tulo db "three$"upat db "four$"
lima db "five$"
pawala db "error input$"
.codestart:
mov ax,@data
mov ds,ax
mov dx,offset msg
mov ah,09h
int 21h
;input
mov ah, 01h
int 21h
mov dl,al
;enter
xor ah,ah
int 16h
cmp dl, '1' je one
cmp dl, '2' je two
cmp dl, '3' je three
cmp dl, '4' je four
cmp dl, '5' je five
jne exit
one:
mov dx, offset una
mov ah, 09h
int 21h
je human
two:
mov dx, offset duha
mov ah, 09h
int 21h
je human
three:
mov dx, offset tulo
mov ah, 09h
int 21h
je human
four:
mov dx, offset upat
mov ah, 09h
int 21h
je human
five:
mov dx, offset lima
mov ah, 09h
int 21h
je human
exit:
mov dx, offset pawala
mov ah, 09h
int 21h
je human
human:
mov ax, 4c00h
int 21h
end start
No comments:
Post a Comment