]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/tvtype.s
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / atari / tvtype.s
index 47f4afd45a1be37d194a54d95eed8c8f101de985..84540b898e02f0ab1b56a3633472d9ca76982184 100644 (file)
@@ -1,7 +1,7 @@
 ;
-; Christian Groessler, June 2004
+; Christian Groessler, July 2004
 ;
-; unsigned char _get_tv(void)
+; unsigned char get_tv(void)
 ;
 ; returns the TV system the machine is using
 ; 0 - NTSC
 
 
        .include        "atari.inc"
-       .export         __get_tv
+       .include        "get_tv.inc"
 
-.proc  __get_tv
+.proc  _get_tv
 
-       lda     PAL             ; use hw register, PALNTS is only supported on XL/XE ROM
-       ldx     #0
+       ldx     #TV::NTSC       ; Assume NTSC
+       lda     PAL             ; use hw register, PALNTS is only supported on XL/XE ROM
        and     #$0e
        bne     @NTSC
-       lda     #1
-       rts
+       inx                     ; = TV::PAL
 @NTSC: txa
+       ldx     #0              ; Expand to int
        rts
 
 .endproc