From: Alan Cox Date: Fri, 16 Jan 2015 15:43:21 +0000 (+0000) Subject: crt0_6502: update to reflect proposed ABI X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=baf929cd86040e812f6811aff2647e0e1f39e1f8;p=FUZIX.git crt0_6502: update to reflect proposed ABI --- diff --git a/Library/libs/crt0_6502.s b/Library/libs/crt0_6502.s index 94db7cc2..a6edfe8d 100644 --- a/Library/libs/crt0_6502.s +++ b/Library/libs/crt0_6502.s @@ -11,6 +11,7 @@ .import __DATA_SIZE__, __BSS_SIZE__ .import __exit .import _environ + .import _main .include "zeropage.inc" @@ -48,8 +49,8 @@ start: ; Need to save the environment ptr. The rest of the stack should be ; fine. ; - lda _sp - ldx _sp+1 + lda sp + ldx sp+1 clc adc #4 bcc l1 @@ -57,7 +58,7 @@ start: l1: sta _environ stx _environ+1 ldy #4 - jsr callmain + jsr _main ; Call the module destructors. This is also the exit() entry.