From 6b13d5d9b1ff1cb38bb50e918e51a241a225f8da Mon Sep 17 00:00:00 2001 From: Hanjie Wu Date: Mon, 24 Apr 2023 03:51:54 -0400 Subject: timer --- kern/timer_asm.S | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 kern/timer_asm.S (limited to 'kern/timer_asm.S') diff --git a/kern/timer_asm.S b/kern/timer_asm.S new file mode 100644 index 0000000..cf4c76f --- /dev/null +++ b/kern/timer_asm.S @@ -0,0 +1,18 @@ +#include +#include +#include + +.text + +.global timer_test_handler +.type timer_test_handler, %function +timer_test_handler: + push %eax + mov timer_test_status, %eax + dec %eax + mov %eax, timer_test_status + mov $INT_ACK_CURRENT, %al + mov $INT_CTL_PORT, %dx + outb %al, %dx + pop %eax + iret -- cgit