<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 20 Mar 2006 10:53:24 +0000 (GMT)
From   : Greg Cook <debounce@...>
Subject: Re: Web site: Mainly Master 512

On Sun, 19 Mar 2006 13:42:05 +0000, Ian Wolstenholme
<BBCMailingList@...> wrote:

> All this talk of Master 512s prompted me to dig out my spare one
> which had been sandwiched between my dead MDFS and A3000 for
> about two years!
> 
> I've connected up a hard disc with a 20MB partition and it is
> certainly
> a great improvement on booting from floppy!
> 
> I'm having a problem with the date, though, as it likes to think that
> it's
> 2130, although the time is correct.  If I set the date, it is OK but
> I seem
> to have to do this every time I boot the machine.  Does anybody else
> have this problem and is there a cure?

Had the same thing happen on the A310, I wrote some Basic to restore
the year at boot time, correcting it if a New Year had occurred since
the date it was last booted.  Worked automatically if run at least once
a year.

Here's the code (BASIC V, sorry) quickly translated from binary:

this_time$=TIME$
REM Get last run time from config file into last_time$
:
this_year%=FNread_year(this_time$)
last_year%=FNread_year(last_time$)
IF this_year%<last_year% THEN
this_month%=FNread_month(this_time$)
last_month%=FNread_month(last_time$)
IF this_month%<last_month% THEN last_year%+=1
IF this_month%=last_month% THEN
this_date%=FNread_date(this_time$)
last_date%=FNread_date(last_time$)
IF this_date%<last_date% THEN last_year%+=1
ENDIF
REM New year must not occur during this statement!
OSCLI"Set Sys$Year "+STR$(FNread_year(TIME$)-this_year%+last_year%)
ENDIF
PROCsave_settings

"Function definitions are left as an exercise for the reader."

Greg Cook
debounce@...        
http://homepages.tesco.net/~rainstorm/



               
___________________________________________________________ 
Yahoo! Photos – NEW, now offering a quality print service from just 8p a
photo http://uk.photos.yahoo.com
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>