Guest User

Untitled

a guest
Nov 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. .model small
  2.  
  3. .data
  4. rad dw 0010h
  5. result db 0ah,0dh,?,?,?,?,"$"
  6.  
  7. .code
  8. mov ax,@data
  9. mov ds,ax
  10. mov ax,rad
  11. mul rad
  12. mov bx,0003h
  13. mul bx
  14.  
  15. ;dsplay module
  16.  
  17. mov bx,offset convert
  18. call bx
  19. lea dx,result
  20. mov ah,09h
  21. int 21h
  22. mov ah,4ch
  23. int 21h
  24. .exit
  25.  
  26. convert proc near
  27. mov bx,ax
  28. and ah,0f0h
  29. mov cl,04h
  30. ror ah,cl
  31. add ah,30h
  32. mov [result+2],ah
  33.  
  34. mov ah,bh
  35. and ah,0fh
  36. add ah,30h
  37. mov [result+3],ah
  38.  
  39. mov al,bl
  40. and al,0f0h
  41. ror al,cl
  42. add al,30h
  43. mov [result+4],al
  44.  
  45. mov ah,bl
  46. and ah,0fh
  47. add ah,30h
  48. mov [result+5],ah
  49.  
  50. ret
  51. convert endp
  52. end
Add Comment
Please, Sign In to add comment