Advertisement
Guest User

Untitled

a guest
Feb 6th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .386
  2. .main
  3. org 100h
  4.  
  5. .MODEL SMALL
  6. .STACK 200
  7. .DATA
  8. temperature DB 0dh,0ah,"$"
  9. prompt1 DB "Enter celcius:","$"
  10. prompt2 DB "In Fahrenheit:","$"
  11. prompt3 DB ".","$"
  12. result DB ?
  13. Name1 DB ?
  14. XLNAME Dw ?
  15. y DW 8
  16. x DW 1
  17. z dw 10
  18.  
  19. .code
  20. .startup
  21.  
  22. lea dx,prompt1
  23. mov ah,09h
  24. int 21h
  25.  
  26. mov ah,01h
  27. int 21h
  28.  
  29. sub al,30h
  30. mov Name1,al
  31.  
  32. lea dx,crlf
  33. mov ah,09h
  34. int 21h
  35.  
  36. mov al,Name1
  37. mul x
  38. mov x1,ax
  39. mov al,c
  40. mul y
  41. idiv z
  42. add al,c
  43. add al,32
  44. mov result,al
  45.  
  46. lea dx,prompt2
  47. mov ah,09h
  48. int 21h
  49.  
  50. mov dl,result
  51. add ah,02h
  52. int 21h
  53.  
  54. .exit
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement