Date : Sun, 09 Aug 2009 14:01:07 +0200 (BST)
From : johan@... (Johan Heuseveldt)
Subject: Level 4 FS Y2K query
Hi,
On Wed 05 Aug, Michael Firth wrote:
[...]
> I agree that its the DATE command (its an Acorn one, not my creation!)
> that's wrong,
> but it is querying the file server for the date. Before Johan posted the
> disassembly, it
> wasn't clear which end of the system had the problem.
>
> Do you know of a working version of the *DATE command for the BBC B? (not
> that
> it really matters, but it would be nice to have)
My *Date certainly works on FileStore.
> I have at least two different copies of the DATE command, and both I've
> tried give the
> wrong date, but different wrong dates.
>
> > The FDate BASIC library at http://mdfs.net/blib provides routines
> > to convert file dates to and from human format, eg
> >
> > PROCf_date(X%!15):P.;day%;"/";month%;"/";year%
> >
> > In 6502 code, you'd do something like:
> >
> > LDA ctrl+15:AND #31:STA day
> > LDA ctrl+16:AND #15:STA month
> > LDA ctrl+16:LSR A:LSR A:LSR A:LSR A:STA year
> > LDA ctrl+15:AND #&E0:LSR A:ORA year:STA year
> >
> > giving day=0..31, month=0..15, year=0..127
> >
> That's probably a useful starting point - I'll have a go at creating a
> working version of the
> command, if no one already knows of one.
Well, I /did/ give one in my message of 4th August, didn't I. :-)
Assembled, so ready to go. Both B and Master version.
Indeed using the algoritm from above. I suppose there's only one
correct algorithm.
One question is: Are you sure that the server has the correct time
and date? If not, date stamping is wrong from the start already.
Greetings,
Johan
--
Johan Heuseveldt <johan@... >
aka waarland
The best place is a Riscy place
Let's put the blame where it belongs: On somebody else.