summaryrefslogtreecommitdiff
path: root/asm/x86.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/x86.s
parent76b3da6022310dd8edbbbfdf4f73f1696a559853 (diff)
big renaming
Diffstat (limited to 'asm/x86.s')
-rw-r--r--asm/x86.s123
1 files changed, 0 insertions, 123 deletions
diff --git a/asm/x86.s b/asm/x86.s
deleted file mode 100644
index 3243352..0000000
--- a/asm/x86.s
+++ /dev/null
@@ -1,123 +0,0 @@
-// Basic low-level x86 32-bit calls //
-
-// reading and writing ports
-
-.global x86_outb // 8 bit out
-.global x86_inb // 8 bit in
-.global x86_outw // 16 bit out
-.global x86_inw // 16 bit in
-.global x86_outl // 32 bit out
-.global x86_inl // 32 bit in
-
-// interrupts
-
-.global x86_cli // disable interrupts
-.global x86_sti // enable interrupts
-
-// xchg
-.global x86_xchg // exchange (for semaphors etc.)
-
-// invlpg
-.global x86_invlpg // invalidate translation lookaside buffer (tlb)
-
-// control registers
-.global x86_get_cr
-.global x86_set_cr
-
-x86_outb:
- mov 4(%esp), %edx
- mov 8(%esp), %eax
- outb %al,%dx
- ret
-
-x86_inb:
- mov 4(%esp), %edx
- inb %dx,%al
- ret
-
-x86_outw:
- mov 4(%esp), %edx
- mov 8(%esp), %eax
- outw %ax,%dx
- ret
-
-x86_inw:
- mov 4(%esp), %edx
- inw %dx,%ax
- ret
-
-x86_outl:
- mov 4(%esp), %edx
- mov 8(%esp), %eax
- outl %eax,%dx
- ret
-
-x86_inl:
- mov 4(%esp), %edx
- inl %dx,%eax
- ret
-
-x86_cli:
- cli
- ret
-
-x86_sti:
- sti
- ret
-
-x86_get_cr:
- mov 4(%esp), %ecx
- cmp $0,%ecx
- je get_cr0
- cmp $2,%ecx
- je get_cr2
- cmp $3,%ecx
- je get_cr3
- cmp $4,%ecx
- je get_cr4
- ret
-
-x86_set_cr:
- mov 4(%esp), %ecx
- mov 8(%esp), %eax
- cmp $0,%ecx
- je set_cr0
- cmp $2,%ecx
- je set_cr2
- cmp $3,%ecx
- je set_cr3
- cmp $4,%ecx
- je set_cr4
- ret
-
-get_cr0:
- mov %cr0,%eax
- ret
-
-get_cr2:
- mov %cr2,%eax
- ret
-
-get_cr3:
- mov %cr3,%eax
- ret
-
-get_cr4:
- mov %cr4,%eax
- ret
-
-set_cr0:
- mov %eax,%cr0
- ret
-
-set_cr2:
- mov %eax,%cr2
- ret
-
-set_cr3:
- mov %eax,%cr3
- ret
-
-set_cr4:
- mov %eax,%cr4
- ret