1
0
mirror of https://github.com/mbirth/gwbasic.git synced 2024-11-10 07:16:46 +00:00
gwbasic/TIMER/TIMER.BAS

63 lines
3.1 KiB
QBasic
Raw Normal View History

10 CLS
20 COLOR 15
30 LOCATE 2,13:PRINT"1"
40 LOCATE 3,13:PRINT"10"
50 LOCATE 4,13:PRINT"100"
60 LOCATE 5,13:PRINT"1000"
70 LOCATE 6,1:COLOR 10:PRINT"12345";:COLOR 14:PRINT"678";:COLOR 12:PRINT"9"
80 A=0
90 A=A+1
100 LOCATE 1,1
110 COLOR 15
120 PRINT USING "#";I;H;G;F;E;D;C;B;A
130 IF A=0 THEN LOCATE 2,1:COLOR 10:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":SOUND 3000,.25
140 IF A=1 THEN LOCATE 2,1:COLOR 10:PRINT"5":SOUND 3000,.25
150 IF A=2 THEN LOCATE 2,1:COLOR 10:PRINT"55":SOUND 3000,.25
160 IF A=3 THEN LOCATE 2,1:COLOR 10:PRINT"555":SOUND 3000,.25
170 IF A=4 THEN LOCATE 2,1:COLOR 10:PRINT"5555":SOUND 3000,.25
180 IF A=5 THEN LOCATE 2,1:COLOR 10:PRINT"55555":SOUND 3000,.25
190 IF A=6 THEN LOCATE 2,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"5":SOUND 3000,.25
200 IF A=7 THEN LOCATE 2,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"55":SOUND 3000,.25
210 IF A=8 THEN LOCATE 2,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555":SOUND 3000,.25
220 IF A=9 THEN LOCATE 2,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555";:COLOR 12:PRINT"5":SOUND 3000,.25
230 IF B=0 THEN LOCATE 3,1:COLOR 10:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
240 IF B=1 THEN LOCATE 3,1:COLOR 10:PRINT"5"
250 IF B=2 THEN LOCATE 3,1:COLOR 10:PRINT"55"
260 IF B=3 THEN LOCATE 3,1:COLOR 10:PRINT"555"
270 IF B=4 THEN LOCATE 3,1:COLOR 10:PRINT"5555"
280 IF B=5 THEN LOCATE 3,1:COLOR 10:PRINT"55555"
290 IF B=6 THEN LOCATE 3,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"5"
300 IF B=7 THEN LOCATE 3,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"55"
310 IF B=8 THEN LOCATE 3,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555"
320 IF B=9 THEN LOCATE 3,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555";:COLOR 12:PRINT"5"
330 IF C=0 THEN LOCATE 4,1:COLOR 10:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
340 IF C=1 THEN LOCATE 4,1:COLOR 10:PRINT"5"
350 IF C=2 THEN LOCATE 4,1:COLOR 10:PRINT"55"
360 IF C=3 THEN LOCATE 4,1:COLOR 10:PRINT"555"
370 IF C=4 THEN LOCATE 4,1:COLOR 10:PRINT"5555"
380 IF C=5 THEN LOCATE 4,1:COLOR 10:PRINT"55555"
390 IF C=6 THEN LOCATE 4,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"5"
400 IF C=7 THEN LOCATE 4,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"55"
410 IF C=8 THEN LOCATE 4,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555"
420 IF C=9 THEN LOCATE 4,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555";:COLOR 12:PRINT"5"
430 IF D=0 THEN LOCATE 5,1:COLOR 10:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
440 IF D=1 THEN LOCATE 5,1:COLOR 10:PRINT"5"
450 IF D=2 THEN LOCATE 5,1:COLOR 10:PRINT"55"
460 IF D=3 THEN LOCATE 5,1:COLOR 10:PRINT"555"
470 IF D=4 THEN LOCATE 5,1:COLOR 10:PRINT"5555"
480 IF D=5 THEN LOCATE 5,1:COLOR 10:PRINT"55555"
490 IF D=6 THEN LOCATE 5,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"5"
500 IF D=7 THEN LOCATE 5,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"55"
510 IF D=8 THEN LOCATE 5,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555"
520 IF D=9 THEN LOCATE 5,1:COLOR 10:PRINT"55555";:COLOR 14:PRINT"555";:COLOR 12:PRINT"5"
530 IF I=9 THEN I=0:PRINT" OVERFLOW"
540 IF H=9 THEN H=0:I=I+1
550 IF G=9 THEN G=0:H=H+1
560 IF F=9 THEN F=0:G=G+1
570 IF E=9 AND D=9 AND C=9 AND B=9 AND A=9 THEN E=-1:F=F+1
580 IF D=9 AND C=9 AND B=9 AND A=9 THEN D=-1:E=E+1
590 IF C=9 AND B=9 AND A=9 THEN C=-1:D=D+1
600 IF B=9 AND A=9 THEN B=-1:C=C+1
610 IF A=9 THEN A=-1:B=B+1
620 GOTO 90