<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 30 Nov 2000 01:03:59 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: How to set the RTC? [Was: Re: Help us please!]

Isabel Cisternas & Robert Schmidt <rschmidt@...> wrote:
> > Brian Hughes wrote:
> > if we type :
> > *time - we get I,FF  I 19FF.21:41:33
> > we are unable to use the *settime we have tried but we get a bad
> > command
> > how can we set the date ? It does not matter what year as it is used
 
TIME$=new time, eg
TIME$="Wed,30 Nov 2000.16:20:25"
 
It's likely you'll need a new battery pack.  8BS supplies them, try
looking at http://go.to/8bs
 
> The behaviour you're seeing could be related to the problem mentioned
> at: http://www.argonet.co.uk/users/rjsprowson/bbc/doomsday.htm It's
> about a Y2K-bug present in all BBC micros, and a replacement ROM that
> fixes it. It doesn't sound like you'll need that, though.
 
It's not a bug present in the computer, it's a bug present in a huge
number of programs where the author ignored the advice "check the date on
return, it may not be valid", and assumed that the date returned would
always be valid.  It's so easy to do:
 
=>*PrList BLib.Time
REM > BLib.Time 1.00 27-Apr-1989
REM Depend: DIM ctrl% 31:X%=ctrl%:Y%=X%DIV256
:
REM Time And Date Functions
REM ~~~~~~~~~~~~~~~~~~~~~~~
:
REM Return Real-Time-Clock string, or null if no clock available
DEFFNtime:?X%=0:A%=14:CALL&FFF1:IF?X%=0:=""
X%?25=13:X%?15=13:A%=VALMID$($X%,5,2)DIV32
$(X%+11)=STR$(VAL$(X%+11)+16*A%-100*(VAL$(X%+11)<1981))
IFA%:X%?6=13:$(X%+4)=RIGHT$("0"+STR$(VAL$(X%+4)-32),2):X%?6=32
X%?15=46:=$X%
:
[snip]
 
-- 
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
jgh@...                - Running on BBCs & Masters with SJ MDFS FileServer
Z80+6502/CoPro+Tubes/Econet+SJ - - - http://www.mdfsnet.f9.co.uk/User/JGH/
A super computer is a machine that runs an endless loop in just 2 minutes.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>