summaryrefslogtreecommitdiff
path: root/asm/pit.s
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-02 00:08:42 +0200
committerMiguel <m.i@gmx.at>2018-09-02 00:08:42 +0200
commit8e3411139b27a3421e9ac75c13f14f99f6dd3137 (patch)
treecf8b53ab02863117c310bde11ee4683e134cf1b2 /asm/pit.s
parent0fff2e6dc6fae82da1c7978918a490c25cc36f04 (diff)
syscalls
Diffstat (limited to 'asm/pit.s')
-rw-r--r--asm/pit.s41
1 files changed, 7 insertions, 34 deletions
diff --git a/asm/pit.s b/asm/pit.s
index 34b69ec..8e16d0b 100644
--- a/asm/pit.s
+++ b/asm/pit.s
@@ -1,16 +1,16 @@
-.global pit_init
-.global pit_interrupt_handler
-.global pit_get_ticks
+.global asm_pit_init
+.global asm_pit_tick
+.global asm_pit_get_ticks
ticks:
.int 0
-pit_get_ticks:
+asm_pit_get_ticks:
mov (ticks),%eax
ret
-pit_interrupt_handler:
+asm_pit_tick:
push %eax // persist
@@ -18,38 +18,11 @@ pit_interrupt_handler:
mov $ticks, %eax
incl (%eax)
- // ACK IRQ
- //mov $0x20,%al
- //out %al,$0x20
-
pop %eax // load original
- ///////
-
- /*
- pusha //Push all standard registers
- push %ds //Push data segment
- push %es //etc...
- push %fs
- push %gs
-
- mov %esp, %eax // remember current %esp
- movl $stack_top, %esp // switch to our small scheduler stack
-
- push %eax // set original %esp as param and...
- call task_switch_next // call scheduler
- mov %eax, %esp // use %esp we got from scheduler
-
- pop %gs
- pop %fs
- pop %es
- pop %ds
- popa
-
- iret // pops the return instruction pointer, return code segment selector, and EFLAGS image from the stack
-*/
ret
-pit_init:
+
+asm_pit_init:
// configure ticking 25 times a second
// 1193180 / 25 = 47727.2