Place the return code into ST
git-svn-id: svn://svn.cc65.org/cc65/trunk@2884 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -76,7 +76,8 @@ MemOk: stx sp
|
||||
|
||||
; Call module destructors. This is also the _exit entry.
|
||||
|
||||
_exit: jsr donelib ; Run module destructors
|
||||
_exit: pha ; Save the return code on stack
|
||||
jsr donelib ; Run module destructors
|
||||
|
||||
; Restore system stuff
|
||||
|
||||
@@ -91,6 +92,11 @@ L2: lda zpsave,x
|
||||
dex
|
||||
bpl L2
|
||||
|
||||
; Store the return code into ST
|
||||
|
||||
pla
|
||||
sta ST
|
||||
|
||||
; Reset changed vectors
|
||||
|
||||
jmp RESTOR
|
||||
|
||||
Reference in New Issue
Block a user