home *** CD-ROM | disk | FTP | other *** search
/ Avalon 8 / Avalon_08_1996-02_Avalon.d64 / clock (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  59 lines

  1. 3 x$=chr$(34)
  2. 4 q$=x$+"string"+x$
  3. 5 sys4096
  4. 10 poke53280,6:poke53281,0:gosub2030
  5. 30 print" [212]his program will continually display
  6. 40 [153]" an accurate 24-hour digital clock in"
  7. 50 [153]" the border just below the bottom of
  8. 60 print" the normal screen. [212]he display is in
  9. 70 [153]" the normal syshours:mins:secsopen format with
  10. 80 print" [158][193][205][159]/[158][208][205][159] being indicated by a small box
  11. 90 [153]" to the right of the time.
  12. 100 gosub 2000
  13. 110 print" [212]he program is stored in memory at"
  14. 120 print" [158]$[195]000-$[195]280[159] ([158]49152-49792[159]). [217]ou can use
  15. 130 [153]" these commands to change the clock:"
  16. 150 [153]" sys(NULL)(NULL)(NULL) 49152open"
  17. 160 [153]" str$isplay the clock at the bottom of the
  18. 170 print" screen. [212]his is necessary if you have
  19. 180 [153]" pressed run/stop-restore."
  20. 190 [141]2000
  21. 200 [153]"sys (NULL)(NULL)(NULL) 49152,"q$
  22. 210 [153]"open (NULL)ets the clock to the time specified
  23. 220 print" in [158]"q$"[159]. [212]he format is the same as
  24. 230 [153]" is used to set (NULL)right$$, that is syshhmmssopen. right$n
  25. 240 print" addition, if the first character in
  26. 250 [153]" the string is an sys@open, then the time will
  27. 260 print" be displayed in reverse video."
  28. 270 gosub2000
  29. 300 print"[158] [211][217][211] 49152,colour"
  30. 310 print"[159] [195]hanges the colour of the clock. [212]he
  31. 320 [153]" colour given in the (NULL)(NULL)(NULL) command is a
  32. 330 print" standard colour code from 0-15."
  33. 340 print" [158][206][207][212][197]:[159] [212]he last two commands can be
  34. 350 [153]" combined into a single command like:
  35. 360 print" [158][211][217][211] 49152,"x$"@043000"x$",6[159]."
  36. 390 gosub 2000
  37. 400 print" [215]hen the clock is running, [212][201]$ is no
  38. 410 [153]" no longer accurate since the program
  39. 420 print" makes use of raster interrupts. [193]lso,
  40. 430 [153]" sprites 0,1 and 2 are used to display
  41. 440 print" the clock so these should not be used."
  42. 450 print" [198]inally, the sprite data is stored in
  43. 460 [153]" memory from 832-1023 so this area is
  44. 470 print" not available for machine-code etc."
  45. 480 gosub 2000
  46. 490 print " [208]lease enter the correct time below."
  47. 500 print"sys49152,"x$:print"[145][145][145][145][158]"
  48. 510 fort=631to640:poket,29:next:poke198,10
  49. 600 end
  50. 1900 gosub2000
  51. 1990 end
  52. 2000 poke214,22:print:print"        [208]ress [158][211][208][193][195][197][159] to continue"
  53. 2010 geta$:ifa$<>""then2010
  54. 2020 geta$:ifa$<>" "then2020
  55. 2025 :
  56. 2030 print"[147][153]    [212]he [195]ommodore 64 [201]nvisible [195]lock"
  57. 2040 print "         by[158] [197]dward [195]arroll 1986[159]"
  58. 2050 return
  59.