8-Bit Software Online Conversion

:0.M.Time - Listing

10REM A TIME SIMULATER DEMO 20REM FOR THE BBC MICROCOMPUTER 30REM BY ANDREW YORK IN 1995 40::REM HERE ARE THE INSTRUCTIONS: 60::REM PRESS 'A' TO SET TIME ALARM 80REM PRESS 'Q' TO STOP TICKING 90REM PRESS 'S' TO START TICKING 100REM PRESS 'E' TO EXIT PROGRAM 110REM PRESS ESCAPE TO RUN PROGRAM 120REM ANY OTHER KEY MOVES TIME 130::REM-- ROGRAM-STARTS-HERE---- 150::ONERROR GOTO 710 170M%=7:REM MODE 180HOURS=0:MINUTES=0:SECS=0:a=100:b=10 0 :c=100 :d=0 :MODEM% : REM SET MOD 260VDU23;10,32;0;0;0:REM STOPS CURSER 270PRINTTAB(8,5);" A TIME SIMULATOR" : REPEAT:PRINTTAB(15,8);HOURS;":";MINUTES; " ";SECS;" ":IF HOURS=a AND MINUTES=b AND SECS=c THEN PROCalarm 310IF d=0 THEN *M.1 320IF d=0 THEN *M.0 330REM LINES 300 AND 310 MAKES TICKING 340T$=INKEY$(100):IF T$="A" THEN PROCs etalarm 360IF T$="Q" THEN PROCtickoff 370IF T$="S" THEN PROCtickon 380IF T$="E" THEN MODE7:*FX200,0 390IF T$="E" THEN *FX4,0 400IF T$="E" THEN PRINTCHR$(129);"BYE. .":END 410SECS=SECS+1 :IF SECS=60 THEN MINUT ES=MINUTES+1:SECS=00 430IF MINUTES=60 THEN HOURS=HOURS+1:MI NUTES=0:SECS=00:VDU7 440UNTIL FALSE 450DEFPROCsetalarm:SOUND 1,19,10,2 :PR INTTAB(10,10);" SETTING ALARM " :INPUTTA B(10,12);" HOUR ? :"a:INPUTTAB(10,14);" MINUTE ? :"b:INPUTTAB(10,16);" SECOND ? :"c :PRINTTAB(10,10);" " 510PRINTTAB(10,12);" ":PRINTTAB(10,14);" " :PRINTTAB(10,16);" ":ENDPROC 550DEFPROCtickoff:d=1: REM TICKING OFF 570ENDPROC 580DEFPROCtickon:d=0: REM TICKING ON 600ENDPROC 610DEFPROCalarm:CLS:PRINTTAB(12,7);CHR $(141);" ALERT":PRINTTAB(12,8);CHR$(141 );" ALERT":PRINTTAB(5,10);CHR$(141);" T HE ALARM HAS GONE OFF":PRINTTAB(5,11);CH R$(141);" THE ALARM HAS GONE OFF":PRINTT AB(15,13);HOURS;":";MINUTES;" ";SECS;" " 660ENVELOPE 2,1,2,-2,2,10,20,10,1,0,0, -1,100,100:SOUND1,2,100,100000:REM ALARM SOUND 670REPEAT:SOUND1,2,100,100000:SOUND1,2 ,100,100000:SOUND1,2,100,100000 :SOUND 1,2,100,100000:VDU7:UNTIL FALSE :ENDPR OC 710ONERROR OFF 720IF ERR=17 THEN RUN 730MODE7:*FX200,0 740*FX18 750VDU7:REPORT:PRINT" AT SILLY LINE "; ERL :END