Fixed issues with the last change: The return code must be pulled from stack
before the stack pointer is reset. git-svn-id: svn://svn.cc65.org/cc65/trunk@2906 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -74,11 +74,6 @@ L1: lda sp,x
|
||||
_exit: pha ; Save the return code on stack
|
||||
jsr donelib ; Run module destructors
|
||||
|
||||
; Restore system stuff
|
||||
|
||||
ldx spsave
|
||||
txs ; Restore stack pointer
|
||||
|
||||
; Copy back the zero page stuff
|
||||
|
||||
ldx #zpspace-1
|
||||
@@ -92,6 +87,11 @@ L2: lda zpsave,x
|
||||
pla
|
||||
sta ST
|
||||
|
||||
; Restore the stack pointer
|
||||
|
||||
ldx spsave
|
||||
txs ; Restore stack pointer
|
||||
|
||||
; Back to basic
|
||||
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user