From baf929cd86040e812f6811aff2647e0e1f39e1f8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 16 Jan 2015 15:43:21 +0000 Subject: [PATCH] crt0_6502: update to reflect proposed ABI --- Library/libs/crt0_6502.s | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- 2.34.1