summaryrefslogtreecommitdiff
path: root/kern/timer_asm.S
diff options
context:
space:
mode:
authorHanjie Wu <hanjiew@andrew.cmu.edu>2023-04-24 03:51:54 -0400
committerHanjie Wu <hanjiew@andrew.cmu.edu>2023-04-24 03:55:02 -0400
commit6b13d5d9b1ff1cb38bb50e918e51a241a225f8da (patch)
tree90e8e5da37402975d769184aeb4b51fa13b610f3 /kern/timer_asm.S
parente021b8f12ad129c0bdbda3111bb93a170e21ae41 (diff)
timer
Diffstat (limited to 'kern/timer_asm.S')
-rw-r--r--kern/timer_asm.S18
1 files changed, 18 insertions, 0 deletions
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 <x86/seg.h>
+#include <x86/interrupt_defines.h>
+#include <x86/timer_defines.h>
+
+.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