zero when you initialise the system. A simple BASIC program of the
type listed below would let you set the clock and read it. Because
of the disabling of interrupts by NAS-DOS this clock will lose time
during disc access. However, for many timing applications this does
not present any problems, and it is a cheap and easy way of getting
a clock/timer on the computer. Naturally this type of clock will
not run when the computer is turned off, and the time data is lost.
The next memory location (CCA4) contains the buffer length, normally
the maximum permitted value of 48 (decimal). You can reduce this if
you wish – down to one to prevent typing ahead.
Note that there is a jump vector at C80C. This currently points to
a RET instruction, which will be executed every 1/50 second. You
could put in this vector a jump to your own routine to be executed
every 1/50 of a second. You can try using this to display the time
on the top line of the screen, and update it every second. Note
that in adding such a routine you should be careful not to change
any registers, or to make excessive use of the stack.
4. Clock read/set from BASIC
The current time can be displayed by typing RUN. To set the clock
you should type RUN 100.