]> git.sur5r.net Git - cc65/blob - libsrc/cbm/cpeekcolor.s
Changed most "backticks" (grave accents) into apostrophes.
[cc65] / libsrc / cbm / cpeekcolor.s
1 ;
2 ; 2016-02-28, Groepaz
3 ; 2017-06-22, Greg King
4 ;
5 ; unsigned char cpeekcolor (void);
6 ;
7
8         .export         _cpeekcolor
9
10 ; Get a system-specific file.
11 ; Note:  The cbm510, cbm610, c128, and Pet targets need special
12 ; versions that handle RAM banking, the 80-column VDC, and monochrome.
13
14 .if     .def(__C16__)
15         .include        "plus4.inc"     ; both C16 and Plus4
16 .elseif .def(__C64__)
17         .include        "c64.inc"
18 .elseif .def(__VIC20__)
19         .include        "vic20.inc"
20 .endif
21
22
23 _cpeekcolor:
24         ldy     CURS_X
25         lda     (CRAM_PTR),y    ; get color
26         and     #$0F
27         ldx     #>$0000
28         rts