]> git.sur5r.net Git - cc65/blob - libsrc/c16/get_tv.s
Added get_tv for several platforms
[cc65] / libsrc / c16 / get_tv.s
1 ;
2 ; Ullrich von Bassewitz, 2002-12-03
3 ;
4 ; unsigned char __fastcall__ get_tv (void);
5 ; /* Return the video mode the machine is using */
6 ;
7
8         .export         _get_tv
9
10         .include        "../plus4/plus4.inc"
11
12
13 ;--------------------------------------------------------------------------
14 ; _get_tv
15
16 .proc   _get_tv
17
18         ldx     #$01            ; Assume PAL
19         bit     TED_MULTI1      ; Test bit 6
20         bvc     pal
21         dex                     ; NTSC
22 pal:    txa
23         ldx     #0
24         rts
25
26 .endproc
27
28