Advertisement
qberik

лаба 4 задание 3

Dec 22nd, 2022
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. .model small
  2. .stack 100h
  3. .data
  4. select db 13, 10, 'Input 0 for exit',13,10, 'Pritn mark >', 13, 10, "$"
  5. one db ' - Col', "$"
  6. two db ' - Unsatisfactory', "$"
  7. three db ' - Satisfactory',"$"
  8. four db ' - Ok', "$"
  9. five db ' - Excellent', "$"
  10. undef db ' - no mark','$'
  11. .code
  12. start:
  13. mov ax, @data
  14. mov ds, ax
  15. mov ah, 09h
  16. mov dx, offset select
  17. int 21h
  18. mov ah, 01h
  19. int 21h
  20. cmp al, '1'
  21. je c1
  22. cmp al, '2'
  23. je c2
  24. cmp al, '3'
  25. je c3
  26. cmp al, '4'
  27. je c4
  28. cmp al, '5'
  29. je c5
  30. cmp al, '0'
  31. je exit
  32. mov ah, 09h
  33. mov dx, offset undef
  34. int 21h
  35. jmp start
  36. c1:
  37. mov ah, 09h
  38. mov dx, offset one
  39. int 21h
  40. jmp start
  41. c2:
  42. mov ah, 09h
  43. mov dx, offset two
  44. int 21h
  45. jmp start
  46. c3:
  47. mov ah, 09h
  48. mov dx, offset three
  49. int 21h
  50. jmp start
  51. c4:
  52. mov ah, 09h
  53. mov dx, offset four
  54. int 21h
  55. jmp start
  56. c5:
  57. mov ah, 09h
  58. mov dx, offset five
  59. int 21h
  60. jmp start
  61. exit:
  62. mov ax, 4c00h
  63. int 21h
  64. end start
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement