8-Bit Software Online Conversion
Rondo alla Turca - Listing
10REM W.A.Mozart - Rondo Alla Turca
20REM for 8-Bit Software
30REM by M.Bobrowski 9'91
40
50IF PAGE>&1D00 PRINT'"Reset PAGE val
ue."'"PAGE must be &1D00 or lower.":END
60MODE0:VDU23,1,0;0;0;0;19,1,3;0;:HIM
EM=TOP+&100:H%=HIMEM
70DIM ch%(3),e%(2),note%(2):ch%(0)=H%
:ch%(1)=H%+&692:ch%(2)=H%+&9E4
80ENVELOPE1,3,0,0,0,0,0,0,127,-5,-2,-
20,120,80
90*L.S.Mozart1 3000
100X=INKEY(300):PROCplay
110END
120
130DEFPROCplay
140FORC%=0TO2:note%(C%)=0:e%(C%)=0:NEX
T
150REPEAT
160IF ADVAL(-6)>0 PROCsound(0)
170IF ADVAL(-7)>0 PROCsound(1)
180IF ADVAL(-8)>0 PROCsound(2)
190UNTIL e%(0) AND e%(1) AND e%(2)
200ENDPROC
210
220DEFPROCsound(C%)
230P%=ch%(C%)?(note%(C%)*2):D%=ch%(C%)
?(note%(C%)*2+1)
240IF P%=255 e%(C%)=TRUE:ENDPROC
250IF P%=0 E%=0 ELSE E%=1
260SOUND C%+1,E%,P%,D%
270note%(C%)=note%(C%)+1
280ENDPROC