libk  Diff

Differences From Artifact [3c036595d7]:

To Artifact [a74c88489c]:


     1      1   ; vim: ft=nasm
     2      2   bits 64
     3         -%include "../arch/posix/x86.lin.64.s"
            3  +%include "syscall.s"
     4      4   global _start:function
     5      5   extern _boot
     6      6   extern entry
     7      7   
     8      8   _start:
     9      9   	mov rbp, 0 ; zero the stack base ptr.
    10     10   	; attempted fix for a difficult-to-
................................................................................
    57     57   	; regardless of the size of the
    58     58   	; return value of main(), _boot always
    59     59   	; returns the system word length.
    60     60   
    61     61   	mov sys.reg.1, sys.reg.ret ; fill in
    62     62   	; the return value as exit's argument
    63     63   
    64         -	mov sys.reg.0, sys.exit ; set %rax to
           64  +	mov sys.reg.0, 60 ; set %rax to
    65     65   	; the syscall number of exit
    66     66   
    67     67   	sys.call ; invoke the kernel