CH8PR1.LST:

100 REM TIME BUZZER
120 PRINT "ENTER HOURS";
130 INPUT A
140 PRINT "ENTER MINUTES";
150 INPUT B
160 PRINT "ENTER SECONDS";
170 INPUT C
180 D=(A*216000)+(B*3600)+(C*60)
190 POKE 18,0:POKE 19,0:POKE 20,0
200 IF ((PEEK(18)*255*255)+(PEEK( 19)*255)+(PEEK(20)))>D THEN 220
210 GOTO 200
215 REM SET DATA LINES FOR OUTPUT
220 POKE 54018,48
225 POKE 54016,255
230 POKE 54018,52
235 REM SET DATA LINES LOGIC LOW TO TURN ON BUZZER
240 POKE 54016,0
245 POKE 18,0:POKE 19,0:POKE 20,0
250 IF ((PEEK(18)*255*255)+(PEEK( 19)*255)+(PEEK(20)))>300 THEN 270
260 GOTO 250
265 REM SET DATA LINES HIGH TO TURN OFF BUZZER
270 POKE 54016,255
280 REM RESET DATA LINES FOR INPUT
290 POKE 54018,48
300 POKE 54016,0
310 POKE 54018,52

Back to previous page