home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / ansi / avatar1.arj / DEMO2.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-07-19  |  1.8 KB  |  76 lines

  1. include avatar.inc
  2.  
  3. AVTbegin                ;; Begin an Avatar program
  4.  
  5. ; Music for the heart
  6.  
  7. play            A, 0, 14        ;; The '0' means middle octave
  8. pause           2
  9. play            A, 0, 1
  10. pause           1
  11. play            A, 0, 1
  12. pause           1
  13. play            C, 1, 12        ;; The '1' is one octave above middle
  14. pause           2
  15. play            C, 1, 1
  16. pause           1
  17. play            C, 1, 1
  18. pause           1
  19. play            E, 1, 8
  20. pause           1
  21. play            C, 1, 8
  22. pause           1
  23. play            A, 0, 16
  24. pause           1
  25.  
  26. moveup                  ;; move cursor one line up
  27. cleol                   ;; clear the rest of line
  28.  
  29. moveup                  ;; move cursor one line up
  30. cleol                   ;; clear the rest of line
  31.  
  32. ;; We create a true window and switch to it
  33.  
  34. newwindow       'A', 15, 7, 15, 18, 65
  35. locate          1, 1    ;; move in the upper left corner
  36.  
  37. ;; Frame the window by writing in clockwise direction
  38.  
  39. clockwise       '╔══╡AVATAR window╞'
  40. repeatchar      205, 32
  41. write           187
  42. repeatchar      186, 10
  43. write           188
  44. repeatchar      205, 49
  45. write           200
  46. repeatchar      186, 10
  47.  
  48. ;; Now we shrink current window by one at each end, so the frame
  49. ;; will not be written over. We also clear the window.
  50.  
  51. setwindow       'A', 15, 8, 16, 17, 64
  52. cls
  53.  
  54. ;; Let's also play some tune after we exit this program
  55.  
  56. play            A, 0, 1
  57. pause           1
  58. play            E, 1, 12
  59. pause           1
  60. play            A, 0, 1
  61. pause           2
  62. play            A, 0, 1
  63. pause           1
  64. play            E, 1, 12
  65. pause           1
  66. play            A, 0, 1
  67. pause           2
  68. ;play            A, 0, 1
  69. ;pause           1
  70. play            A, 0, 16
  71. pause           1
  72. play            A, 0, 2
  73.  
  74. AVTend                  ;; End the Avatar program
  75.  
  76.