mirror of
https://github.com/FDOS/kernel.git
synced 2025-09-26 03:09:18 +02:00
Workaround for y2k BIOS bugs at the only location where FreeDOS
reads the BIOS (CMOS RTC) date (at boot). Note that according to RBIL, DRDOS would even hook int 1a ah=4 to force a correct year. /* A BIOS with y2k (year 2000) bug will always report year 19nn */ if ((dosregs.c.x >= 1900) && (dosregs.c.x < 1980)) dosregs.c.x += 100; git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1359 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
26f116a217
commit
bfb40c4b1c
@ -58,6 +58,8 @@ void Init_clk_driver(void)
|
||||
dosregs.a.b.h = 0x2b;
|
||||
dosregs.c.x = 100 * InitBcdToByte(regsD.c.b.h) /* century */
|
||||
+ InitBcdToByte(regsD.c.b.l);/* year */
|
||||
/* A BIOS with y2k (year 2000) bug will always report year 19nn */
|
||||
if ((dosregs.c.x >= 1900) && (dosregs.c.x < 1980)) dosregs.c.x += 100;
|
||||
dosregs.d.b.h = InitBcdToByte(regsD.d.b.h); /* month */
|
||||
dosregs.d.b.l = InitBcdToByte(regsD.d.b.l); /* day */
|
||||
init_call_intr(0x21, &dosregs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user