diff options
Diffstat (limited to 'kernel/usrspace.s')
| -rw-r--r-- | kernel/usrspace.s | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/kernel/usrspace.s b/kernel/usrspace.s deleted file mode 100644 index 1d20f71..0000000 --- a/kernel/usrspace.s +++ /dev/null @@ -1,45 +0,0 @@ -global userspace_init -extern _binary_usrbin_bin_size -extern _binary_usrbin_bin_start -extern tss - -userspace_init: - push ebp - mov ebp, esp - push esi - push edi - mov ecx, _binary_usrbin_bin_size - mov esi, _binary_usrbin_bin_start - mov edi, 0x100000 -.loop: - movsb - dec ecx - jz .end - jmp .loop -.end: - pop edi - pop esi - call usrcall - pop ebp - ret - -usrcall: - push ebp - mov ebp, esp - cli - mov ax, 0x23 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov eax, esp - ; save ESP in the TSS - mov [tss+4], eax - push dword 0x23 - push dword 0x00180000 - pushf - push dword 0x1B - push dword 0x00100000 - iret - pop ebp - ret |
