summaryrefslogtreecommitdiff
path: root/asm/task.s
diff options
context:
space:
mode:
Diffstat (limited to 'asm/task.s')
-rw-r--r--asm/task.s114
1 files changed, 0 insertions, 114 deletions
diff --git a/asm/task.s b/asm/task.s
deleted file mode 100644
index bf80025..0000000
--- a/asm/task.s
+++ /dev/null
@@ -1,114 +0,0 @@
-.global task_pusha
-
-task_pusha:
-
- pushf
- push $0x8 // code segment
- push $userfunc
-
- push $0x666
- push $0x0
-
- pusha
-
- push %ds
- push %es
- push %fs
- push %gs
-
- /*
-
- now stack looks like:
-
- param // esp+72
- returnaddy
-
- eflags
- code segment
- userfunc
-
- 0x666
-
- eax // rest by popa
- ecx
- edx
- ebx
- esp
- ebp
- esi
- edi
-
- ds
- es
- fs
- gs
-
- */
-
- mov 72(%esp),%eax // get address of alternative stack where we want to simulate the pusha happened
-
- mov (%esp),%ecx
- mov %ecx,(%eax)
-
- mov 4(%esp),%ecx
- mov %ecx,4(%eax)
-
- mov 8(%esp),%ecx
- mov %ecx,8(%eax)
-
- mov 12(%esp),%ecx
- mov %ecx,12(%eax)
-
- mov 16(%esp),%ecx
- mov %ecx,16(%eax)
-
- mov 20(%esp),%ecx
- mov %ecx,20(%eax)
-
- mov 24(%esp),%ecx
- mov %ecx,24(%eax)
-
- mov 28(%esp),%ecx
- mov %ecx,28(%eax)
-
- mov 32(%esp),%ecx
- mov %ecx,32(%eax)
-
- mov 36(%esp),%ecx
- mov %ecx,36(%eax)
-
- mov 40(%esp),%ecx
- mov %ecx,40(%eax)
-
- mov 44(%esp),%ecx
- mov %ecx,44(%eax)
-
- mov 48(%esp),%ecx
- mov %ecx,48(%eax)
-
- mov 52(%esp),%ecx
- mov %ecx,52(%eax)
-
- mov 56(%esp),%ecx
- mov %ecx,56(%eax)
-
- mov 60(%esp),%ecx
- mov %ecx,60(%eax)
-
- mov 64(%esp),%ecx
- mov %ecx,64(%eax)
-
- pop %gs
- pop %fs
- pop %es
- pop %ds
-
- popa
-
- pop %eax
- pop %eax
- pop %eax
- pop %eax
- pop %eax
-
- ret