Advertisement
Guest User

1234

a guest
Nov 19th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1.  
  2. ; You may customize this and other start-up templates;
  3. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  4.  
  5. org 100h
  6. .data
  7. a db ?
  8. b db ?
  9. r db ?
  10. m1 db "Digita il primo numero",13,10,"$"
  11. m2 db "Digita il secondo numero",13,10,"$"
  12. m3 db " e' maggiore di $"
  13. m4 db "",13,10,"$"
  14. m5 db " e' minore di $"
  15. m6 db "I due numeri sono uguali",13,10,"$"
  16.  
  17. .code
  18.  
  19. mov dx,offset m1
  20. mov ah,9
  21. int 21h
  22.  
  23. mov ah,1
  24. int 21h
  25. mov a,al
  26.  
  27. mov dx,offset m4
  28. mov ah,9
  29. int 21h
  30.  
  31. mov dx,offset m2
  32. mov ah,9
  33. int 21h
  34.  
  35. mov ah,1
  36. int 21h
  37. mov b,al
  38.  
  39. mov dx,offset m4
  40. mov ah,9
  41. int 21h
  42.  
  43. mov al,a
  44. CMP al,b
  45. JG primomaggiore
  46. JE uguali
  47.  
  48. mov ah,2
  49. mov dl,a
  50. int 21h
  51.  
  52. mov dx,offset m5
  53. mov ah,9
  54. int 21h
  55.  
  56. mov ah,2
  57. mov dl,b
  58. int 21h
  59.  
  60. JMP exit
  61. primomaggiore:
  62. mov ah,2
  63. mov dl,a
  64. int 21h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement