Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .data
- msg1 db 0dh,0ah,"Enter a Value : $"
- msg4 db
- msg2 db 0dh,0ah,"The character are $"
- msg3 db 0dh,0ah,"The chracter are $"
- x db ?
- y db ?
- main proc
- mov ax,@data
- mov ds,ax
- mov ah,9
- lea dx,msg1
- int 21h ;print string
- mov ah,1
- int 21h ;take input
- mov x,al ;move input to variable
- mov ah,1
- int 21h ;take input
- mov y,al ;move input to variable
- mov cl,y
- CMP x,cl ;compare with 65
- JL level ; if value less than 65 execute level
- mov ah,9 ;if not the execute this partr
- lea dx,msg2
- int 21h
- mov ah,2
- mov dl,y
- int 21h
- mov ah,2
- mov dl,032
- int 21h
- mov ah,2
- mov dl,x
- int 21h
- JMP exit ;goto exit
- level: ;value are same
- mov ah,9
- lea dx,msg3
- int 21h
- mov ah,2
- mov dl,x
- int 21h
- mov ah,2
- mov dl,032
- int 21h
- mov ah,2
- mov dl,y
- int 21h
- exit:
- main endp
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement