0 ' ASYNC.BA - By Don Corbitt 1/20/85 Club 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE
1 'asynchronous sound command machine code written by Don Corbitt
2 '.BA implementation and modifications by Rick Perry
3 'subroutine 100 loads the code, relocating it to any desired End address
4 'lines 20-70 are a simple Piano demo
5 GOSUB14
6 CLEAR256:CLS:DEFINTA-Z:DIMA(11):A$="cCdDefFgGaAbqQ":RESTORE10:FORI=0TO11:READA(I):NEXT:PRINT:PRINT"Use keys c d e f g a b":PRINT:PRINT"SHIFT for sharp, SPACE for rest,":PRINT:PRINT"Q to exit."
10 DATA4697,4433,4184,3950,3718,3516,3321,3134,2959,2793,2636,2484:'Use gosub100 to load the asynchrounous sound code, then CALL HIMEM,D,FR (for new sound without waiting for completion of previous sound)
11 'or CALL HIMEM+9,D,FR (same as SOUND FR,D except it returns immediately to calling routine without waiting for completion of sound)
12 'or CALL HIMEM+75 to reset (cancel) sound.
13 'This subroutine will return to line 20 of main program