aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/tasks/userspace.asm
blob: ebdcf264808783fae7c843eabf85164bedb4ffe0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
global jump_userspace
extern hl_cr3
extern hl_esp
extern hl_eip

jump_userspace:
	mov ax, 0x23
	mov ds, ax
	mov es, ax
	mov fs, ax
	mov gs, ax

	mov eax, dword [hl_esp]
	push 0x23
	push eax
	pushf

	; Enable interrupts
	sti

	push 0x1B
	push dword [hl_eip]

	iret