Advertisement
12Me21

AEAAG R16whatever

Jun 4th, 2017
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MOV ex,0
  2. MOV sp,0
  3. SEND ex,0x2007
  4. CALL newline
  5.  
  6. loop:
  7. CALL newline
  8.  
  9. MOV dx,welcome
  10. CALL print
  11. CALL newline
  12.  
  13. MOV dx,name
  14. CALL print
  15. pressenterlumage:
  16. RECV dx,0
  17. SEND ex,dx
  18. CMP dx,10
  19. JNE pressenterlumage
  20. CALL newline
  21.  
  22. MOV dx,died
  23. CALL print
  24. CALL newline
  25. CALL newline
  26.  
  27. agsk:
  28.  
  29. MOV dx,again
  30. CALL print
  31. RECV dx,0
  32. SEND 0,dx
  33. CALL newline
  34.  
  35. ;check Y/N
  36. OR dx,0x20 ;convert to lowercase
  37. CMP dx,115
  38. JG loop
  39.  
  40. MOV dx,yes
  41. CALL print
  42. CALL newline
  43.  
  44. JMP loop
  45.  
  46. ;print w/o line break
  47. print:
  48. MOV cx,[dx]
  49. CMP cx,0
  50. JE exit
  51. SEND 0,cx
  52. add dx,1
  53. JMP print
  54. exit:
  55. RET
  56.  
  57. ;line break
  58. newline:
  59. SEND ex,0x12E0
  60. SEND ex,0x3000
  61. RET
  62.  
  63. welcome:
  64. dw "Welcome to the Awesome Epic"
  65. dw 0x12E0
  66. dw 0x3000
  67. dw "Amazing Adventure Game!"
  68. dw 0
  69. name:
  70. dw "What is your name? "
  71. dw 0
  72. again:
  73. dw "Do you want to play again?(y/n)"
  74. dw 0
  75. died:
  76. dw "You Died."
  77. dw 0
  78. yes:
  79. dw "Yes you do!"
  80. dw 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement