[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Clock POKE
David Empson made the whip sing this tune to me:
DE| ProDOS doesn't provide any way to set the clock - the built-in
| driver only reads the time. You need a separate program to set the
| clock, and a different one is required for each brand of clock card
There is one possibility if you don't have a clock setup: POKE the
addresses so ProDOS knows what time it is (or was when you did it!).
I'm a little anal and like having the date/approx-time on my files.
The code is as such (HH=hour MM=minute MO=month DD=day YR=year); you can
figure how to phrase the INPUT statements to fill those variables; P$ is
used for A)m or P)m in the 12-hour system (if you use 24, omit 110-120)
and YR is the last two digits of the year (which you can add to line 100
[YR=94] if you don't want to input it every time):
100 A=49040 : B=49041 : C=49043 : D=49042
110 IF P$="P" AND HH < 12 THEN HH=HH+12
120 IF P$="A" AND HH = 12 THEN HH=0
130 POKE B,2 * YR + (MO > 7) : POKE A,DD + 32 * (MO - 8 * (MO > 7)) :
POKE C,HH : POKE D,MM
Note: unlike Commodores, the Apple doesn't keep "keeping" time once
set. My No-Slot "popped" recently; I want a new kind of clock!! <<m3>>
_________________________________________________________
_____( )_____
\ _ | mushroom@prostar.com #7@#24 brian.hammack@rook.wa.com | _ /
>_ (_________________________________________________________) _<
/_______) (_______\
* 2qwk! 1.26b3 * UPLOAD: Taking out the garbage to get more online time.