summaryrefslogtreecommitdiff
path: root/asm/task.s
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-01 12:10:13 +0200
committerMiguel <m.i@gmx.at>2018-09-01 12:10:13 +0200
commit51ab94a29f64de42e3dec3a3ef0ec6a94cda28a6 (patch)
treec2cf5f0b31c2f80ac815dc366ece52a42983219f /asm/task.s
parentd52c3d119dbbbf2a9573e7698a878cf74afdd08c (diff)
working on new syscalls
Diffstat (limited to 'asm/task.s')
-rw-r--r--asm/task.s12
1 files changed, 10 insertions, 2 deletions
diff --git a/asm/task.s b/asm/task.s
index e6c1bc4..4322da5 100644
--- a/asm/task.s
+++ b/asm/task.s
@@ -6,6 +6,8 @@ task_pusha:
push $0x8 // code segment
push $userfunc
+ push $0x666
+
pusha
push %ds
@@ -17,13 +19,15 @@ task_pusha:
now stack looks like:
- param // esp+64
+ param // esp+68
returnaddy
eflags
code segment
userfunc
+ 0x666
+
eax // rest by popa
ecx
edx
@@ -40,7 +44,7 @@ task_pusha:
*/
- mov 64(%esp),%eax // get address of alternative stack where we want to simulate the pusha
+ mov 68(%esp),%eax // get address of alternative stack where we want to simulate the pusha
mov (%esp),%ecx
mov %ecx,(%eax)
@@ -87,6 +91,9 @@ task_pusha:
mov 56(%esp),%ecx
mov %ecx,56(%eax)
+ mov 60(%esp),%ecx
+ mov %ecx,60(%eax)
+
pop %gs
pop %fs
pop %es
@@ -97,5 +104,6 @@ task_pusha:
pop %eax
pop %eax
pop %eax
+ pop %eax
ret