]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_done.s
remove superfluous ".code" line
[cc65] / libsrc / tgi / tgi_done.s
index 463e93b799d0887ad8a9660b3dbae3ab40d07606..a5d1dce7a7315220e633fbaa830c792596fe6837 100644 (file)
@@ -5,17 +5,16 @@
 ; /* End graphics mode, switch back to text mode. Will NOT unload the driver! */
 
         .include        "tgi-kernel.inc"
+        .include        "tgi-error.inc"
 
-        .export         _tgi_done
+.proc   _tgi_done
 
-_tgi_done:
-        lda     _tgi_mode               ; Is a graphics mode active?
+        lda     _tgi_gmode              ; Is a graphics mode active?
         beq     @L1                     ; Jump if not
         jsr     tgi_done                ; Call the driver routine
-        jsr     tgi_fetch_error         ; Get the error code
-        bne     @L1                     ; Jump if we had an error
-        sta     _tgi_mode               ; Reset the current mode (A = 0)
+        lda     #$00
+        sta     _tgi_gmode              ; Reset the graph mode flag
 @L1:    rts
 
-
+.endproc