From 4c8f35ea971e41857ba4b37b61e4d56b7ce61bbf Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 19 Mar 2001 23:00:19 +0000 Subject: [PATCH] Fixed a typo git-svn-id: svn://svn.cc65.org/cc65/trunk@629 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/runtime/stkchk.s | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libsrc/runtime/stkchk.s b/libsrc/runtime/stkchk.s index be4c294c9..53f9e1487 100644 --- a/libsrc/runtime/stkchk.s +++ b/libsrc/runtime/stkchk.s @@ -12,10 +12,10 @@ ; its' bounds. ; - .export stkchk + .export stkchk .constructor initstkchk, 25 - .import __STACKSIZE__ ; Linker defined - .import pusha0, exit + .import __STACKSIZE__ ; Linker defined + .import pusha0, _exit .importzp sp ; Use macros for better readability @@ -60,14 +60,17 @@ bcs @Overflow rts -; We have a stack overflow. Set the stack pointer to the low water mark, so -; we have +; We have a stack overflow. Set the stack pointer to the initial value, so +; we can continue without worrying about stack issues. @Overflow: + lda initialsp + sta sp + lda initialsp+1 + sta sp+1 lda #4 jsr pusha0 - jmp exit - + jmp _exit .endproc @@ -83,4 +86,4 @@ initialsp: .word 0 ; Stack low water mark. lowwater: .word 0 - +