Classic Computer Magazine Archive COMPUTE! ISSUE 9 / FEBRUARY 1981 / PAGE 134

SYMple Clock

A M. MacKay
Owen Sound, Ontario

There are lots of clock programs around, but this one is a little different, and a lot more useful than most. It is written for a SYM-1 with 4K memory, but will work with a bare board. It is similar in some ways to the one in Issue 1 of Compute II, but doesn't require Basic or a CRT.

While most clock programs using the LED readouts won't do anything else while the clock is running, this one sits at the top of your memory, out of the way of most programs, and quietly ticks away while you and your SYM do other and better things. But when you want the time, either visually or for use by a program, just call it and there it is.

Since a program such as this will likely be stored on tape and loaded when required over the years, no page zero slots are used so you don't have to remember or keep track of them.

The clock runs in 24 hour format. If you prefer 12, change location 0FAB to 12. Then to start the clock, enter the hours, minutes and seconds, with fifteen or twenty seconds lead time, into locations 0FFD, 0FFE and 0FFF respectively. Then enter "GO F3F" and at the exact second hit "CR" and presto! Nothing happens! Ah, but it does. Your clock is running, quietly minding it's own business, eagerly awaiting your summons. Now, to see the time, all you do is hit "SHIFT CALC CR" or "SHIFT 0 CR" or any other "UNRECOGNIZED" command. The time will be displayed for a few seconds, then the readouts will be blanked except for a row of dots. As soon as you see the dots, you can go back to whatever you were doing with your SYM. If you want the time displayed during, and as part of, a program, just use "JSR B9 OF" and there it is.

Most importantly, though, if you want the time for controlling purposes, just call it at 0FFD, 0FFE and 0FFF with your program. It can, at the proper time, sound an alarm, turn off the lights, turn on your lights, and/or whatever makes you happy.

If you don't want clock time, but just the time since your SYM was turned on (actually since the clock started), don't enter anything in 0FFD-F. Just hit "GO F3F CR" and the clock will automatically start at 00 hours 00 minutes 00 seconds.

If your SYM is new, this is a good chance to experiment, changing things to suit your purposes. For example, try moving "DLY" from line 1090 to line 1010 (change "EB" to "D4" at location 0FEA). Your SYM now looks like a cheap digital clock. Now try changing "0A" at location 0FD2 to "1A", then move lines 1070 and 1080 to a new location between lines 1000 and 1010. Do you prefer the display this way?

The theory of operation is similar to that given for my clock article in Compute II no. 1, which required Basic and a CRT. However, the program is somewhat different because the clock in that article kept time in hex, while this one keeps time in decimal. To work in decimal with "SED" you must use ADC or SBC. "INC" just doesn't work.

Your SYM-1 is very powerful by itself, and is the basis for an extremely complex and powerful system. To get the most from it, I urge you to join the SYM-1 Users' Group, P.O. Box 315, Chico, CA 95927. And, of course, subscribe to and keep reading COMPUTE!