summaryrefslogtreecommitdiff
path: root/src/user/runtimes/c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/runtimes/c')
-rw-r--r--src/user/runtimes/c/pcrt.asm9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/user/runtimes/c/pcrt.asm b/src/user/runtimes/c/pcrt.asm
index 85c898c..0f06236 100644
--- a/src/user/runtimes/c/pcrt.asm
+++ b/src/user/runtimes/c/pcrt.asm
@@ -4,6 +4,7 @@ global __pcrt_entry
global __pcrt_quit
global calling_task
global stdio_task
+global this_task
extern main
extern __pcrt_before_main_start
@@ -13,8 +14,9 @@ extern __pcrt_before_quit_end
section .text
__pcrt_entry:
- mov dword [calling_task], esi
- mov dword [stdio_task], edi
+ mov dword [calling_task], edi
+ mov dword [stdio_task], esi
+ mov dword [this_task], ecx
push edx
mov ebx, __pcrt_before_main_start
@@ -42,4 +44,5 @@ __pcrt_quit:
section .bss
calling_task resd 1
-stdio_task resd 1 \ No newline at end of file
+stdio_task resd 1
+this_task resd 1 \ No newline at end of file