2 ; Ullrich von Bassewitz, 06.06.1998
4 ; int atexit (void (*f) (void));
8 .import exitfunc_table, exitfunc_index
18 cpy #exitfunc_max ; Slot available?
19 beq @Error ; Jump if no
21 ; Enter the function into the table
36 ; Error, no space left
38 @Error: lda #ENOSPC ; No space left
42 dex ; Make return value -1