Change to using libstd startup code

This commit is contained in:
pjht 2024-03-21 08:41:14 -05:00
parent 18b27293c9
commit 24773ffe4e
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -4,15 +4,8 @@
include elf.i
include memory.i
section .text,text
public _start
_start:
move.l #tmp_stack_top, a7
; set up a permanent stack
move.l #2, d0
move.l #$2, d1
jsr syscall_vmem_map_free
adda.l #(2*4096), a0
move.l a0, a7
public main
main:
clrfo
main.elf_header: fo.b Elf32_Ehdr.sizeof
link a6, #__FO ; Create a stack frame
@ -145,7 +138,8 @@ skip_pheader:
; Create the init process
move.l (main.elf_header+Elf32_Ehdr.e_entry,a6), a0
jsr syscall_new_process
jsr syscall_exit
unlk a6
rts
section .data,data
msg: dc.b "Hello from init",0