From 38610cd06dc0b5a3a4ee46f5fe7c341191aa2bc1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 21 Dec 2019 12:25:14 +0100 Subject: Some userspace improvements GAS is bad, NASM is awesome. --- src/kernel/boot.asm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/kernel/boot.asm') diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm index 8241786..2180069 100644 --- a/src/kernel/boot.asm +++ b/src/kernel/boot.asm @@ -38,7 +38,10 @@ section .text global jump_userspace jump_userspace: - mov ebx, dword [esp+4] + push ebp + mov ebp, esp + mov edx, DWORD[ebp + 0xC] + mov esp, edx mov ax, 0x23 mov ds, ax @@ -56,8 +59,8 @@ section .text push eax push 0x1B - push ebx - mov ebp, ebx + push DWORD[ebp + 0x8] + iret pop ebp ret -- cgit v1.2.3