]> git.sur5r.net Git - cc65/blob - libsrc/atari/get_tv.s
Fixed _textcolor definition.
[cc65] / libsrc / atari / get_tv.s
1 ;
2 ; Christian Groessler, July 2004
3 ;
4 ; unsigned char get_tv(void)
5 ;
6 ; returns the TV system the machine is using
7 ; 0 - NTSC
8 ; 1 - PAL
9 ;
10
11
12         .include        "atari.inc"
13         .include        "get_tv.inc"
14
15 .proc   _get_tv
16
17         ldx     #TV::NTSC       ; Assume NTSC
18         lda     PAL             ; use hw register, PALNTS is only supported on XL/XE ROM
19         and     #$0e
20         bne     @NTSC
21         inx                     ; = TV::PAL
22 @NTSC:  txa
23         ldx     #0              ; Expand to int
24         rts
25
26 .endproc