home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Library:
- * Modul "atexit"
- * Jens "Himpelsoft" Gelhar 02.01.91, 08.04.94
-
- xdef _atexit,atexit__PFvp
- xdef _EXIT_9_Call_tHe_f_ing_AtExit_Functions
-
- xref malloc__Ui,exit__i
-
- _atexit:
- atexit__PFvp:
- ; Stackparameter: Zeiger auf Function
- pea 8.w
- jsr malloc__Ui
- addq.l #4,a7
- tst.l d0
- beq.b .panik
- move.l d0,a0
- move.l ExitList,(a0)
- move.l a0,ExitList
- move.l 4(a7),4(a0)
- rts
-
- .panik move.l #1002,-(a7)
- jsr exit__i
-
- _EXIT_9_Call_tHe_f_ing_AtExit_Functions:
- move.l ExitList,d0
- beq.b .end
- move.l d0,a0
- move.l 4(a0),a6
- move.l (a0),ExitList
- jsr (a6)
- bra.b _EXIT_9_Call_tHe_f_ing_AtExit_Functions
- .end rts
-
- section d,data
-
- ExitList: dc.l 0
-
- end
-