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 #