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:
@@ -101,11 +101,6 @@ _exit: pha ; Save the return code
|
||||
sta irqcount ; Disable custom IRQ handlers
|
||||
jsr donelib ; Run module destructors
|
||||
|
||||
; Restore system stuff
|
||||
|
||||
ldx spsave
|
||||
txs
|
||||
|
||||
; Copy back the zero page stuff
|
||||
|
||||
ldx #zpspace-1
|
||||
@@ -119,6 +114,11 @@ L2: lda zpsave,x
|
||||
pla
|
||||
sta ST
|
||||
|
||||
; Restore the stack pointer
|
||||
|
||||
ldx spsave
|
||||
txs
|
||||
|
||||
; Enable the ROM, reset changed vectors and return to BASIC
|
||||
|
||||
sta ENABLE_ROM
|
||||
|
||||
Reference in New Issue
Block a user