mirror of
https://github.com/mbirth/gwbasic.git
synced 2024-11-09 23:06:45 +00:00
136 lines
3.3 KiB
QBasic
136 lines
3.3 KiB
QBasic
|
10 KEY OFF
|
|||
|
20 COLOR 15,0,0
|
|||
|
30 REM *** Hauptroutine ***
|
|||
|
40 CLS
|
|||
|
50 IF TI=2 THEN GOTO 290
|
|||
|
60 PRINT"Bitte geben Sie die genaue Uhrzeit ein"
|
|||
|
70 PRINT"oder dr<64>cken Sie [ENTER] f<>r die interne Uhr"
|
|||
|
80 PRINT
|
|||
|
90 INPUT"Uhrzeit [HH:MM:SS] :",TIM$
|
|||
|
100 IF TIM$="" THEN TIM$=TIME$
|
|||
|
110 IF MID$(TIM$,3,1)<>":" THEN GOTO 150
|
|||
|
120 IF MID$(TIM$,6,1)<>":" THEN GOTO 150
|
|||
|
130 IF LEN(TIM$)<>8 THEN 150
|
|||
|
140 GOTO 190
|
|||
|
150 REM *** Fehler bei eingabe
|
|||
|
160 PRINT:PRINT"Die Zeit wurde falsch eingegeben!!!"
|
|||
|
170 PRINT"Bitte wiederholen Sie den Vorgang!"
|
|||
|
180 GOTO 90
|
|||
|
190 TIME$=TIM$
|
|||
|
200 PRINT
|
|||
|
210 PRINT"Die momentane Uhrzeit ist: "
|
|||
|
220 PRINT TIM$
|
|||
|
230 PRINT
|
|||
|
240 PRINT"Stimmt das [J/N]?"
|
|||
|
250 A$=INKEY$:IF A$="" THEN 250
|
|||
|
260 IF A$="j" OR A$="J" THEN 290
|
|||
|
270 IF A$="n" OR A$="N" THEN 30
|
|||
|
280 GOTO 250
|
|||
|
290 REM *** Anzeigeroutine ***
|
|||
|
300 CLS
|
|||
|
310 LOCATE 2,23:PRINT"<22><>"
|
|||
|
320 LOCATE 4,23:PRINT"<22><>"
|
|||
|
330 LOCATE 2,56:PRINT"<22><>"
|
|||
|
340 LOCATE 4,56:PRINT"<22><>"
|
|||
|
350 Z=VAL(LEFT$(TIME$,1))
|
|||
|
360 X=1
|
|||
|
370 GOSUB 540
|
|||
|
380 Z=VAL(MID$(TIME$,2,1))
|
|||
|
390 X=9
|
|||
|
400 GOSUB 540
|
|||
|
410 Z=VAL(MID$(TIME$,4,1))
|
|||
|
420 X=33
|
|||
|
430 GOSUB 540
|
|||
|
440 Z=VAL(MID$(TIME$,5,1))
|
|||
|
450 X=41
|
|||
|
460 GOSUB 540
|
|||
|
470 Z=VAL(MID$(TIME$,7,1))
|
|||
|
480 X=66
|
|||
|
490 GOSUB 540
|
|||
|
500 Z=VAL(RIGHT$(TIME$,1))
|
|||
|
510 X=74
|
|||
|
520 GOSUB 540
|
|||
|
530 GOTO 350
|
|||
|
540 REM *** Anzeigeroutine ***
|
|||
|
550 IF Z=0 THEN GOSUB 660
|
|||
|
560 IF Z=1 THEN GOSUB 730
|
|||
|
570 IF Z=2 THEN GOSUB 800
|
|||
|
580 IF Z=3 THEN GOSUB 870
|
|||
|
590 IF Z=4 THEN GOSUB 940
|
|||
|
600 IF Z=5 THEN GOSUB 1010
|
|||
|
610 IF Z=6 THEN GOSUB 1080
|
|||
|
620 IF Z=7 THEN GOSUB 1150
|
|||
|
630 IF Z=8 THEN GOSUB 1220
|
|||
|
640 IF Z=9 THEN GOSUB 1290
|
|||
|
650 RETURN
|
|||
|
660 REM NULL - 0
|
|||
|
670 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
680 LOCATE 2,X:PRINT"<22><> <20><>"
|
|||
|
690 LOCATE 3,X:PRINT"<22><> <20><>"
|
|||
|
700 LOCATE 4,X:PRINT"<22><> <20><>"
|
|||
|
710 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
720 RETURN
|
|||
|
730 REM EINS - 1
|
|||
|
740 LOCATE 1,X:PRINT" <20><>"
|
|||
|
750 LOCATE 2,X:PRINT" <20><>"
|
|||
|
760 LOCATE 3,X:PRINT" <20><>"
|
|||
|
770 LOCATE 4,X:PRINT" <20><>"
|
|||
|
780 LOCATE 5,X:PRINT" <20><>"
|
|||
|
790 RETURN
|
|||
|
800 REM ZWEI - 2
|
|||
|
810 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
820 LOCATE 2,X:PRINT" <20><>"
|
|||
|
830 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
840 LOCATE 4,X:PRINT"<22><> "
|
|||
|
850 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
860 RETURN
|
|||
|
870 REM DREI - 3
|
|||
|
880 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
890 LOCATE 2,X:PRINT" <20><>"
|
|||
|
900 LOCATE 3,X:PRINT" <20><><EFBFBD><EFBFBD>"
|
|||
|
910 LOCATE 4,X:PRINT" <20><>"
|
|||
|
920 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
930 RETURN
|
|||
|
940 REM VIER - 4
|
|||
|
950 LOCATE 1,X:PRINT"<22><> <20><>"
|
|||
|
960 LOCATE 2,X:PRINT"<22><> <20><>"
|
|||
|
970 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
980 LOCATE 4,X:PRINT" <20><>"
|
|||
|
990 LOCATE 5,X:PRINT" <20><>"
|
|||
|
1000 RETURN
|
|||
|
1010 REM F<>NF - 5
|
|||
|
1020 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1030 LOCATE 2,X:PRINT"<22><> "
|
|||
|
1040 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1050 LOCATE 4,X:PRINT" <20><>"
|
|||
|
1060 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1070 RETURN
|
|||
|
1080 REM SECHS - 6
|
|||
|
1090 LOCATE 1,X:PRINT"<22><> "
|
|||
|
1100 LOCATE 2,X:PRINT"<22><> "
|
|||
|
1110 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1120 LOCATE 4,X:PRINT"<22><> <20><>"
|
|||
|
1130 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1140 RETURN
|
|||
|
1150 REM SIEBEN - 7
|
|||
|
1160 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1170 LOCATE 2,X:PRINT"<22><> <20><>"
|
|||
|
1180 LOCATE 3,X:PRINT" <20><>"
|
|||
|
1190 LOCATE 4,X:PRINT" <20><>"
|
|||
|
1200 LOCATE 5,X:PRINT" <20><>"
|
|||
|
1210 RETURN
|
|||
|
1220 REM ACHT - 8
|
|||
|
1230 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1240 LOCATE 2,X:PRINT"<22><> <20><>"
|
|||
|
1250 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1260 LOCATE 4,X:PRINT"<22><> <20><>"
|
|||
|
1270 LOCATE 5,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1280 RETURN
|
|||
|
1290 REM NEUN - 9
|
|||
|
1300 LOCATE 1,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1310 LOCATE 2,X:PRINT"<22><> <20><>"
|
|||
|
1320 LOCATE 3,X:PRINT"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
1330 LOCATE 4,X:PRINT" <20><>"
|
|||
|
1340 LOCATE 5,X:PRINT" <20><>"
|
|||
|
1350 RETURN
|
|||
|
|