; music.asm by Michael Kohn ; April 25, 1995 .model small .data mess1 db "Michael Kohn and Jeff Blevins song" db 10,10,13,'$' speed db 0 soff db 0 AA dw 2712,0 AArpeg dw 2712, 2280, 1810, 1356,1140,905,678 dw 905, 1140, 1356, 1810, 2280, 2712, 0 CArpeg dw 2280, 1810, 1522, 1140, 905, 761, 570 dw 761, 905, 1140, 1522, 1810, 2280, 0 GArpeg dw 3044, 2416, 2032, 1522, 1208, 1016, 761 dw 1016, 1208, 1522, 2032, 2416, 3044, 0 FArpeg dw 3417, 2712, 2280, 1709, 1356, 1140, 855 dw 1140, 1356, 1709, 2280, 2712, 3417, 0 ARun dw 678, 761, 854, 905, 1016, 1140, 1208 dw 1356, 1522, 1708, 1810, 2032, 2280, 2416,0 APedal dw 678, 761, 678, 854, 678, 905, 678, 1016 dw 678, 1140, 678, 1208, 678, 1356, 678, 1522 dw 678, 1708, 678, 1810, 678, 2032, 678, 2280 dw 678, 2416,0 ATwos dw 2416, 2032, 2280, 1810, 2023, 1708, 1810, 1522, 1708 dw 1356, 1522, 1208, 1356, 1140, 1208, 1016, 1140, 905 dw 1016, 854, 905, 761, 854, 678,0 AFour dw 678, 761, 854, 905, 761, 854, 905, 1016 dw 854, 905, 1016, 1140, 905, 1016, 1140, 1208 dw 1016, 1140, 1208, 1356, 1140, 1208, 1356, 1522 dw 1208, 1356, 1522, 1708, 1356, 1522, 1708, 1810 dw 1522, 1708, 1810, 2032, 1708, 1810, 2032, 2280 dw 1810, 2032, 2280, 2416, 0 .stack 256 .code play proc again: mov bx, [si] cmp bx, 0 je skolnick call note add si, 2 jmp again skolnick: ret play endp note proc in al, 61h mov soff, al ; save speaker port off mov al, 10110110b out 43h, al mov ax, bx out 42h, al mov al, ah out 42h, al in al, 61h or al, 3 out 61h, al mov ah, 86h mov cl, speed mov ch, 0 mov dx, 32768 int 15h mov al, soff out 61h, al ret note endp start: mov bh, 1 mov bl, ds:[80h] cmp bl, 0 je nevermnd mov bh, ds:[82h] sub bh, 48 nevermnd: mov ax, @data mov ds, ax mov speed, bh lea dx, mess1 mov ah, 9 int 21h mov cx, 2 again2: push cx lea si, AArpeg call play lea si, CArpeg call play lea si, AArpeg call play lea si, GArpeg call play lea si, APedal call play lea si, ARun call play lea si, AArpeg call play lea si, ATwos call play lea si, AFour call play pop cx dec cx jnz again2 lea si, AArpeg call play mov ax, 4c00h int 21h end start