Update BIOS time.

Submitted by:	Igor Serikov <bt@turtle.pangeatech.com>
This commit is contained in:
Thomas Gellekum 2001-05-22 11:33:38 +00:00
parent 55426b7d9e
commit 539fbbccc4
1 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,17 @@
static void
int08(regcontext_t *REGS)
{
struct timeval tv;
time_t tv_sec;
struct timezone tz;
struct tm tm;
gettimeofday(&tv, &tz);
tv_sec = tv.tv_sec;
tm = *localtime(&tv_sec);
*(u_long *)&BIOSDATA[0x6c] =
(((tm.tm_hour * 60 + tm.tm_min) * 60) + tm.tm_sec) * 182 / 10;
softint(0x1c);
}