]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_init.s
remove superfluous ".code" line
[cc65] / libsrc / tgi / tgi_init.s
index 65e6e2d98b7afa55ec50d2ddc1c9f3204a3ef1eb..99a64ba7632347d89c9c9128f3d95842244584b7 100644 (file)
@@ -8,9 +8,13 @@
         .include        "tgi-kernel.inc"
         .include        "tgi-error.inc"
 
-        .import         pushax, pusha
+        .import         pushax, pusha, decax1
         .importzp       ptr1
 
+
+;----------------------------------------------------------------------------
+
+.code
 .proc   _tgi_init
 
         jsr     _tgi_done               ; Switch off graphics if needed
 
         inc     _tgi_gmode              ; Remember that graph mode is active
 
+; Get the maximum X and Y coordinate
+
+        jsr     _tgi_getxres
+        jsr     decax1
+        sta     _tgi_xmax
+        stx     _tgi_xmax+1
+
+        jsr     _tgi_getyres
+        jsr     decax1
+        sta     _tgi_ymax
+        stx     _tgi_ymax+1
+
 ; Do driver initialization. Set draw and view pages.
 
        lda     #0