From 89388516241948c82828dbeb9b2ad342ebe932a2 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Sun, 19 Apr 2015 18:43:39 +0200 Subject: [PATCH] crt_6809: Fix argument and environ passing Signed-off-by: Tormod Volden --- Library/libs/crt0_6809.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/libs/crt0_6809.s b/Library/libs/crt0_6809.s index 8a348335..265e43c1 100644 --- a/Library/libs/crt0_6809.s +++ b/Library/libs/crt0_6809.s @@ -29,9 +29,10 @@ start2: ; we don't clear BSS since the kernel already did ; pass environ, argc and argv to main - ldx 4,s + ; pointers and data stuffed above stack by execve() + leax 4,s stx _environ - ldx 2,s + leax 2,s stx ___argv puls x ; argc ldy #_exit ; return vector -- 2.34.1