[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No slot clock
In article <1994May3.222433.12943@pro-nsdapple.cts.com>,
Robert Furman <nuke@pro-nsdapple.cts.com> wrote:
> Does anyone know the pokes, peeks to get the day of the week out of a no
> slot clock......
Yes, but it isn't as simple as that. Reading the time out of a no
slot clock requires a rather complicated machine language routine,
which performs a special sequence of memory accesses to the ROM, then
performing another complicated sequence to read the data out. You
cannot do this from a BASIC program (unless the No Slot Clock is under
a ROM on a card in a slot, but even then it would be very very hard).
It is possible that the No Slot Clock driver (patched into ProDOS)
reads the day of week and leaves it sitting around somewhere, but I
doubt it. In fact, I doubt that the software to set the clock will
put a valid day of week into the chip - it probably only sets the
year, month, day, hours, minutes and seconds.
A better solution is to use the date returned by the clock and
calculate the day of week from it. This involves a rather complicated
formula, which I have around here somewhere...
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand