From: cuz Date: Fri, 1 Dec 2000 17:58:40 +0000 (+0000) Subject: Use a destructor instead of atexit X-Git-Tag: V2.12.0~3025 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e02b3e91c8f30d4553a03eefc610497b973d99f2;p=cc65 Use a destructor instead of atexit git-svn-id: svn://svn.cc65.org/cc65/trunk@515 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/apple2/break.s b/libsrc/apple2/break.s index e9e2e6dca..d9d029805 100644 --- a/libsrc/apple2/break.s +++ b/libsrc/apple2/break.s @@ -6,8 +6,8 @@ ; .export _set_brk, _reset_brk + .destructor _reset_brk .export _brk_a, _brk_x, _brk_y, _brk_sr, _brk_pc - .import _atexit .include "apple2.inc" @@ -43,10 +43,6 @@ uservec: jmp $FFFF ; Patched at runtime lda BRKVec+1 sta oldvec+1 ; Save the old vector - lda #<_reset_brk - ldx #>_reset_brk - jsr _atexit ; Install an exit handler - L1: lda #brk_handler @@ -59,11 +55,13 @@ L1: lda #_reset_brk - jsr _atexit ; Install an exit handler - L1: lda #brk_handler @@ -59,11 +55,13 @@ L1: lda #_reset_brk - jsr _atexit ; Install an exit handler - L2: lda #stub_addr @@ -70,11 +66,13 @@ L2: lda #_reset_brk - jsr _atexit ; Install an exit handler - -L1: lda #brk_handler - sta BRKVec+1 +L1: lda #brk_handler + sta BRKVec+1 rts .endproc @@ -59,11 +55,13 @@ L1: lda #_reset_brk - jsr _atexit ; Install an exit handler - L1: lda #brk_handler @@ -61,11 +57,13 @@ L1: lda #_reset_brk - jsr _atexit ; Install an exit handler - L1: lda #brk_handler @@ -59,11 +55,13 @@ L1: lda #_reset_brk - jsr _atexit ; Install an exit handler - L1: lda #brk_handler @@ -59,11 +55,13 @@ L1: lda #