From: Tormod Volden Date: Sun, 19 Apr 2015 16:43:39 +0000 (+0200) Subject: crt_6809: Fix argument and environ passing X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=89388516241948c82828dbeb9b2ad342ebe932a2;p=FUZIX.git crt_6809: Fix argument and environ passing Signed-off-by: Tormod Volden --- 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