From 2c7b6e0431d6dfbaf385d30e87e7eb9fd4a0e61d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 31 Oct 2019 15:19:12 +0100 Subject: Some user mode improvements --- src/kernel/boot.asm | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/kernel/boot.asm') diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm index 8f24066..2501ed9 100644 --- a/src/kernel/boot.asm +++ b/src/kernel/boot.asm @@ -51,23 +51,22 @@ stublet: %include "src/kernel/interact.asm" global switch_to_user +extern test_user switch_to_user: - cli - mov ax,0x23 - mov ds,ax - mov es,ax - mov fs,ax - mov gs,ax + sti + mov ax, 0x23 + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax - mov eax,esp - push 0x23 - push eax - pushf - pop eax - or eax, 0x200 - push eax - push 0x1B - iret + mov eax, esp + push 0x23 + push eax + pushf + push 0x1B + push test_user + iret ; Store the stack SECTION .bss -- cgit v1.2.3