]> git.sur5r.net Git - cc65/blob - libsrc/tgi/tgi_unload.s
Added strftime
[cc65] / libsrc / tgi / tgi_unload.s
1 ;
2 ; Ullrich von Bassewitz, 21.06.2002
3 ;
4 ; void __fastcall__ tgi_unload (void);
5 ; /* Unload the currently loaded driver. */
6
7
8         .include        "tgi-kernel.inc"
9         .include        "modload.inc"
10
11         .import         _tgi_done
12         .export         _tgi_unload
13
14
15 _tgi_unload:
16         jsr     _tgi_done               ; Switch off graphics
17         jsr     tgi_deinstall           ; Allow the driver to clean up
18
19         lda     _tgi_drv
20         ldx     _tgi_drv+1
21         jsr     _mod_free               ; Free the driver
22
23 ; Clear variables
24
25         lda     #$00
26         sta     _tgi_drv
27         sta     _tgi_drv+1
28         sta     _tgi_error
29         
30         rts
31
32