]> git.sur5r.net Git - cc65/blob - libsrc/cbm510/cpeekcolor.s
Merge branch 'master' into popptr1
[cc65] / libsrc / cbm510 / cpeekcolor.s
1 ;
2 ; 2016-02-28, Groepaz
3 ; 2017-06-19, Greg King
4 ;
5 ; unsigned char cpeekcolor (void);
6 ;
7
8         .export         _cpeekcolor
9
10         .import         CURS_X: zp, CRAM_PTR: zp
11
12         .include        "cbm510.inc"
13
14
15 _cpeekcolor:
16         ldx     IndReg
17         lda     #$0F
18         sta     IndReg
19         ldy     CURS_X
20         lda     (CRAM_PTR),y    ; get color
21         stx     IndReg
22         and     #$0F
23         ldx     #>$0000
24         rts