]> git.sur5r.net Git - cc65/blob - libsrc/tgi/tgi_done.s
83a70b580c0743a40969de569f307b782e6cf93a
[cc65] / libsrc / tgi / tgi_done.s
1 ;
2 ; Ullrich von Bassewitz, 21.06.2002
3 ;
4 ; void __fastcall__ tgi_done (void);
5 ; /* End graphics mode, switch back to text mode. Will NOT unload the driver! */
6
7         .include        "tgi-kernel.inc"
8
9         .export         _tgi_done
10
11 _tgi_done:
12         lda     _tgi_mode               ; Is a graphics mode active?
13         beq     @L1                     ; Jump if not
14         jsr     tgi_done                ; Call the driver routine
15         jsr     tgi_fetch_error         ; Get the error code
16         lda     _tgi_error              ; Did we have an error?
17         bne     @L1                     ; Jump if yes
18         sta     _tgi_mode               ; Reset the current mode
19 @L1:    rts
20
21
22