Change to using libstd startup code
This commit is contained in:
parent
18b27293c9
commit
24773ffe4e
14
main.68k
14
main.68k
@ -4,15 +4,8 @@
|
|||||||
include elf.i
|
include elf.i
|
||||||
include memory.i
|
include memory.i
|
||||||
section .text,text
|
section .text,text
|
||||||
public _start
|
public main
|
||||||
_start:
|
main:
|
||||||
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
|
|
||||||
clrfo
|
clrfo
|
||||||
main.elf_header: fo.b Elf32_Ehdr.sizeof
|
main.elf_header: fo.b Elf32_Ehdr.sizeof
|
||||||
link a6, #__FO ; Create a stack frame
|
link a6, #__FO ; Create a stack frame
|
||||||
@ -145,7 +138,8 @@ skip_pheader:
|
|||||||
; Create the init process
|
; Create the init process
|
||||||
move.l (main.elf_header+Elf32_Ehdr.e_entry,a6), a0
|
move.l (main.elf_header+Elf32_Ehdr.e_entry,a6), a0
|
||||||
jsr syscall_new_process
|
jsr syscall_new_process
|
||||||
jsr syscall_exit
|
unlk a6
|
||||||
|
rts
|
||||||
|
|
||||||
section .data,data
|
section .data,data
|
||||||
msg: dc.b "Hello from init",0
|
msg: dc.b "Hello from init",0
|
||||||
|
Loading…
Reference in New Issue
Block a user