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:
cuz
2004-03-02 17:08:07 +00:00
parent 910f9277ac
commit 220e5a3898
8 changed files with 58 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ L1: lda sp,x
; Call module destructors. This is also the _exit entry.
_exit: sta ST ; Place return code into ST
_exit: pha ; Save the return code
jsr donelib ; Run module destructors
; Restore system stuff
@@ -100,6 +100,11 @@ L2: lda zpsave,x
dex
bpl L2
; Place the program return code into ST
pla
sta ST
; Reset changed vectors, back to basic
jmp RESTOR