From 1d60a5e41da2c2a0f69ccbb11760918ee678a3fb Mon Sep 17 00:00:00 2001 From: pjht Date: Thu, 21 Mar 2024 08:37:17 -0500 Subject: [PATCH] Add process startup code --- start.68k | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 start.68k diff --git a/start.68k b/start.68k new file mode 100644 index 0000000..fc998f9 --- /dev/null +++ b/start.68k @@ -0,0 +1,19 @@ + ifnd __FREESTANDING + xref main + include include/syscalls.i + section .text, text + public _start + _start: + move.l #__libstd_start_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 + jsr main + jsr syscall_exit + section .bss,bss +__libstd_start_stack: ds.w 16 +__libstd_start_stack_top: + endif