Date : Mon, 20 Mar 2006 21:14:31 -0000
From : "David Harper" <dl.harper@...>
Subject: Re: Web site: Mainly Master 512
Sprow wrote:
>> >> I'm having a problem with the date, ...
>> >> Does anybody else
>> >> have this problem and is there a cure?
>
>> 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.
>
> So you want Doomsday (or equivalent) to make the time read right, then a
> small patch in the Tube code to stop it writing the date back. Setting the
> time and date is part of "command.com" isn't it? So it should be patchable
> on disc, else a few pokes to the 6502 side.
I think it will be best done on the 512's side. It will be less messy than
patching the 6502's code, and could easily be done as a fix to load with
autoexec.bat. I prefer to do things that way when possible than actually to
patch DOS-Plus. (It is easier to reverse if I make a bodge of it.)
Oddly the command.com "date" function writes the date to CMOS when required,
but it only reads it from the DOS system clock. (Both of these sections of
code seem to work as they should.) The reading of the date and time from
CMOS must be done in the boot sequence somewhere, and this is the section
that is wrong.
> I think the PC cards for Risc PCs had a similar problem, and their
> solution
> was to dynamically alter the "autoexec.bat" to set the time every time it
> booted, though being floppy based the M512 might end up grinding a hole in
> the surface!
Yes, it needs something done in autoexec.bat. But you can't just write the
date - it doesn't work properly after 1999. That's why we need a special fix
for it.
I might have a go if I get some time over the next few days. All that would
be needed would be a little routine that will read the date from CMOS, add
100 years if it is before 1980, convert it into the right format and store
it in the right place in the System Data Segment. (It ought to be possible
to write it in using BIOS Interrupt 1Ah, but there is a bug in the DOS-Plus
code for that and you can only use it to read the system clock, not to write
it or to access the CMOS clock.)
David Harper