2 ; Ullrich von Bassewitz, 26.10.2000
4 ; Handle exit functions
7 .export doatexit, exitfunc_index, exitfunc_table
12 exitfunc_index: .res 1 ; Index into table, inc'ed by 2
13 exitfunc_table: .res 10 ; 5 exit functions
14 exitfunc_max = <(* - exitfunc_table)
21 ldy exitfunc_index ; Get index
22 beq @L9 ; Jump if done
30 jsr jmpvec ; Call the function
31 jmp doatexit ; Next one