diff options
author | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-04-22 14:51:47 -0400 |
---|---|---|
committer | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-04-22 14:51:47 -0400 |
commit | 325e2ea9aef0723645b86bdc773f02293747c495 (patch) | |
tree | 2d844c3e30a27eaf463fed851620221f3ad7d540 /user/lib/entry.S | |
parent | try to find mcfg (diff) | |
parent | force rebuild on header change (diff) | |
download | comus-325e2ea9aef0723645b86bdc773f02293747c495.tar.gz comus-325e2ea9aef0723645b86bdc773f02293747c495.tar.bz2 comus-325e2ea9aef0723645b86bdc773f02293747c495.zip |
Merge branch 'main' into pciepcie
Diffstat (limited to 'user/lib/entry.S')
-rw-r--r-- | user/lib/entry.S | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/user/lib/entry.S b/user/lib/entry.S index 87ad9c7..34390a0 100644 --- a/user/lib/entry.S +++ b/user/lib/entry.S @@ -1,25 +1,15 @@ -// -// user-level startup routine -// - .text .globl _start - .globl main - .globl exit + .extern main + .extern exit -// entry point - this is where the kernel starts us running + .section .text + .code64 _start: - // we immediately call main() call main - // if we come back from that, it means the user - // program didn't call exit(), in which case the - // value returned from main() is the exit status - - // push that value onto the stack and call exit() - subl $12, %esp - pushl %eax + subq $16, %rsp # ??? + pushq %rax call exit - // if we come back from that, something bad has - // happened, so we just lock up -1: jmp 1b +halt: + jmp halt |