8-Bit Software Online Conversion
Symphony Number 40 - Listing
10REM Mozart - Symphony No.40
20REM for 8-BS Public Domain
30REM by M.Bobrowski 9'91
40
50MODE0:HIMEM=TOP+&F4:N%=HIMEM
60DIM ch%(3),e%(2),note%(2)
70ENVELOPE1,5,0,0,0,0,0,0,125,-5,-2,-
3,120,100
80ENVELOPE2,1,0,0,0,0,0,0,120,-2,-1,-
1,90,60
90ENVELOPE3,2,0,0,0,0,0,0,125,-5,-2,-
3,100,80
100OSCLI"L.S.Mozart4 3000":VDU23;8202;
0;0;0;
110PROCset`up:PROCplay
120END
130
140DEFPROCset`up
150ch%(0)=N%:FOR J%=1 TO 3
160REPEAT N%=N%+1:UNTIL?N%=&FF
170N%=N%+2:ch%(J%)=N%
180NEXT
190ENDPROC
200
210DEFPROCplay
220FORC%=0TO2:note%(C%)=0:e%(C%)=0:NEX
T
230REPEAT
240IF ADVAL(-6)>0 PROCsound(0)
250IF ADVAL(-7)>0 PROCsound(1)
260IF ADVAL(-8)>0 PROCsound(2)
270UNTIL e%(0) AND e%(1) AND e%(2)
280ENDPROC
290
300DEFPROCsound(C%)
310P%=ch%(C%)?(note%(C%)*2):D%=ch%(C%)
?(note%(C%)*2+1)
320IF P%=255 e%(C%)=TRUE:ENDPROC
330IF P%=0 E%=0 ELSE E%=C%+1
340SOUND C%+1,E%,P%,D%
350note%(C%)=note%(C%)+1
360ENDPROC