summaryrefslogtreecommitdiffstats
path: root/usr.bin/doscmd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/doscmd')
-rw-r--r--usr.bin/doscmd/timer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/doscmd/timer.c b/usr.bin/doscmd/timer.c
index 41b3019..a91c8d1 100644
--- a/usr.bin/doscmd/timer.c
+++ b/usr.bin/doscmd/timer.c
@@ -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);
}
OpenPOWER on IntegriCloud