From 24773ffe4e21d7a149d04d791355ab5180fa63e4 Mon Sep 17 00:00:00 2001 From: pjht Date: Thu, 21 Mar 2024 08:41:14 -0500 Subject: [PATCH] Change to using libstd startup code --- main.68k | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/main.68k b/main.68k index ecdcdd6..616410b 100644 --- a/main.68k +++ b/main.68k @@ -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