summaryrefslogtreecommitdiff
path: root/asm/pit.s
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-03 15:18:16 +0200
committerMiguel <m.i@gmx.at>2018-09-03 15:18:16 +0200
commit7eb87bf3f3fa6226657a7106eb255cbfa97758d2 (patch)
tree2d7d2280d32180d18796999bf7687ebe5bf208df /asm/pit.s
parent76b3da6022310dd8edbbbfdf4f73f1696a559853 (diff)
big renaming
Diffstat (limited to 'asm/pit.s')
-rw-r--r--asm/pit.s40
1 files changed, 0 insertions, 40 deletions
diff --git a/asm/pit.s b/asm/pit.s
deleted file mode 100644
index 8e16d0b..0000000
--- a/asm/pit.s
+++ /dev/null
@@ -1,40 +0,0 @@
-.global asm_pit_init
-.global asm_pit_tick
-.global asm_pit_get_ticks
-
-ticks:
-.int 0
-
-asm_pit_get_ticks:
-
- mov (ticks),%eax
- ret
-
-asm_pit_tick:
-
- push %eax // persist
-
- // INC TICK COUNTER
- mov $ticks, %eax
- incl (%eax)
-
- pop %eax // load original
-
- ret
-
-asm_pit_init:
-
- // configure ticking 25 times a second
- // 1193180 / 25 = 47727.2
- mov $47727, %dx
-
- mov $0b00110100, %al
- outb %al,$0x43
-
- mov %dx,%ax
-
- out %al, $0x40
- xchg %ah,%al
- out %al, $0x40
-
- ret