<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 20 Mar 2006 13:09:38 -0000
From   : "David Harper" <dl.harper@...>
Subject: Re: Web site: Mainly Master 512

Greg Cook wrote:


>> I'm having a problem with the date, ...
>> 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."

This is not going to work on the Master 512.

The real problem is that the Master host MOS and M512 DOS-Plus react 
differently to the "millennium bug". When these two bugs interact then we 
get this mess of dates.

The obvious thing with the native BBC Master is to ignore the century (or 
get round it with a little software tweak). The machine is quite happy 
thinking we are in 1906, and you can set the day of the week separately from 
the date.

This doesn't work the same in the 512. For this, like all DOS, base date is 
1980, and any dates earlier than that tend to confuse the system.

If you use DATE and tell the machine we are in 2006, DOS-Plus will accept it 
and it will try to write this date to the Master's RTC. There it will be 
stored as (today) 20-03-1906. i.e. the host MOS will just ignore the 
century. DOS-Plus will also be quite happy until the next reboot thinking we 
are in 2006. However, next time you boot up, DOS-Plus will try to read the 
date from the RTC, it will be given this (negative) date that it can't 
understand from the host, and interpret it as a day (not the right one) in 
2130.

I think it is going to need a specially written fix to get round this one. 
It should be possible, but it looks a bit fiddly to get right.

David Harper 
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>