
Apple II Computer Info
or ProDOS doesn't have a driver for the clock.
The drawback of this method, of course, is that you only get one-minute
resolution. If you want to time events more accurately than that, you'll
have to use more complicated methods.
The GS clock can provide one-second resolution. The easiest (and only
Officially Suppored) way to get it is to call the Miscellaneous Toolset.
Again, you need to CALL a machine-language routine:
clc ; switch to native mode
xce
rep #$30
pha ; push space for result
pha
pha
pha
ldx #$0D03 ; ReadTimeHex
jsl $E10000
sec ; back to emulation mode
xce
ldx #7 ; pop results and save
l1 pla
sta $200,X
dex
bpl l1
rts
This routine leave the clock values in the following memory locations:
PEEK(512) -- weekday (1..7, 1=Sunday)
PEEK(513) -- (not used)
PEEK(514) -- month (0..11)
PEEK(515) -- day (0..30)
PEEK(516) -- year minus 1900
PEEK(517) -- hour (0..23)
PEEK(518) -- minute (0..59)
PEEK(519) -- second (0..59)
(Sorry...no BASIC example this time. I'm not feeling quite ambitious
enough to hand-assemble that machine language and convert it to DATA
statements.)
- Neil Parker
--
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker
"Evolution is vastly overrated." -- Ambassador Delenn, _Babylon_5_
###################################################### E N D O F F I L E
### clocks
###################################################### E N D O F F I L E
Apple II Computer Technical Information : Apple II Family Hardware Info
ftp://ground.ecn.uiowa.edu/2/apple2/miscinfo/hardware : May 2001 : 68 of 572
Comentários a estes Manuais