diff options
Diffstat (limited to 'src/userspace/start.asm')
-rw-r--r-- | src/userspace/start.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/userspace/start.asm b/src/userspace/start.asm new file mode 100644 index 0000000..498f5f5 --- /dev/null +++ b/src/userspace/start.asm @@ -0,0 +1,22 @@ +bits 32 +section .start_section + dd _start + +section .text + global _start + extern user_main + _start: + mov esp, ebp + call user_main + + global syscall + syscall: + mov eax, 1 + lea edi, [ebp+welcome] + mov esi, welcome_sz + int 0x80 + ret + +section .data + welcome db "Welcome to the userspace", 0x0A, 0x0A + welcome_sz equ $ - welcome
\ No newline at end of file |