Draw a clock: Difference between revisions
Content deleted Content added
Kinitawowi (talk | contribs) No edit summary |
Kinitawowi (talk | contribs) No edit summary |
||
Line 4,629: | Line 4,629: | ||
</pre> |
</pre> |
||
=={{header|ZX Spectrum Basic}}== |
=={{header|ZX Spectrum Basic}}== |
||
Chapter 18 of the BASIC manual supplied with the ZX Spectrum includes two programs to implement |
Chapter 18 of the BASIC manual supplied with the ZX Spectrum includes two programs to implement a clock - each uses different timing methods. The first - using a PAUSE command to hold for a second - is far less accurate, while the second - reading the three-byte system frames counter - is more CPU hungry (since ZX Spectrum Basic can't multitask, this doesn't really matter). With a tweak, the second is shown below. |
||
<lang zxbasic>10 REM First we draw the clock face |
<lang zxbasic>10 REM First we draw the clock face |
||
20 FOR n=1 TO 12 |
20 FOR n=1 TO 12 |