time.label: DEF DEHEX(x)=INT(10*(x/16)+(6*((x/16)-INT(x/16)))) tswitch=0 timemenu.label: print cls$: print print string$(46,"-") print "* ALARM * CLOCK * TIME * UHR * WECKER * ZEIT *" print "(C) H.Moschitz; P.O.BOX 96; A-8041 GRAZ ; 1988" print string$(46,"-") : print print "... SET TIME / ... ALARM / WECKFUNKTION" print "... SHOW TIME CONTINOUS / ... SHOW TIME " print "... zum Menue / ... zurueck zu CP/M " : print timewahl.label: tswitch=0 : antw=inkey if antw=65 or antw=97 then goto alarm.label: if antw=67 or antw=99 then goto calltime.label: if antw=83 or antw=115 then goto settime.label: if antw=84 or antw=116 then tswitch=1 : goto timeshow.label: if antw=77 or antw=109 then goto menu: if antw=27 then goto exit: goto timewahl.label: settime.label: hadr=64502 : madr=64503 : sadr=64704 PRINT "Zeiteingabe: ";:INPUT "Stunde=";hh INPUT " Minute=";mm INPUT " Sekunde=";ss if hh<0 or mm<0 or ss<0 then print:print uzu$:print: goto settime.label: if hh>23 or mm>59 or ss>59 then print:print uzu$:print:goto settime.label: PRINT:print "Uhr mit beliebiger Taste starten! / Press any key!" antw=INKEY hh=hh/10 : hi=INT(hh) : lo=10*(hh-hi) : hh=16*hi+lo mm=mm/10 : hi=INT(mm) : lo=10*(mm-hi) : mm=16*hi+lo ss=ss/10 : hi=INT(ss) : lo=10*(ss-hi) : ss=16*hi+lo POKE hadr,hh : POKE madr,mm : POKE sadr,ss goto timemenu.label: timeshow.label: gosub calltime.label: : print "Die aktuelle Uhrzeit: ";chr$(7);zeit$ print : call weiter.zum.menu: : goto timemenu.label: calltime.label: hadr=64502 : madr=64503 : sadr=64504 zeit$="" : print esc$+"j"; 440 h=PEEK(hadr):m=PEEK(madr):s=PEEK(sadr) h=dehex(h) : m=dehex(m) : s=dehex(s) zeit$=str$(h)+":"+str$(m)+":"+str$(s) IF oldtime$=zeit$ THEN GOTO 440 if tswitch=1 then return print esc$+"f";esc$+"K"; PRINT esc$+"k";zeit$; : oldtime$=zeit$ if not constat% then goto 440 print esc$+"e"; : goto menu: alarm.label: tswitch=1 gosub calltime.label: : print " Die aktuelle Uhrzeit ist : ";chr$(7);zeit$ print " Bitte Weckzeit eingeben: " input " Stunde: ";ast input " Minute: ";ami input " Sekunde: ";ase if ast<0 or ami<0 or ase<0 then print : print uzu$ : print : goto alarm.label: if ast>23 or ami>59 or ase>59 then print:print uzu$:print : goto alarm.label: INPUT "Bildschirm abschalten Y/N ? ";alascre$ if ucase$(alascre$)="Y" then print cls$;cof$ weckerschleife: gosub calltime.label: if ast=h and ami=m and ase<=s then goto alarmring: ELSE goto weckerschleife: alarmring: if not constat% then print chr$(7); : goto alarmring: print cls$;con$ goto menu: SE goto weckerschleife: alarmring: if not constat% then print chr$(7); : goto alarmring: prin