Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assume cs:code,ds:data
- data segment
- msg db 0dh,0ah,'enter the no.$'
- msg1 db 0dh,0ah,'entered no. is even$'
- msg2db 0dh,0ah,'entered no is odd$'
- data ends
- code segment
- start:
- mov ax,data
- mov ds,ax
- mov ah,09h
- lea dx,msg
- int 21h
- mov ah,01h
- int 21h
- ror al,01h
- jnc here
- mov dx,offset msg2
- mov ah,09h
- int 21h
- jmp there
- here: mov dx,offset msg1
- mov ah,09h
- int 21h
- there:mov ah,4ch
- int 21h
- code ends
- end start
- OUTPUT:
- F:\TASM>td check
- Turbo Debugger Version 3.00 Copyright (c) 1988,91 Borland International
- §enter the no.9
- entered no is odd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement