1
0
mirror of https://github.com/cc65/cc65.git synced 2025-02-26 23:30:03 +00:00

Place the return code into ST

git-svn-id: svn://svn.cc65.org/cc65/trunk@2883 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-03-02 16:59:52 +00:00
parent 96f96a5bde
commit 910f9277ac
2 changed files with 7 additions and 4 deletions

View File

@ -112,10 +112,12 @@ L1: lda sp,x
NoIRQ1: jsr callmain
; Back from main (this is also the _exit entry). Reset the IRQ vector if
; we chained it.
; Back from main (this is also the _exit entry). Store the return code into
; ST, where it is accessible from BASIC. Reset the IRQ vector if we chained
; it.
_exit: lda #<__IRQFUNC_COUNT__
_exit: sta ST
lda #<__IRQFUNC_COUNT__
beq NoIRQ2
lda IRQInd+1
ldx IRQInd+2

View File

@ -82,7 +82,8 @@ L1: lda sp,x
; Call module destructors. This is also the _exit entry.
_exit: jsr donelib ; Run module destructors
_exit: sta ST ; Place return code into ST
jsr donelib ; Run module destructors
; Restore system stuff