Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;taking 16 bit number input
- mov ah,01h
- int 21h
- mov bh,al
- mov cl,4
- shl bh,cl
- mov ah,01h
- int 21h
- mov cl,4
- shl al,cl
- mov cl,4
- ror al,cl
- or bh,al
- mov ah,01h
- int 21h
- mov bl,al
- mov cl,4
- shl bl,cl
- mov ah,01h
- int 21h
- mov cl,4
- shl al,cl
- mov cl,4
- ror al,cl
- or bl,al
- ;taking 16 bit number input
- ;displaying number in dos
- mov ax,bx
- mov bx,10
- xor cx,cx
- .a:
- xor dx,dx
- div bx
- push dx
- inc cx
- test ax,ax
- jnz .a
- .b:
- pop dx
- add dl,"0"
- mov ah,02h
- int 21h
- loop .b
- exit:
- mov ah,4ch
- int 21h
- main endp
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement