User Tools

Site Tools


back to blog...


I would have thought that a simple tea timer program would have been written for the Commodore by now. But try as I could, I didn't find anything like I was looking for. I found a few alarm clock programs, but nothing like a simple countdown timer. So, I decided to go and write one for myself.

I didn't want anything fancy, just a way to enter the time I wanted to steep my tea and then have the C64 (or C128) notify me when the time was up.

First, I started off with just doing a simple FOR/NEXT loop to keep track of time, but that soon turned out to be a bit problematic. It was unreliable, as the amount of time it took for the computer to run through the loop depended on what other things it had to process. At least, it was a problem in BASIC, which is what I was using for the program.

So, I had to come up with another method of tracking time. The C64 does have an internal clock, but I wasn't quite sure how to use it for my program. With a little bit of searching on the Net, I found out that the variable for the internal clock was TIME$, or TI$ for short. But the “hiccup” with this is that it's a string variable, not a number.

It took a little bit of time for me to figure out how to take that string variable and use it in my time formula. I knew that BASIC 2.0 did have a way of extracting data out of a string variable, but it's been quite some time since I've done anything like that. So, more time was spent catching up on my BASIC know-how.

After a few hours, though, I was able to finish my little project. Now I have a simple and fool-proof way of making the perfect cup of tea, with the help of my Commodore. Just tell the program how long you wish to steep your tea and an alarm will sound at the appropriate time.

It works on both the C64 and C128 and, because I'm using the Commodore's internal clock to keep track of time, it should work perfectly fine on a PAL system, too (for my friends “across the pond”)! Of course, my little tea timer program can be used for more than just timing tea; use it for boiling eggs, brewing coffee, or baking something in the oven.

If you'd like to give it a try, you can download a disk image with program on it here:
Tea Timer.D64


Comet FriendlyTea Timer is compatible with the Comet64 and the V-1541 virtual disk drive and has been included in the CommodoreServer @PUBLIC/APPS folder.

Composed on my C128 with Archetype.

blog/2019-07-19.txt · Last modified: 2021/09/20 16:41 by David