]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_init.s
remove superfluous ".code" line
[cc65] / libsrc / tgi / tgi_init.s
index 5aab06a8391c91ad93480941ca4f977d78402f76..99a64ba7632347d89c9c9128f3d95842244584b7 100644 (file)
@@ -8,9 +8,13 @@
         .include        "tgi-kernel.inc"
         .include        "tgi-error.inc"
 
-        .import         pushax
+        .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
@@ -48,7 +64,8 @@
         ldx     #>$100
         jsr     pushax                  ; Width scale
         jsr     pushax                  ; Heigh scale
-        jsr     _tgi_textstyle          ; A = Direction = TEXT_VERTICAL
+        jsr     pusha                   ; Text direction = TGI_TEXT_VERTICAL
+        jsr     _tgi_textstyle          ; A = Font = TGI_FONT_BITMAP
 
 ; Clear the screen