From 391ed256d21a6ae2e2456d1809f357e6e96e15d1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 20 Jan 2020 23:12:54 +0100 Subject: Added pure awesomeness Actually quite some days of work but ok --- src/kernel/timer/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/timer/timer.c') diff --git a/src/kernel/timer/timer.c b/src/kernel/timer/timer.c index dd4e165..cc98bc4 100644 --- a/src/kernel/timer/timer.c +++ b/src/kernel/timer/timer.c @@ -8,8 +8,8 @@ void timer_phase(int hz) { int divisor = (int) (3579545.0 / 3.0 / (double) hz); outb(0x43, 0x36); // 01 10 11 0b // CTR, RW, MODE, BCD - outb(0x40, divisor & 0xFF); - outb(0x40, divisor >> 8); + outb(0x40, (uint8_t) (divisor & 0xFF)); + outb(0x40, (uint8_t) (divisor >> 8)); } // Executed 1000 times per second -- cgit v1.2.3