jos/kern/kclock.c
Anish Athalye 2d1187aa3c Lab 2
2018-09-12 14:55:07 -04:00

23 lines
343 B
C

/* See COPYRIGHT for copyright information. */
/* Support for reading the NVRAM from the real-time clock. */
#include <inc/x86.h>
#include <kern/kclock.h>
unsigned
mc146818_read(unsigned reg)
{
outb(IO_RTC, reg);
return inb(IO_RTC+1);
}
void
mc146818_write(unsigned reg, unsigned datum)
{
outb(IO_RTC, reg);
outb(IO_RTC+1, datum);
}