Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. ;taking 16 bit number input
  2. mov ah,01h
  3. int 21h
  4. mov bh,al
  5. mov cl,4
  6. shl bh,cl
  7.  
  8. mov ah,01h
  9. int 21h
  10. mov cl,4
  11. shl al,cl
  12. mov cl,4
  13. ror al,cl
  14. or bh,al
  15.  
  16. mov ah,01h
  17. int 21h
  18. mov bl,al
  19. mov cl,4
  20. shl bl,cl
  21.  
  22. mov ah,01h
  23. int 21h
  24. mov cl,4
  25. shl al,cl
  26. mov cl,4
  27. ror al,cl
  28. or bl,al
  29. ;taking 16 bit number input
  30.  
  31.  
  32. ;displaying number in dos
  33. mov ax,bx
  34. mov bx,10
  35. xor cx,cx
  36. .a:
  37. xor dx,dx
  38. div bx
  39. push dx
  40. inc cx
  41. test ax,ax
  42. jnz .a
  43. .b:
  44. pop dx
  45. add dl,"0"
  46. mov ah,02h
  47. int 21h
  48. loop .b
  49. exit:
  50. mov ah,4ch
  51. int 21h
  52. main endp
  53. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement