You can also use the following to see if the clock is present this works
with out altering any of the clocks port values.
On Exit:
BC= 0 Then no clock
BC=1 Then clock is present
LD BC,0400h ;B= loop count 4 seems to be the
minimum CKTESTLP: XOR A
IN A,(EFh) ;Read unit port of seconds register
AND 0Fh
CP 0Ah
JR NC, NO_CLOCK
DJNZ CKTESTLP
INC C
NO_CLOCK: LD B,0
RET
This can also be converted to BASIC have not got this to hand at the moment.
Richard.
-----Original Message-----
From: Aley Keprt <[EMAIL PROTECTED]>
To: [email protected] <[email protected]>
Date: 08 April 1999 5:06
Subject: RT Clock (was: Re: Sam tech info?)
>>Simon Cooke wrote:
>>> Oh, it's Y2K compliant; but MasterDOS isn't. Try and set a date
>>> in the year 2000 - the source code indicates that you're screwed :-)
>>
>>I was thinking that because it only stored 2 digits for the date that it
>>wasn't, but I suppose it's more of a case of any software that doesn't
>>handle it properly is not compliant. Anyone thought of correcting and
>>rebuilding MasterDOS for next year?
>
>
>MasterDOS 2000? :)))
>
>>I finally figured out your code writes values from 15 to 1 into the year
>>tens value and then read them back to make sure they were all set before
>you
>>take the clock as installed. I was supplying the current date/time but
>>ignoring any writes which failed your check. I've just implemented writes
>to
>>update the ticking clock it's happy :-) (it doesn't update the PC clock
>>btw!).
>
>
>This seems to be clever.
>
>----------------------------------------------------------------
>Aley [eili] Keprt - student, programmer (multimedia soft. etc.)
> phone: +420-68-538 70 35
> e-mail: [EMAIL PROTECTED] *** http://get.to/aley
>----------------------------------------------------------------
>
>
>