home *** CD-ROM | disk | FTP | other *** search
/ Go64! / Go64_2001-04_2001_CSW_Side_A.d64 / dcf-uhr (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  1KB  |  56 lines

  1. 1 rem open1,8,15,"s:dcf0.1.bas":close1:save"dcf0.1.bas",8
  2. 2 goto 2000
  3. 100 m=e(21)+e(22)*2+e(23)*4+e(24)*8
  4. 101 m=m+e(25)*10+e(26)*20+e(27)*40
  5. 110 s=e(29)+e(30)*2+e(31)*4+e(32)*8
  6. 111 s=s+e(33)*10+e(34)*20
  7. 120 t=e(36)+e(37)*2+e(38)*4+e(39)*8
  8. 121 t=t+e(40)*10+e(41)*20
  9. 130 w=e(42)+e(43)*2+e(44)*4
  10. 140 k=e(45)+e(46)*2+e(47)*4+e(48)*8
  11. 141 k=k+e(49)*10
  12. 150 j=e(50)+e(51)*2+e(52)*4+e(53)*8
  13. 210 rem prints":"m"    "w"  "t":"k":"j
  14. 230 :print:goto3000
  15. 2000 dim d(59),e(59),u(30)
  16. 2001 poke56578,59
  17. 2002 gosub4100
  18. 2010 fori=0to59
  19. 2020 ti$="000000"
  20. 2030 wait56576,4,4
  21. 2040 if ti>100 then d(i)=3:a=i
  22. 2050 ti$="000000"
  23. 2060 if a>38 theni=59
  24. 2070 wait56576,4
  25. 2080 ifti>7 then d(i)=1
  26. 2090 printchr$(d(i)+48);
  27. 2100 next
  28. 2110 fori=0toa-1:e(i+59-a)=d(i):next
  29. 2120 fori=ato59:e(i-a)=d(i):next
  30. 2200 rem print:fori=0to 59:printchr$(e(i)+48);:next:print:goto100
  31. 2201 goto100
  32. 3000 m=m-1
  33. 3010 ifw=7then w=0
  34. 3020 if s>12 then s=s-12:ap=1
  35. 3030 if s=0 then s=12:ap=0
  36. 3040 se=59-a
  37. 3070 f$="t-wd"+chr$(w)+chr$(j)+chr$(k)+chr$(t)+chr$(s)+chr$(m)+chr$(se)+chr$(ap)
  38. 3075 foru=4to29 :ifu(u)=0then3130
  39. 3080 open15,u,15,f$:close15
  40. 3100 open15,u,15,"t-ra"  :printright$(" "+str$(u),2)" ";
  41. 3110 get#15,a$:printa$;:ifst-64goto3110
  42. 3130 close15:next:end
  43. 4000 print#15,"t-rd"
  44. 4010 get#15,wd$:if wd$="3"thenprinttab(20)"[145]no clock":return
  45. 4020 printtab(20)"[145]change clock?";
  46. 4030 input"   y[157][157][157]";a$
  47. 4040 if a$<>"n"thenu(u)=1
  48. 4050 return
  49. 4100 foru=4to28
  50. 4110 open15,u,15:close15
  51. 4120 if st<>0then4160
  52. 4130 open15,u,15,"ui"
  53. 4140 input#15,a$,a$ :printright$(" "+str$(u),2)" "left$(a$,15)
  54. 4150 if left$(a$,3)="cmd"thengosub 4000
  55. 4160 close15: next :return
  56.