Alarm Clock

See all articles from ZX-Appeal Feb 89
Author(s): Kevin Leung
Publication: ZX-Appeal
Pub Details: ZX-Appeal Feb 89
Date: February 1989
Pages: 18

This is a program that will get you up in the morning, or any other time. The program is written in basic so it should be easy to follow. If you do not want the alarm feature, just put (0) for the alarm time. If you are a heavy sleeper, just insert the mic plug into the ear jack and then you can set the sound level. (If you want to speed up or slow down the clock, change line 101 to Pause 75, 125, etc.). The program has an auto-run feature once it has been loaded.

NOTE: This program is for the 2068 only……………………..

   1 PRINT "bell hr?"
2 INPUT ah
3 CLS
4 PRINT "min bell?"
5 INPUT am
9 CLS
10 PRINT "hr?"
20 INPUT h
25 IF h>12 THEN GO TO 9
30 CLS
40 PRINT "min?"
50 INPUT m
55 IF m>60 THEN GO TO 30
56 CLS
60 PRINT "sec?"
63 GO TO 80
70 INPUT s
75 IF s>60 THEN GO TO 56
80 CLS
90 PRINT AT 10,10;h;" ";m;"";s
100 LET s=s+1
101 PAUSE 100
105 IF s<>61 THEN GO TO 80
106 IF s=61 THEN LET s=0
110 IF s=61 THEN GO TO 120: GO TO 80
120 LET m=m+1
125 IF ah=h AND am=m THEN GO TO 9000
130 IF m=61 THEN LET m=0
140 IF m=60 THEN GO TO 160
150 GO TO 80
160 LET h=h+1
161 IF h=13 THEN LET h=1
162 IF ah=h AND am=m THEN GO TO 9000
163 GO TO 80
9000 BEEP 10,50
9500 LET s=s+50
9900 GO TO 80
9990 STOP
9995 SAVE "al clock" LINE 1
9999 REM By Kevin Leung

Reprinted from the Jul-Aug/87 issue of TIMELINZ

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.