summaryrefslogtreecommitdiff
path: root/asm/usermode.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/usermode.s
parent76b3da6022310dd8edbbbfdf4f73f1696a559853 (diff)
big renaming
Diffstat (limited to 'asm/usermode.s')
-rw-r--r--asm/usermode.s38
1 files changed, 0 insertions, 38 deletions
diff --git a/asm/usermode.s b/asm/usermode.s
deleted file mode 100644
index 71ecc1d..0000000
--- a/asm/usermode.s
+++ /dev/null
@@ -1,38 +0,0 @@
-.global asm_usermode
-
-asm_usermode:
-
- mov 0x4(%esp),%edx //get adress of passed : void func()
- //to be called in ring 3
-
- // 0x23 is user data segment (|2 low bits)
- // 0x1b is user code segment (|2 low bits)
-
- // set segment registers
- mov $0x23, %ax
- mov %ax, %ds
- mov %ax, %es
- mov %ax, %fs
- mov %ax, %gs
-
- // ss is handled by iret
-
- mov %esp, %eax
-
- pushl $0x23 // user data segment
- pushl $0x8fff000-3*32 //%eax // current stack
- pushf //
-
- // http://x86.renejeschke.de/html/file_module_x86_id_145.html
- //mov $0x200, %eax
- //push %eax // eflags image
- pushl $0x1B // return code segment selector
- push %edx // return instruction pointer
-
- iret
-
- jmp . // never to be reached
-
-
-
-